mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
+ security for Tickets API: disable updating rowid
This commit is contained in:
@@ -238,6 +238,12 @@ class Mos extends DolibarrApi
|
||||
if ($field == 'id') {
|
||||
continue;
|
||||
}
|
||||
if ($field == 'array_options' && is_array($value)) {
|
||||
foreach ($value as $index => $val) {
|
||||
$this->mo->array_options[$index] = $this->_checkValForAPI($field, $val, $this->mo);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$this->mo->$field = $value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user