Skip to content

fix(backend):improved upload filter against polyglot files#27

Merged
fxai merged 1 commit into
mainfrom
fix/file-upload-handling
Jun 17, 2026
Merged

fix(backend):improved upload filter against polyglot files#27
fxai merged 1 commit into
mainfrom
fix/file-upload-handling

Conversation

@fxai

@fxai fxai commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

What

Improved file type handling for upload

Why

Polyglot files would keep their extension if they have a valid PNG/JPEG magic byte header.

How

Normalize file types through the detected magic byte header.
txt files will now loose their extension. E.g. if a .md file is uploaded it gets replaced with .txt

@fxai fxai merged commit 394cf10 into main Jun 17, 2026
5 checks passed
@fxai fxai deleted the fix/file-upload-handling branch June 17, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant