diff options
-rw-r--r-- | central/trunk/instadisc.php | 4 | ||||
-rw-r--r-- | central/trunk/xmlrpc.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index fa2eb07..9883116 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php | |||
@@ -7,7 +7,7 @@ include_once('class.phpmailer.php'); | |||
7 | 7 | ||
8 | function instaDisc_checkVerification($username, $verification, $verificationID, $table, $nameField, $passField) | 8 | function instaDisc_checkVerification($username, $verification, $verificationID, $table, $nameField, $passField) |
9 | { | 9 | { |
10 | $getverid = "SELECT * FROM oldVerID WHERE name = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID; | 10 | $getverid = "SELECT * FROM oldVerID WHERE username = \"" . mysql_real_escape_string($username) . "\" AND verID = " . $verificationID; |
11 | $getverid2 = mysql_query($getverid); | 11 | $getverid2 = mysql_query($getverid); |
12 | $getverid3 = mysql_fetch_array($getverid2); | 12 | $getverid3 = mysql_fetch_array($getverid2); |
13 | if ($getverid3['id'] != $verificationID) | 13 | if ($getverid3['id'] != $verificationID) |
@@ -152,7 +152,7 @@ function instaDisc_sendActivationEmail($username, $password, $email) | |||
152 | { | 152 | { |
153 | $penKey = md5(rand(1,65536)); | 153 | $penKey = md5(rand(1,65536)); |
154 | 154 | ||
155 | $inspending = "INSERT INTO pending (username, password, email, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($password) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; | 155 | $inspending = "INSERT INTO pending (username, password, email, key) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string(md5($password)) . "\", \"" . mysql_real_escape_string($email) . "\", \"" . mysql_real_escape_string($penKey) . "\")"; |
156 | $inspending2 = mysql_query($inspending); | 156 | $inspending2 = mysql_query($inspending); |
157 | 157 | ||
158 | $mail = instaDisc_phpMailer(); | 158 | $mail = instaDisc_phpMailer(); |
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 5ac5868..5377a3b 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -77,7 +77,7 @@ function sendFromUpdate($username, $verification, $verificationID, $subscription | |||
77 | { | 77 | { |
78 | if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password')) | 78 | if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password')) |
79 | { | 79 | { |
80 | $getusubs = "SELECT * FROM subscriptions WHERE username = \"" . mysql_real_escape_string($username) . "\" AND uri = \"" . mysql_real_escape_string($subscription) . "\" AND owner = \"true\""; | 80 | $getusubs = "SELECT * FROM subscriptions WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($subscription) . "\" AND owner = \"true\""; |
81 | $getusubs2 = mysql_query($getusubs); | 81 | $getusubs2 = mysql_query($getusubs); |
82 | $getusubs3 = mysql_fetch_array($getusubs2); | 82 | $getusubs3 = mysql_fetch_array($getusubs2); |
83 | if ($getusubs['username'] == $username) | 83 | if ($getusubs['username'] == $username) |
@@ -160,7 +160,7 @@ function sendFromCentral($cserver, $verification, $verificationID, $subscription | |||
160 | instaDisc_sendDatabase($cserver); | 160 | instaDisc_sendDatabase($cserver); |
161 | } | 161 | } |
162 | 162 | ||
163 | $getsed = "SELECT * FROM subscriptions WHERE uri = \"" . mysql_real_escape_string($subscription) . "\""; | 163 | $getsed = "SELECT * FROM subscriptions WHERE url = \"" . mysql_real_escape_string($subscription) . "\""; |
164 | $getsed2 = mysql_query($getsed); | 164 | $getsed2 = mysql_query($getsed); |
165 | $i=0; | 165 | $i=0; |
166 | while ($getsed3[$i] = mysql_fetch_array($getsed2)) | 166 | while ($getsed3[$i] = mysql_fetch_array($getsed2)) |
@@ -249,7 +249,7 @@ function sendDatabase($cserver, $verification, $verificationID, $db) | |||
249 | 249 | ||
250 | if ($db['central.fourisland.com']['key'] == $getfi3['key']) | 250 | if ($db['central.fourisland.com']['key'] == $getfi3['key']) |
251 | { | 251 | { |
252 | $deldb = "TRUNCATE TABLE centralServers"; | 252 | $deldb = "DELETE FROM centralServers"; |
253 | $deldb2 = mysql_query($deldb); | 253 | $deldb2 = mysql_query($deldb); |
254 | 254 | ||
255 | foreach($db as $name => $value) | 255 | foreach($db as $name => $value) |