]> git.mxchange.org Git - friendica.git/commitdiff
Fix possible security issue
authorPhilipp <admin@philipp.info>
Wed, 2 Nov 2022 18:58:01 +0000 (19:58 +0100)
committerPhilipp <admin@philipp.info>
Mon, 7 Nov 2022 18:52:13 +0000 (19:52 +0100)
src/Module/Calendar/Export.php

index 30a1bc44deb2cf01b963091f1e733b62857947c3..74fc52b464d5d43de6a1c5b4b725f27c0cc6bc7a 100644 (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.'));