fix regexp to only match beginning of string

This commit is contained in:
Ralf Becker 2017-03-09 16:42:50 +01:00
parent 23ac04df8d
commit 6221e69229

View File

@ -754,7 +754,7 @@ class Db
{
$num_rows = $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'];
}
if (($this->readonly || $this->log_updates) && !preg_match('/\(?(SELECT|SET|SHOW)/i', $Query_String))
if (($this->readonly || $this->log_updates) && !preg_match('/^\(?(SELECT|SET|SHOW)/i', $Query_String))
{
if ($this->log_updates) error_log($Query_String.': '.function_backtrace());
if ($this->readonly) return 0;