From 64d1c6bfd47e78f65d4a09ef06ad0267471c97b1 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 29 Sep 2004 11:52:42 +0000 Subject: [PATCH] SQL injection (bug #30274) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@169530 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysql/functions/mysql-real-escape-string.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/mysql/functions/mysql-real-escape-string.xml b/reference/mysql/functions/mysql-real-escape-string.xml index e26638de4d..a117a9db24 100644 --- a/reference/mysql/functions/mysql-real-escape-string.xml +++ b/reference/mysql/functions/mysql-real-escape-string.xml @@ -1,5 +1,5 @@ - + @@ -88,7 +88,7 @@ mysql_query($query); // We didn't check $_POST['password'], it could be anything the user wanted! For example: $_POST['username'] = 'aidan'; -$_POST['password'] = "' OR 1=1"; +$_POST['password'] = "' OR ''='"; // This means the query sent to MySQL would be: echo $query;