omen666,
m0Hze
Извиняюсь, я не заметил, что перед проверкой еще такая строка: $_tmp = strtolower( $this->_removeAllQuotes($the_query) ); Sql приводится к нижнему регистру.
В общем не поможет, и я пробовал.
и того получается:
Код:
$_tmp = strtolower( $this->_removeAllQuotes($the_query) );
if ( preg_match( "#(?:/\*|\*/)#i", $_tmp ) )
{
$this->throwFatalError( "You are not allowed to use comments in your SQL query..." );
return false;
}
if ( preg_match( "#[^_a-zA-Z]union[^_a-zA-Z]#s", $_tmp ) )
{
$this->throwFatalError( "UNION query joins are not allowed..." );
return false;
}
else if ( preg_match_all( "#[^_a-zA-Z](select)[^_a-zA-Z]#s", $_tmp, $matches ) )
{
if ( count( $matches ) > 1 )
{
$this->throwFatalError( "SUB SELECT query joins are not allowed..." );
return false;
}
}