summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-07-28 12:41:32 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-08-29 15:22:13 +0200
commitae62537adf19e4c83bf4ed336d2a21e931f6d330 (patch)
tree9b1ab0d7f41e53170a68cbe203e3e8da3ae1b802 /core
parentfaa62d17993b9467f0041cbca2cafccdcb243385 (diff)
downloadnextcloud-server-ae62537adf19e4c83bf4ed336d2a21e931f6d330.tar.gz
nextcloud-server-ae62537adf19e4c83bf4ed336d2a21e931f6d330.zip
Allow remote avatars
Diffstat (limited to 'core')
-rw-r--r--core/avatar/avatarcontroller.php6
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) {