jira/apps/api/plane
sriram veeraghanta 25c6843fce
fix: enforce FILE_SIZE_LIMIT on published Space asset upload (#9242)
* fix(api): enforce FILE_SIZE_LIMIT on published Space asset upload

The public Space asset upload endpoint
(POST /api/public/assets/v2/anchor/{anchor}/) trusted the client-supplied
`size` value end-to-end: it was stored on the FileAsset and passed straight
to generate_presigned_post(), which uses it as the S3/MinIO policy bound
(["content-length-range", 1, file_size]). This let an authenticated user
obtain a signed upload policy exceeding the instance's FILE_SIZE_LIMIT.

Cap the value with `size_limit = min(size, settings.FILE_SIZE_LIMIT)` and use
it consistently for the stored asset metadata and the presigned POST policy,
matching every other asset upload endpoint.

* fix(api): clamp Space asset size to a valid lower bound

Address review feedback: reject malformed (non-integer) `size` with 400 and
clamp the value to [1, FILE_SIZE_LIMIT] via max(1, min(...)) so the presigned
content-length-range is always valid and no non-positive size is persisted.
2026-08-04 20:10:03 +05:30
..
analytics chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
api feat(api): add lite list endpoints for projects, members, cycles, and modules (#9410) 2026-07-17 17:40:26 +05:30
app feat(api): enhance workspace module query to include member IDs (#9541) 2026-08-04 19:50:08 +05:30
authentication fix: resolve open CodeQL security alerts (#9505) 2026-07-29 20:28:09 +05:30
bgtasks fix: cast avatar_asset to CharField to resolve mixed type errors in URL concatenation (#9512) 2026-07-30 20:29:41 +05:30
db [WEB-8512] feat: add workspace member reactivation command (#9520) 2026-08-02 03:17:23 +05:30
license [GIT-243]fix: InstanceConfiguration not created for some keys (#9303) 2026-07-29 19:33:02 +05:30
middleware refactor: logging with retention + API token hardening (#9148) 2026-05-27 16:00:05 +05:30
seeds/data [WEB-5602] feat: new design system (#8220) 2025-12-12 20:50:14 +05:30
settings [WEB-7887] fix(security): prevent stored XSS via SVG attachment served inline (GHSA-ch8j-vr4r-qf6h) (#9312) 2026-07-13 20:33:46 +05:30
space fix: enforce FILE_SIZE_LIMIT on published Space asset upload (#9242) 2026-08-04 20:10:03 +05:30
static [WEB-6420] chore: self-host social icons in project invitation email (#8718) 2026-03-05 18:17:42 +05:30
tests [WEB-8477] fix(api): filter "Updated At" by updated_at column, not created_at (#9514) 2026-07-30 20:30:21 +05:30
throttles chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
utils [WEB-8477] fix(api): filter "Updated At" by updated_at column, not created_at (#9514) 2026-07-30 20:30:21 +05:30
web chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
__init__.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
asgi.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30
celery.py [WEB-7447] feat: migrate CE telemetry from OTLP traces to OTLP metrics (#9156) 2026-05-28 18:34:27 +05:30
urls.py chore: upgrade Django 4.2 → 5.2 (#9325) 2026-07-29 19:58:33 +05:30
wsgi.py chore: add copyright (#8584) 2026-01-27 13:54:22 +05:30