Fix possible security issue

This commit is contained in:
Philipp 2022-11-02 19:58:01 +01:00
parent 1c80969db9
commit 89fde911f9
No known key found for this signature in database
GPG key ID: 24A7501396EB5432

View file

@ -58,6 +58,10 @@ class Export extends BaseModule
protected function rawContent(array $request = [])
{
if (!$this->session->getLocalUserId()) {
throw new HTTPException\UnauthorizedException($this->t('Permission denied.'));
}
$owner = User::getByNickname($this->parameters['nickname'], ['uid']);
if (empty($owner)) {
throw new HTTPException\NotFoundException($this->t('User not found.'));