diff options
author | Joas Schilling <coding@schilljs.com> | 2022-11-11 09:37:26 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-12-09 22:40:46 +0100 |
commit | 256fbe9d77f5413bed1bd1a39451daccdbe3517b (patch) | |
tree | 58ee901120c8051440d4eb3b0935288c9c0bde7e /lib/private/Federation | |
parent | 2f7a1fca5f1e2a14bcda169b9e8e8da14e720f2c (diff) | |
download | nextcloud-server-256fbe9d77f5413bed1bd1a39451daccdbe3517b.tar.gz nextcloud-server-256fbe9d77f5413bed1bd1a39451daccdbe3517b.zip |
Validate if the user part of a "cloud id" can even be a valid user id
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Federation')
-rw-r--r-- | lib/private/Federation/CloudIdManager.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index e4e42cb1293..85aae8e5ec5 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -125,6 +125,9 @@ class CloudIdManager implements ICloudIdManager { if ($lastValidAtPos !== false) { $user = substr($id, 0, $lastValidAtPos); $remote = substr($id, $lastValidAtPos + 1); + + $this->userManager->validateUserId($user); + if (!empty($user) && !empty($remote)) { return new CloudId($id, $user, $remote, $this->getDisplayNameFromContact($id)); } |