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 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'central/trunk/includes/instadisc.php') 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); -- cgit 1.4.1