Skip to content

Commit 50517a2

Browse files
committed
Throttle MountPublicLinkController when share is not found
Signed-off-by: Roeland Jago Douma <[email protected]>
1 parent b01c728 commit 50517a2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ public function createFederatedShare($shareWith, $token, $password = '') {
142142
[, $server] = $this->addressHandler->splitUserRemote($shareWith);
143143
$share = $this->shareManager->getShareByToken($token);
144144
} catch (HintException $e) {
145-
return new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
145+
$response = new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
146+
$response->throttle();
147+
return $response;
146148
}
147149

148150
// make sure that user is authenticated in case of a password protected link

0 commit comments

Comments
 (0)