From 6221e692299b6ca467c39f7d207f418b00d1267e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 9 Mar 2017 16:42:50 +0100 Subject: [PATCH] fix regexp to only match beginning of string --- api/src/Db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Db.php b/api/src/Db.php index 29ed4e8498..cc8da68676 100644 --- a/api/src/Db.php +++ b/api/src/Db.php @@ -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;