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

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
skjnldsv 2025-02-19 16:10:19 +01:00 committed by Joas Schilling
parent a75f47f216
commit 338ab64365
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0

View file

@ -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);