Add replace into forbidden sql in read-only mode
This commit is contained in:
parent
3fadd5cda5
commit
f65aa6024f
3 changed files with 3 additions and 3 deletions
|
|
@ -279,7 +279,7 @@ class DoliDBMysqli 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ class DoliDBSqlite3 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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue