From 2d998db45226ca7efd39ec6e04b9891ccf129d4f Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 16 Aug 2008 17:52:30 +0000 Subject: General: Upgraded Verification ID generation Verification IDs in Central and Update can now be between 0 and 2147483647. Closes #37 --- central/trunk/includes/instadisc.php | 8 ++++---- central/trunk/xmlrpc.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'central') diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index 225814e..08394e1 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php @@ -61,7 +61,7 @@ function instaDisc_sendItem($username, $id) $fp = @fsockopen($getuser3['ip'], 1204, $errno, $errstr); if ($fp) { - $verID = rand(1,65536); + $verID = rand(1,2147483647); $title = str_replace(': ', '__INSTADISC__', $getitem3['title']); @@ -126,7 +126,7 @@ function instaDisc_sendDatabase($cserver) $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); - $verID = rand(1,65536); + $verID = rand(1,2147483647); $client = new xmlrpc_client($cserver); $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'), @@ -176,7 +176,7 @@ function instaDisc_phpMailer() function instaDisc_sendActivationEmail($username, $password, $email) { - $penKey = md5(rand(1,65536)); + $penKey = md5(rand(1,2147483647)); $inspending = "INSERT INTO pending (username, password, email, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string(md5($password)) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; $inspending2 = mysql_query($inspending); @@ -358,7 +358,7 @@ function instaDisc_generateSubscriptionActivation($username, $url) $getuser3 = mysql_fetch_array($getuser2); if ($getuser3['username'] == $username) { - $key = md5(rand(1,65536)); + $key = md5(rand(1,2147483647)); $inspending = "INSERT INTO pending2 (username, url, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($key) . "\")"; $inspending2 = mysql_query($inspending); diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 88fff7f..53b947e 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php @@ -94,7 +94,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription $i=0; while ($getcs3[$i] = mysql_fetch_array($getcs2)) { - $verID = rand(1,65536); + $verID = rand(1,2147483647); $client = new xmlrpc_client($getcs3[$i]['xmlrpc']); $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'), @@ -133,7 +133,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); - $verID = rand(1,65536); + $verID = rand(1,2147483647); $client = new xmlrpc_client($cserver); $msg = new xmlrpcmsg("InstaDisc.sendUpdateNotice", array( new xmlrpcval($cserver2, 'string'), @@ -150,7 +150,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription $getuk2 = mysql_query($getuk); $getuk3 = mysql_fetch_array($getuk2); - $verID = rand(1,65536); + $verID = rand(1,2147483647); $client = new xmlrpc_client($cserver); $msg = new xmlrpcmsg("InstaDisc.askForDatabase", array( new xmlrpcval($cserver2, 'string'), -- cgit 1.4.1