diff --git a/reference/mysql/functions/mysql-escape-string.xml b/reference/mysql/functions/mysql-escape-string.xml index c3032d7707..7f54f5172a 100644 --- a/reference/mysql/functions/mysql-escape-string.xml +++ b/reference/mysql/functions/mysql-escape-string.xml @@ -1,5 +1,5 @@ - + @@ -91,18 +91,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> - -- mysql_escape_string calls MySQL's library function of the same name, which prepends slashes to the following characters: NUL (\x00), \n, \r, \, ', " and \x1a. - -- AddSlashes escapes NUL, ', " and \. - -$query = "SELECT * FROM adresses WHERE name='$name' AND private='N'"; - -mysql_query($query); -?> - -Without mysql_escape_string a user could set name to "' OR 1=1 OR ''='" - -effectively leading to the query: -SELECT * FROM adresses WHERE name='' OR 1=1 OR ''='' AND private='N' \ No newline at end of file +--> \ No newline at end of file