mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 17:32:35 +01:00
Add replace into forbidden sql in read-only mode
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user