Skip to content

feat(files): add secure WEBP image upload support #468#487

Merged
wmnnd merged 4 commits intopentacent:mainfrom
RohilPrajapati:feature/webp-upload-support
Jan 17, 2026
Merged

feat(files): add secure WEBP image upload support #468#487
wmnnd merged 4 commits intopentacent:mainfrom
RohilPrajapati:feature/webp-upload-support

Conversation

@RohilPrajapati
Copy link
Copy Markdown
Contributor

  • Add WEBP magic number detection (RIFF....WEBP)
  • Validate filename and binary signature match
  • Prevent spoofed image uploads
  • Add comprehensive WEBP test coverage

- Add WEBP magic number detection (RIFF....WEBP)
- Validate filename and binary signature match
- Prevent spoofed image uploads
- Add comprehensive WEBP test coverage
Comment thread test/keila/files/files_test.exs Outdated
# Store a file
{:ok, file} =
Files.store_file(project.id, @test_file, filename: "keila.png", type: "image/png")
Files.store_file(project.id, @test_file_webp, filename: "keila.webp", type: "image/webp")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't make sense to use the webp file specifically here, please revert this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted changes as per feedback.

@wmnnd
Copy link
Copy Markdown
Contributor

wmnnd commented Dec 20, 2025

Thank you for this PR! It does what it says it does and I'd be happy to merge it!

Before I can merge it though, please apply the small fix I added as a review comment and also sign the CLA. You can read how that works here: https://github.com/pentacent/keila/blob/main/.cla/README.md

@wmnnd wmnnd force-pushed the main branch 2 times, most recently from f9adb61 to 455250a Compare January 4, 2026 18:17
@wmnnd wmnnd merged commit 0533f6d into pentacent:main Jan 17, 2026
4 checks passed
@wmnnd
Copy link
Copy Markdown
Contributor

wmnnd commented Jan 17, 2026

Thank you again for this PR, I've now merged it into main 😊

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.

2 participants