diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-24 12:42:04 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-24 12:42:04 +0200 |
commit | 5625c65c9ea3b053f1d943046a1f75e401526af2 (patch) | |
tree | e5b948f6a0596ac23837a7f9670696cdb8fe415d /lib/Controller/PageController.php | |
parent | 26f74213b2a04d4c52c4a8e5b1a86c2952a36fb1 (diff) |
fix(controllers): Migrate to UseSession attribute
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/PageController.php')
-rw-r--r-- | lib/Controller/PageController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 88ddddf61..c4a3f0d50 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -40,6 +40,7 @@ use OCA\Viewer\Event\LoadViewer; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\UseSession; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\RedirectResponse; @@ -126,13 +127,13 @@ class PageController extends Controller { /** * @PublicPage * @NoCSRFRequired - * @UseSession * @BruteForceProtection(action=talkRoomToken) * * @param string $token * @return Response * @throws HintException */ + #[UseSession] public function showCall(string $token): Response { // This is the entry point from the `/call/{token}` URL which is hardcoded in the server. return $this->index($token); @@ -141,7 +142,6 @@ class PageController extends Controller { /** * @PublicPage * @NoCSRFRequired - * @UseSession * @BruteForceProtection(action=talkRoomPassword) * * @param string $token @@ -149,6 +149,7 @@ class PageController extends Controller { * @return Response * @throws HintException */ + #[UseSession] public function authenticatePassword(string $token, string $password = ''): Response { // This is the entry point from the `/call/{token}` URL which is hardcoded in the server. return $this->index($token, '', $password); @@ -177,7 +178,6 @@ class PageController extends Controller { /** * @PublicPage * @NoCSRFRequired - * @UseSession * @BruteForceProtection(action=talkRoomToken) * * @param string $token @@ -186,6 +186,7 @@ class PageController extends Controller { * @return TemplateResponse|RedirectResponse * @throws HintException */ + #[UseSession] public function index(string $token = '', string $callUser = '', string $password = ''): Response { $bruteForceToken = $token; $user = $this->userSession->getUser(); |