Fixed login vulnerability

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1224 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-01-18 22:27:09 +00:00
parent b4e422db75
commit 7f589999cf
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ function userLogin( $username, $password )
{ {
global $user, $cookies, $_SESSION, $_SERVER; global $user, $cookies, $_SESSION, $_SERVER;
$sql = "select * from Users where Username = '$username' and Password = password('$password') and Enabled = 1"; $sql = "select * from Users where Username = '".mysql_escape_string($username)."' and Password = password('".mysql_escape_string($password)."') and Enabled = 1";
$result = mysql_query( $sql ); $result = mysql_query( $sql );
if ( !$result ) if ( !$result )
echo mysql_error(); echo mysql_error();