Skip to content

Conversation

@RohilPrajapati
Copy link

  • 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
# 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
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
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
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
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