mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
## 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.