Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(files_sharing): rate limit share creation 10 times per 10 minutes
Signed-off-by: skjnldsv <[email protected]>
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Apr 15, 2025
commit 94d1435a6a5f21b4f0a8aa0be99cccb1c15baf1d
3 changes: 2 additions & 1 deletion apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ public function deleteShare(string $id): DataResponse {
* 200: Share created
*/
#[NoAdminRequired]
#[UserRateLimit(limit: 10, period: 600)]
public function createShare(
?string $path = null,
?int $permissions = null,
Expand Down Expand Up @@ -2115,7 +2116,7 @@ private function checkInheritedAttributes(IShare $share): void {
* 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);
Expand Down