Always returns a 404 otherwise people might guess which user exist

This commit is contained in:
Frédéric Guillot 2019-01-30 21:07:56 -08:00
parent 61a55c8888
commit 322383b084
1 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,8 @@ abstract class BaseController extends Base
}
if (! $this->userSession->isAdmin() && $this->userSession->getId() != $user['id']) {
throw new AccessForbiddenException();
// Always returns a 404 otherwise people might guess which user exist.
throw new PageNotFoundException();
}
return $user;