Skip to content
Snippets Groups Projects
Commit 344c95fe authored by Jared Hancock's avatar Jared Hancock
Browse files

Ensure staff lookups are based on valid inputs

If something fishy, like an Array is received into the password reset system
or any part of the Staff management system, it should be rejected.

References:
http://osticket.com/forum/discussion/76003/sql-attack
parent fd5e1d8d
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,10 @@ class Staff {
$sql .= 'staff_id='.db_input($var);
elseif (Validator::is_email($var))
$sql .= 'email='.db_input($var);
else
elseif (is_string($var))
$sql .= 'username='.db_input($var);
else
return null;
if(!($res=db_query($sql)) || !db_num_rows($res))
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment