mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-19 15:23:19 +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:
@@ -406,6 +406,12 @@ class Users extends DolibarrApi
|
||||
throw new RestException(500, 'Error when updating status of user: '.$this->useraccount->error);
|
||||
}
|
||||
} else {
|
||||
if ($field == 'array_options' && is_array($value)) {
|
||||
foreach ($value as $index => $val) {
|
||||
$this->useraccount->array_options[$index] = $this->_checkValForAPI($field, $val, $this->useraccount);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$this->useraccount->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user