summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-22 14:14:15 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-22 14:14:15 +0100
commit3a20d84def29df15c2cbc7a3734bb0b2ba71cbe8 (patch)
treea76c1a8bfb52d7cfdb231248e197c899bb580293 /lib
parent7f2b3dbfd227e8f7042f735c2c958465dd0caa03 (diff)
parentfe08b5e9d902c9dc2891c59cf7e8d3bcb2700150 (diff)
downloadnextcloud-server-3a20d84def29df15c2cbc7a3734bb0b2ba71cbe8.tar.gz
nextcloud-server-3a20d84def29df15c2cbc7a3734bb0b2ba71cbe8.zip
Merge pull request #22554 from owncloud/fix_22550
We should check for exceptions when trying to get the avatar
Diffstat (limited to 'lib')
-rw-r--r--lib/private/avatarmanager.php2
-rw-r--r--lib/public/iavatarmanager.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php
index 21f88b1fd3f..b2d3e6eb3dd 100644
--- a/lib/private/avatarmanager.php
+++ b/lib/private/avatarmanager.php
@@ -27,6 +27,7 @@
namespace OC;
use OCP\Files\Folder;
+use OCP\Files\NotFoundException;
use OCP\IAvatarManager;
use OCP\IUserManager;
use OCP\Files\IRootFolder;
@@ -68,6 +69,7 @@ class AvatarManager implements IAvatarManager {
* @param string $userId the ownCloud user id
* @return \OCP\IAvatar
* @throws \Exception In case the username is potentially dangerous
+ * @throws NotFoundException In case there is no user folder yet
*/
public function getAvatar($userId) {
$user = $this->userManager->get($userId);
diff --git a/lib/public/iavatarmanager.php b/lib/public/iavatarmanager.php
index 264c4fcf051..cb63ccaf6fd 100644
--- a/lib/public/iavatarmanager.php
+++ b/lib/public/iavatarmanager.php
@@ -36,6 +36,8 @@ interface IAvatarManager {
* @see \OCP\IAvatar
* @param string $user the ownCloud user id
* @return \OCP\IAvatar
+ * @throws \Exception In case the username is potentially dangerous
+ * @throws \OCP\Files\NotFoundException In case there is no user folder yet
* @since 6.0.0
*/
public function getAvatar($user);