Commit a2b31a2
fix: apply extension-based MIME validation when useTempFiles is enabled
When `useTempFiles` is true, `file.data` is an empty buffer so
`fileTypeFromBuffer` returns undefined. The fallback extension-based
validation was gated behind `!useTempFiles`, which meant it was skipped
entirely — allowing any file type to bypass MIME restrictions.
Remove the `!useTempFiles` condition so extension-based validation
always runs when buffer detection fails, regardless of temp file mode.
Fixes #16233
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 67c2c47 commit a2b31a2
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
| 107 | + | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
0 commit comments