From c48ae95eed2b80554e686b179e269226aec71627 Mon Sep 17 00:00:00 2001 From: Andres Pinto <143480783+apsantiso@users.noreply.github.com> Date: Wed, 13 May 2026 11:24:14 +0200 Subject: [PATCH 1/2] chore: validate file size check for linux >=v2.5.4 --- lib/core/buckets/helpers/uploadValidation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/buckets/helpers/uploadValidation.ts b/lib/core/buckets/helpers/uploadValidation.ts index 0234c905..83468ae1 100644 --- a/lib/core/buckets/helpers/uploadValidation.ts +++ b/lib/core/buckets/helpers/uploadValidation.ts @@ -4,8 +4,7 @@ import { getContext } from "../../../requestContext"; const EXEMPT_CLIENTS: Record = { "internxt-cli": "1.6.3", "drive-desktop-windows": "2.6.6", - // All versions - "drive-desktop-linux": '*', + "drive-desktop-linux": '2.5.3', }; export function shouldEnforceUploadValidation(): boolean { From 931ad6fcbd7fa34beea73a09fd3eb1be0b7ca877 Mon Sep 17 00:00:00 2001 From: Andres Pinto <143480783+apsantiso@users.noreply.github.com> Date: Wed, 13 May 2026 11:32:27 +0200 Subject: [PATCH 2/2] chore: fix unit tests --- .../core/buckets/helpers/uploadValidation.test.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/lib/core/buckets/helpers/uploadValidation.test.ts b/tests/lib/core/buckets/helpers/uploadValidation.test.ts index 1b824b99..d3807080 100644 --- a/tests/lib/core/buckets/helpers/uploadValidation.test.ts +++ b/tests/lib/core/buckets/helpers/uploadValidation.test.ts @@ -34,16 +34,21 @@ describe('shouldEnforceUploadValidation()', () => { }); }); - describe('When the client is drive-desktop-linux (all versions exempt)', () => { - it('When called with any version, then it should not enforce', () => { - mockContext('drive-desktop-linux', '0.0.1'); + describe('When the client is drive-desktop-linux (exempt up to 2.5.3)', () => { + it('When version is below the exempt threshold, then it should not enforce', () => { + mockContext('drive-desktop-linux', '2.5.2'); expect(shouldEnforceUploadValidation()).toBe(false); }); - it('When called with a high version, then it should not enforce', () => { - mockContext('drive-desktop-linux', '99.99.99'); + it('When version equals the exempt threshold, then it should not enforce', () => { + mockContext('drive-desktop-linux', '2.5.3'); expect(shouldEnforceUploadValidation()).toBe(false); }); + + it('When version is above the exempt threshold, then it should enforce', () => { + mockContext('drive-desktop-linux', '2.5.4'); + expect(shouldEnforceUploadValidation()).toBe(true); + }); }); describe('When the client is internxt-cli (exempt up to 1.6.3)', () => {