2
0
forked from Wavyzz/dolibarr

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:
atm-florian
2025-01-16 10:37:29 +01:00
parent c2c3879032
commit ba4e97f07b
29 changed files with 177 additions and 0 deletions

View File

@@ -447,6 +447,12 @@ class Receptions extends DolibarrApi
if ($field == 'id') {
continue;
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->reception->array_options[$index] = $this->_checkValForAPI($field, $val, $this->reception);
}
continue;
}
$this->reception->$field = $value;
}