From: Morris Jobke Date: Fri, 30 Sep 2016 12:57:54 +0000 (+0200) Subject: Use proper casing of username in avatar filesystem setup X-Git-Tag: v10.0.2~112^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e4ece33e802957535188187eee141edf3fe32acf;p=nextcloud-server.git Use proper casing of username in avatar filesystem setup * before you could request an avatar for User instead of user which sets up the filesystem for that user twice causing the sharing codes collision detection to detect a lot of collisions Signed-off-by: Morris Jobke --- diff --git a/lib/private/AvatarManager.php b/lib/private/AvatarManager.php index e461a70608b..96b9e7b3bd9 100644 --- a/lib/private/AvatarManager.php +++ b/lib/private/AvatarManager.php @@ -84,6 +84,8 @@ class AvatarManager implements IAvatarManager { if (is_null($user)) { throw new \Exception('user does not exist'); } + // sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below) + $userId = $user->getUID(); /* * Fix for #22119