You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: enforce mimeTypes restriction when useTempFiles is enabled
When useTempFiles is enabled, file.data is an empty buffer because the
actual file content is stored on disk at tempFilePath. This caused
fileTypeFromBuffer to return undefined, and the subsequent fallback
validation was guarded by !useTempFiles, effectively skipping all
mimeTypes validation for temp file uploads.
The fix reads the file buffer from the temp file path when useTempFiles
is enabled and file.data is empty, ensuring that both magic-byte
detection and extension-based fallback validation are applied
consistently regardless of the upload mode.
Closes#16233
0 commit comments