Do not expose user data in exceptions & fix typo

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2016-10-26 10:13:31 +02:00 committed by Lukas Reschke
parent 889e0a574b
commit 8653d14862
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with 3 additions and 3 deletions

View File

@ -351,7 +351,7 @@ class Root extends Folder implements IRootFolder {
if (is_null($userObject)) { if (is_null($userObject)) {
\OCP\Util::writeLog('files', 'Backends provided no user object for ' . $userId, \OCP\Util::ERROR); \OCP\Util::writeLog('files', 'Backends provided no user object for ' . $userId, \OCP\Util::ERROR);
throw new \OC\User\NoUserException('Backends provided no user object for ' . $userId); throw new \OC\User\NoUserException('Backends provided no user object');
} }
$userId = $userObject->getUID(); $userId = $userObject->getUID();

View File

@ -139,9 +139,9 @@ class Share extends Constants {
$userManager = \OC::$server->getUserManager(); $userManager = \OC::$server->getUserManager();
$userObject = $userManager->get($ownerUser); $userObject = $userManager->get($ownerUser);
if (is_null($ownerUser)) { if (is_null($userObject)) {
\OCP\Util::writeLog('files', ' Backends provided no user object for ' . $ownerUser, \OCP\Util::ERROR); \OCP\Util::writeLog('files', ' Backends provided no user object for ' . $ownerUser, \OCP\Util::ERROR);
throw new \OC\User\NoUserException('Backends provided no user object for ' . $ownerUser); throw new \OC\User\NoUserException('Backends provided no user object');
} }
$ownerUser = $userObject->getUID(); $ownerUser = $userObject->getUID();