removed non alphabetic characters from the beginning of the sql query submitted

This commit is contained in:
Loïc Chapeaux
2001-09-03 23:07:12 +00:00
parent c8cf9a0dac
commit 1546f12c54
2 changed files with 6 additions and 1 deletions

View File

@@ -98,7 +98,10 @@ if ($sql_query != '') {
// Only one query to run
if ($pieces_count == 1 && !empty($pieces[0]) && $view_bookmark == 0) {
$sql_query = trim($pieces[0]);
// loic1: remove non alphabetic characters from the beginning of the
// query
// $sql_query = trim($pieces[0]);
$sql_query = eregi_replace('^[^a-aA-Z]', '', $pieces[0]);
// sql.php3 will stripslash the query if get_magic_quotes_gpc
if (get_magic_quotes_gpc() == 1) {
$sql_query = addslashes($sql_query);