aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Federation
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-11-11 09:37:26 +0100
committerJoas Schilling <coding@schilljs.com>2022-12-09 22:40:46 +0100
commit256fbe9d77f5413bed1bd1a39451daccdbe3517b (patch)
tree58ee901120c8051440d4eb3b0935288c9c0bde7e /lib/private/Federation
parent2f7a1fca5f1e2a14bcda169b9e8e8da14e720f2c (diff)
downloadnextcloud-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.php3
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));
}