diff options
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) { |