diff options
author | Aleksander Machniak <alec@alec.pl> | 2019-11-11 16:53:41 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2019-11-18 17:30:23 +0300 |
commit | 110eebdd1b106b590a8dc660e005e29696e44a22 (patch) | |
tree | 48e691753906ab921cb8cebf7e486f2619117895 /program | |
parent | ee1f01a0dfd20421f9ca4078c9dde15915bad44c (diff) |
Fix db_prefix handling in queries with `TRUNCATE TABLE <name>` and `UNIQUE <name>` (#7013)
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/rcube_db.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 01ead6b67..c1ad7e105 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -1369,8 +1369,8 @@ class rcube_db } $sql = preg_replace_callback( - '/((TABLE|TRUNCATE|(?<!ON )UPDATE|INSERT INTO|FROM' - . '| ON(?! (DELETE|UPDATE))|REFERENCES|CONSTRAINT|FOREIGN KEY|INDEX)' + '/((TABLE|TRUNCATE( TABLE)?|(?<!ON )UPDATE|INSERT INTO|FROM' + . '| ON(?! (DELETE|UPDATE))|REFERENCES|CONSTRAINT|FOREIGN KEY|INDEX|UNIQUE( INDEX)?)' . '\s+(IF (NOT )?EXISTS )?[`"]*)([^`"\( \r\n]+)/', array($this, 'fix_table_names_callback'), $sql |