Add replace into forbidden sql in read-only mode

This commit is contained in:
Laurent Destailleur
2021-07-10 09:42:20 +02:00
parent 3fadd5cda5
commit f65aa6024f
3 changed files with 3 additions and 3 deletions

View File

@@ -532,7 +532,7 @@ class DoliDBPgsql extends DoliDB
}
if (!empty($dolibarr_main_db_readonly)) {
if (preg_match('/^(INSERT|UPDATE|DELETE|CREATE|ALTER|TRUNCATE|DROP)/i', $query)) {
if (preg_match('/^(INSERT|UPDATE|REPLACE|DELETE|CREATE|ALTER|TRUNCATE|DROP)/i', $query)) {
$this->lasterror = 'Application in read-only mode';
$this->lasterrno = 'APPREADONLY';
$this->lastquery = $query;