Merge pull request #26972 from nextcloud/backport/26958/stable21
[stable21] Throttle MountPublicLinkController when share is not found
This commit is contained in:
commit
dd6e1cf4fb
|
@ -142,7 +142,9 @@ class MountPublicLinkController extends Controller {
|
||||||
list(, $server) = $this->addressHandler->splitUserRemote($shareWith);
|
list(, $server) = $this->addressHandler->splitUserRemote($shareWith);
|
||||||
$share = $this->shareManager->getShareByToken($token);
|
$share = $this->shareManager->getShareByToken($token);
|
||||||
} catch (HintException $e) {
|
} catch (HintException $e) {
|
||||||
return new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
|
$response = new JSONResponse(['message' => $e->getHint()], Http::STATUS_BAD_REQUEST);
|
||||||
|
$response->throttle();
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure that user is authenticated in case of a password protected link
|
// make sure that user is authenticated in case of a password protected link
|
||||||
|
|
Loading…
Reference in New Issue