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/FilesIntegrationController.php | |
parent | 26f74213b2a04d4c52c4a8e5b1a86c2952a36fb1 (diff) |
fix(controllers): Migrate to UseSession attribute
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/FilesIntegrationController.php')
-rw-r--r-- | lib/Controller/FilesIntegrationController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Controller/FilesIntegrationController.php b/lib/Controller/FilesIntegrationController.php index 4606eaf5a..be50a1165 100644 --- a/lib/Controller/FilesIntegrationController.php +++ b/lib/Controller/FilesIntegrationController.php @@ -31,6 +31,7 @@ use OCA\Talk\Room; use OCA\Talk\Service\RoomService; use OCA\Talk\TalkSession; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\UseSession; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSNotFoundException; @@ -148,7 +149,6 @@ class FilesIntegrationController extends OCSController { /** * @PublicPage - * @UseSession * @BruteForceProtection(action=shareinfo) * * Returns the token of the room associated to the file id of the given @@ -173,12 +173,13 @@ class FilesIntegrationController extends OCSController { * Besides the token of the room this also returns the current user ID and * display name, if any; this is needed by the Talk sidebar to know the * actual current user, as the public share page uses the incognito mode and - * thus logged in users as seen as guests. + * thus logged-in users as seen as guests. * * @param string $shareToken * @return DataResponse the status code is "200 OK" if a room is returned, * or "404 Not found" if the given share token was invalid. */ + #[UseSession] public function getRoomByShareToken(string $shareToken): DataResponse { if ($this->config->getAppValue('spreed', 'conversations_files', '1') !== '1' || $this->config->getAppValue('spreed', 'conversations_files_public_shares', '1') !== '1') { |