From 4a2056890dbe0e15ddbbef92edf87ef5e97ab166 Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:28:41 -0700 Subject: [PATCH] fix(storage): add missing chunkId param to create file abuse key A previous PR added chunkId as an abuse key param to fix a problem where uploading multiple chunks of a file would trigger the `general_rate_limit_exceeded` error. For some reason, the parameter disappeared from the abuse key causing a regression. This PR adds the param back to fix the regression. Reference: * https://github.com/appwrite/appwrite/issues/7879 * https://github.com/appwrite/appwrite/pull/7154 --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index f3d7f318ef..7b53b632b2 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -339,7 +339,7 @@ App::post('/v1/storage/buckets/:bucketId/files') ->label('audits.event', 'file.create') ->label('event', 'buckets.[bucketId].files.[fileId].create') ->label('audits.resource', 'file/{response.$id}') - ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT])