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 nickvergessen committed Apr 15, 2025
commit 338ab643657802c572f8515c8ecc354e34df17c7
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 @@ -558,6 +558,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 @@ -2150,7 +2151,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