Skip to content

Commit 873fa5c

Browse files
skjnldsvAndyScherzinger
authored andcommitted
fix(files_sharing): rate limit share creation 10 times per 10 minutes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent b9aa397 commit 873fa5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ public function deleteShare(string $id): DataResponse {
557557
* 200: Share created
558558
*/
559559
#[NoAdminRequired]
560+
#[UserRateLimit(limit: 10, duration: 600)]
560561
public function createShare(
561562
?string $path = null,
562563
?int $permissions = null,
@@ -2146,7 +2147,7 @@ private function checkInheritedAttributes(IShare $share): void {
21462147
* 200: The email notification was sent successfully
21472148
*/
21482149
#[NoAdminRequired]
2149-
#[UserRateLimit(limit: 5, period: 120)]
2150+
#[UserRateLimit(limit: 10, period: 600)]
21502151
public function sendShareEmail(string $id, $password = ''): DataResponse {
21512152
try {
21522153
$share = $this->getShareById($id);

0 commit comments

Comments
 (0)