mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(files_sharing): rate limit share creation 10 times per 10 minutes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
a75f47f216
commit
338ab64365
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue