diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-09 22:07:46 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-09 22:07:46 +0200 |
commit | 3235785c245d8d366cc01c0ae179a173cf973633 (patch) | |
tree | e97fa9e47455766c60eb5727c491663c2bfe95d3 /apps/provisioning_api/lib | |
parent | 0523626b98ea356842b0c49e63808b300bb2096d (diff) | |
download | nextcloud-server-3235785c245d8d366cc01c0ae179a173cf973633.tar.gz nextcloud-server-3235785c245d8d366cc01c0ae179a173cf973633.zip |
Fix exception handling when profile data is too long
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 38d51857ffc..a26479ba0a8 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -958,7 +958,11 @@ class UsersController extends AUserData { } catch (PropertyDoesNotExistException $e) { $userAccount->setProperty($key, $value, IAccountManager::SCOPE_PRIVATE, IAccountManager::NOT_VERIFIED); } - $this->accountManager->updateAccount($userAccount); + try { + $this->accountManager->updateAccount($userAccount); + } catch (InvalidArgumentException $e) { + throw new OCSException('Invalid ' . $e->getMessage(), 102); + } break; case IAccountManager::PROPERTY_PROFILE_ENABLED: $userAccount = $this->accountManager->getAccount($targetUser); |