about summary refs log tree commit diff stats
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
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
-rw-r--r--central/trunk/includes/instadisc.php8
-rw-r--r--central/trunk/xmlrpc.php6
-rw-r--r--update/library/trunk/instadisc.php6
-rw-r--r--update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php4
-rw-r--r--update/plugin/wordpress/trunk/instadisc/instadisc.php4
5 files changed, 14 insertions, 14 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'),
diff --git a/update/library/trunk/instadisc.php b/update/library/trunk/instadisc.php index bfc1101..8a17da0 100644 --- a/update/library/trunk/instadisc.php +++ b/update/library/trunk/instadisc.php
@@ -18,7 +18,7 @@ function instaDisc_sendItem($id, $title, $author, $url, $semantics)
18{ 18{
19 global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI; 19 global $idusUsername, $idusPassword, $idusCentralServer, $idusSubscriptionURI;
20 20
21 $verID = rand(1,65536); 21 $verID = rand(1,2147483647);
22 22
23 $client = new xmlrpc_client($idusCentralServer[$id]); 23 $client = new xmlrpc_client($idusCentralServer[$id]);
24 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), 24 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'),
@@ -40,7 +40,7 @@ function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics)
40 $encID = 0; 40 $encID = 0;
41 while ($encID == 0) 41 while ($encID == 0)
42 { 42 {
43 $encID = rand(1,65536); 43 $encID = rand(1,2147483647);
44 } 44 }
45 45
46 $cipher = "rijndael-128"; 46 $cipher = "rijndael-128";
@@ -70,7 +70,7 @@ function instaDisc_sendEncrypted($id, $title, $author, $url, $semantics)
70 70
71 mcrypt_module_close($td); 71 mcrypt_module_close($td);
72 72
73 $verID = rand(1,65536); 73 $verID = rand(1,2147483647);
74 74
75 $client = new xmlrpc_client($idusCentralServer[$id]); 75 $client = new xmlrpc_client($idusCentralServer[$id]);
76 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'), 76 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($idusUsername[$id], 'string'),
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index df7c203..95d1956 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php
@@ -24,7 +24,7 @@ include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc');
24function sendItem($title, $userID, $url, $fourm) 24function sendItem($title, $userID, $url, $fourm)
25{ 25{
26 global $config, $db, $phpbb_root_path; 26 global $config, $db, $phpbb_root_path;
27 $verID = rand(1,65536); 27 $verID = rand(1,2147483647);
28 28
29 $da = array('user_id' => $userID); 29 $da = array('user_id' => $userID);
30 $getuser = "SELECT * FROM " . USERS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); 30 $getuser = "SELECT * FROM " . USERS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da);
@@ -33,7 +33,7 @@ function sendItem($title, $userID, $url, $fourm)
33 $db->sql_freeresult($getuser2); 33 $db->sql_freeresult($getuser2);
34 $author = $getuser3['username']; 34 $author = $getuser3['username'];
35 35
36 $url = html_entity_decode(str_replace($phpbb_root_path, generate_board_url() . '/', $url)); 36 $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url);
37 37
38 $da = array('forum_id' => $fourm); 38 $da = array('forum_id' => $fourm);
39 $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); 39 $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da);
diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php index b8ed9d1..c1d82ad 100644 --- a/update/plugin/wordpress/trunk/instadisc/instadisc.php +++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php
@@ -146,7 +146,7 @@ function sendPost($id)
146 $authorName = $author->display_name; 146 $authorName = $author->display_name;
147 $url = get_permalink($id); 147 $url = get_permalink($id);
148 148
149 $verID = rand(1,65536); 149 $verID = rand(1,2147483647);
150 150
151 $client = new xmlrpc_client(get_option('instaDisc_blogPost_centralServer')); 151 $client = new xmlrpc_client(get_option('instaDisc_blogPost_centralServer'));
152 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_centralServer_username'), 'string'), 152 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_centralServer_username'), 'string'),
@@ -170,7 +170,7 @@ function sendComment($id)
170 $author = $comment->comment_author; 170 $author = $comment->comment_author;
171 $url = get_permalink($comment->comment_post_ID) . "#comments"; 171 $url = get_permalink($comment->comment_post_ID) . "#comments";
172 172
173 $verID = rand(1,65536); 173 $verID = rand(1,2147483647);
174 174
175 $client = new xmlrpc_client(get_option('instaDisc_comment_centralServer')); 175 $client = new xmlrpc_client(get_option('instaDisc_comment_centralServer'));
176 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_centralServer_username'), 'string'), 176 $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_centralServer_username'), 'string'),