diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-08-29 18:05:32 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-08-29 18:05:32 +0200 |
commit | 90dfa981c58a58ad7625e42bc0dce9bcf46dc74f (patch) | |
tree | fae17c58a0f12dc7c62b607beabea34ed7f0ac28 /core/avatar/avatarcontroller.php | |
parent | 723f8c8f1ba8c9859ec2d46515dc06e7236f89c0 (diff) | |
parent | ae62537adf19e4c83bf4ed336d2a21e931f6d330 (diff) | |
download | nextcloud-server-90dfa981c58a58ad7625e42bc0dce9bcf46dc74f.tar.gz nextcloud-server-90dfa981c58a58ad7625e42bc0dce9bcf46dc74f.zip |
Merge pull request #14856 from rullzer/remote_avatars
Allow Remote avatars
Diffstat (limited to 'core/avatar/avatarcontroller.php')
-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) { |