Browse Source

fix(files_sharing): rate limit share creation 10 times per 10 minutes

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
pull/50905/head
skjnldsv 8 months ago
committed by Joas Schilling
parent
commit
338ab64365
No known key found for this signature in database GPG Key ID: F72FA5B49FFA96B0
  1. 3
      apps/files_sharing/lib/Controller/ShareAPIController.php

3
apps/files_sharing/lib/Controller/ShareAPIController.php

@ -558,6 +558,7 @@ class ShareAPIController extends OCSController {
* 200: Share created
*/
#[NoAdminRequired]
#[UserRateLimit(limit: 10, period: 600)]
public function createShare(
?string $path = null,
?int $permissions = null,
@ -2150,7 +2151,7 @@ class ShareAPIController extends OCSController {
* 200: The email notification was sent successfully
*/
#[NoAdminRequired]
#[UserRateLimit(limit: 5, period: 120)]
#[UserRateLimit(limit: 10, period: 600)]
public function sendShareEmail(string $id, $password = ''): DataResponse {
try {
$share = $this->getShareById($id);

Loading…
Cancel
Save