about summary refs log tree commit diff stats
path: root/central/trunk
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-08-16 17:52:30 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-08-16 17:52:30 +0000
commit2d998db45226ca7efd39ec6e04b9891ccf129d4f (patch)
tree8059664ec8f60c17239672e69abea7d2970a59cd /central/trunk
parent3abf3909dfa306d20358a3538da212b7cb64f52a (diff)
downloadinstadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.tar.gz
instadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.tar.bz2
instadisc-2d998db45226ca7efd39ec6e04b9891ccf129d4f.zip
General: Upgraded Verification ID generation
Verification IDs in Central and Update can now be between 0 and 2147483647. Closes #37
Diffstat (limited to 'central/trunk')
-rw-r--r--central/trunk/includes/instadisc.php8
-rw-r--r--central/trunk/xmlrpc.php6
2 files changed, 7 insertions, 7 deletions
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)
61 $fp = @fsockopen($getuser3['ip'], 1204, $errno, $errstr); 61 $fp = @fsockopen($getuser3['ip'], 1204, $errno, $errstr);
62 if ($fp) 62 if ($fp)
63 { 63 {
64 $verID = rand(1,65536); 64 $verID = rand(1,2147483647);
65 65
66 $title = str_replace(': ', '__INSTADISC__', $getitem3['title']); 66 $title = str_replace(': ', '__INSTADISC__', $getitem3['title']);
67 67
@@ -126,7 +126,7 @@ function instaDisc_sendDatabase($cserver)
126 $getuk2 = mysql_query($getuk); 126 $getuk2 = mysql_query($getuk);
127 $getuk3 = mysql_fetch_array($getuk2); 127 $getuk3 = mysql_fetch_array($getuk2);
128 128
129 $verID = rand(1,65536); 129 $verID = rand(1,2147483647);
130 130
131 $client = new xmlrpc_client($cserver); 131 $client = new xmlrpc_client($cserver);
132 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'), 132 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'),
@@ -176,7 +176,7 @@ function instaDisc_phpMailer()
176 176
177function instaDisc_sendActivationEmail($username, $password, $email) 177function instaDisc_sendActivationEmail($username, $password, $email)
178{ 178{
179 $penKey = md5(rand(1,65536)); 179 $penKey = md5(rand(1,2147483647));
180 180
181 $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) . "\")"; 181 $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) . "\")";
182 $inspending2 = mysql_query($inspending); 182 $inspending2 = mysql_query($inspending);
@@ -358,7 +358,7 @@ function instaDisc_generateSubscriptionActivation($username, $url)
358 $getuser3 = mysql_fetch_array($getuser2); 358 $getuser3 = mysql_fetch_array($getuser2);
359 if ($getuser3['username'] == $username) 359 if ($getuser3['username'] == $username)
360 { 360 {
361 $key = md5(rand(1,65536)); 361 $key = md5(rand(1,2147483647));
362 362
363 $inspending = "INSERT INTO pending2 (username, url, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($key) . "\")"; 363 $inspending = "INSERT INTO pending2 (username, url, code) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($url) . "\", \"" . mysql_real_escape_string($key) . "\")";
364 $inspending2 = mysql_query($inspending); 364 $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
94 $i=0; 94 $i=0;
95 while ($getcs3[$i] = mysql_fetch_array($getcs2)) 95 while ($getcs3[$i] = mysql_fetch_array($getcs2))
96 { 96 {
97 $verID = rand(1,65536); 97 $verID = rand(1,2147483647);
98 98
99 $client = new xmlrpc_client($getcs3[$i]['xmlrpc']); 99 $client = new xmlrpc_client($getcs3[$i]['xmlrpc']);
100 $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'), 100 $msg = new xmlrpcmsg("InstaDisc.sendFromCentral", array( new xmlrpcval($cserver, 'string'),
@@ -133,7 +133,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription
133 $getuk2 = mysql_query($getuk); 133 $getuk2 = mysql_query($getuk);
134 $getuk3 = mysql_fetch_array($getuk2); 134 $getuk3 = mysql_fetch_array($getuk2);
135 135
136 $verID = rand(1,65536); 136 $verID = rand(1,2147483647);
137 137
138 $client = new xmlrpc_client($cserver); 138 $client = new xmlrpc_client($cserver);
139 $msg = new xmlrpcmsg("InstaDisc.sendUpdateNotice", array( new xmlrpcval($cserver2, 'string'), 139 $msg = new xmlrpcmsg("InstaDisc.sendUpdateNotice", array( new xmlrpcval($cserver2, 'string'),
@@ -150,7 +150,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription
150 $getuk2 = mysql_query($getuk); 150 $getuk2 = mysql_query($getuk);
151 $getuk3 = mysql_fetch_array($getuk2); 151 $getuk3 = mysql_fetch_array($getuk2);
152 152
153 $verID = rand(1,65536); 153 $verID = rand(1,2147483647);
154 154
155 $client = new xmlrpc_client($cserver); 155 $client = new xmlrpc_client($cserver);
156 $msg = new xmlrpcmsg("InstaDisc.askForDatabase", array( new xmlrpcval($cserver2, 'string'), 156 $msg = new xmlrpcmsg("InstaDisc.askForDatabase", array( new xmlrpcval($cserver2, 'string'),