diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-07-28 12:41:32 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-08-29 15:22:13 +0200 |
commit | ae62537adf19e4c83bf4ed336d2a21e931f6d330 (patch) | |
tree | 9b1ab0d7f41e53170a68cbe203e3e8da3ae1b802 /core | |
parent | faa62d17993b9467f0041cbca2cafccdcb243385 (diff) | |
download | nextcloud-server-ae62537adf19e4c83bf4ed336d2a21e931f6d330.tar.gz nextcloud-server-ae62537adf19e4c83bf4ed336d2a21e931f6d330.zip |
Allow remote avatars
Diffstat (limited to 'core')
-rw-r--r-- | core/avatar/avatarcontroller.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/avatar/avatarcontroller.php b/core/avatar/avatarcontroller.php index 945e022600a..0c270bee53e 100644 --- a/core/avatar/avatarcontroller.php +++ b/core/avatar/avatarcontroller.php @@ -90,14 +90,18 @@ class AvatarController extends Controller { } /** - * @NoAdminRequired * @NoCSRFRequired + * @PublicPage * * @param string $userId * @param int $size * @return DataResponse|DataDisplayResponse */ public function getAvatar($userId, $size) { + if (!$this->userManager->userExists($userId)) { + return new DataResponse([], Http::STATUS_NOT_FOUND); + } + if ($size > 2048) { $size = 2048; } elseif ($size <= 0) { |