Files
supabase/apps/studio/components/interfaces
Monica Khoury cf5a236910 Restrict unsupported file types in support form attachments (#52086)
## What

Restricts support form attachments to a safe allowlist (`.txt`, `.log`,
`.png`, `.jpg`, `.jpeg`, `.pdf`, `.json`, `.har`) and shows a clear
"unsupported file type" error for anything else. Also fixes the upload
filename-suffix logic, which previously derived the extension from MIME
type and would have produced wrong suffixes for the newly-allowed
text-based formats.

## Why

Arbitrary file types (e.g. `.zip`, `.py`, executables) could previously
be attached to support tickets, which is an unnecessary security risk.
Closes FE-3471.

## How to test

1. Open the support form and try attaching a `.zip`, `.exe`, or `.py`
file (rename a file if the OS picker filters it out) - confirm you get
an "unsupported file type" error toast and it's not added to the
attachment list.
2. Attach a mix of valid and invalid files in one selection - confirm
only the valid ones are added, and the error lists the rejected
filenames.
3. Attach a valid file of each allowed type (`.txt`, `.log`, `.png`,
`.jpg`, `.pdf`, `.json`, `.har`) - confirm each uploads and submits
successfully.
4. Confirm the "Supported formats" caption is visible under the
Attachments section.
2026-10-22 13:31:14 +03:00
..
2026-09-11 12:17:49 +08:00