]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use proper casing of username in avatar filesystem setup 1645/head
authorMorris Jobke <hey@morrisjobke.de>
Fri, 30 Sep 2016 12:57:54 +0000 (14:57 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Fri, 7 Oct 2016 07:57:41 +0000 (09:57 +0200)
* 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 <hey@morrisjobke.de>
lib/private/AvatarManager.php

index e461a70608b362090b67f539e8a004af581af953..96b9e7b3bd9206e91981ba1d729f88adad60a5bc 100644 (file)
@@ -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