Merge pull request #26543 from nextcloud/stable19-26433
[stable19] Limit size of properties to 2048 characters
This commit is contained in:
commit
12aa976b88
|
@ -93,6 +93,14 @@ class AccountManager implements IAccountManager {
|
|||
public function updateUser(IUser $user, $data) {
|
||||
$userData = $this->getUser($user);
|
||||
$updated = true;
|
||||
|
||||
// set a max length
|
||||
foreach ($data as $propertyName => $propertyData) {
|
||||
if (isset($data[$propertyName]) && isset($data[$propertyName]['value']) && strlen($data[$propertyName]['value']) > 2048) {
|
||||
$data[$propertyName]['value'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($userData)) {
|
||||
$this->insertNewUser($user, $data);
|
||||
} elseif ($userData !== $data) {
|
||||
|
|
Loading…
Reference in New Issue