Skip to content

Commit aec6eeb

Browse files
skjnldsvbackportbot[bot]
authored andcommitted
fix(files_sharing): rate limit share creation 10 times per 10 minutes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 1649cd3 commit aec6eeb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ public function deleteShare(string $id): DataResponse {
558558
* 200: Share created
559559
*/
560560
#[NoAdminRequired]
561+
#[UserRateLimit(limit: 10, period: 600)]
561562
public function createShare(
562563
?string $path = null,
563564
?int $permissions = null,
@@ -2150,7 +2151,7 @@ private function checkInheritedAttributes(IShare $share): void {
21502151
* 200: The email notification was sent successfully
21512152
*/
21522153
#[NoAdminRequired]
2153-
#[UserRateLimit(limit: 5, period: 120)]
2154+
#[UserRateLimit(limit: 10, period: 600)]
21542155
public function sendShareEmail(string $id, $password = ''): DataResponse {
21552156
try {
21562157
$share = $this->getShareById($id);

0 commit comments

Comments
 (0)