Some extra safety when using variables - doesn't appear to be an exploit

in the general case but thanks, Fernando Quintero
This commit is contained in:
moodler
2004-08-31 08:52:12 +00:00
parent d0d1008498
commit de3e4de88d
+2 -2
View File
@@ -5,7 +5,7 @@
if (isset($_GET['p']) and isset($_GET['s']) ) { # p = user.secret s = user.username
$user = get_user_info_from_db("username", "$s");
$user = get_user_info_from_db("username", $_GET['s']);
if (!empty($user)) {
@@ -18,7 +18,7 @@
exit;
}
if ($user->secret == $p) { // They have provided the secret key to get in
if ($user->secret == $_GET['p']) { // They have provided the secret key to get in
if (!set_field("user", "confirmed", 1, "id", $user->id)) {
error("Could not confirm this user!");