Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require support for BMP files #626

Open
villagemedia opened this issue Feb 21, 2023 · 11 comments
Open

Require support for BMP files #626

villagemedia opened this issue Feb 21, 2023 · 11 comments

Comments

@villagemedia
Copy link

We are attempting to move from ImageResizer to ImageFlow. We noticed a lot of errors after switching, and it seems that ImageFlow does not support bitmaps. We have user submitted content that has a .jpg extension, but it's actually a bitmap. These resize just fine in ImageResizer, but fail in ImageFlow.

ImageflowException: ImageMalformed: NoEnabledDecoderFound: No ENABLED decoder found for file starting in [42, 4D, 36, C4, 6D, 1, 0, 0, 0, 0, 36, 0] at
imageflow_core\src\codecs\mod.rs:155:20

return Err(nerror!(ErrorKind::NoEnabledDecoderFound, "No ENABLED decoder found for file starting in {:X?}", bytes))

imageflow_core\src\context.rs:194:103
let codec_value = CodecInstanceContainer::create(self, io, io_id, direction).map_err(|e| e.at(here!()))?;

imageflow_core\src\context.rs:235:66
self.add_io(io, io_id, IoDirection::In).map_err(|e| e.at(here!()))

imageflow_abi\src\lib.rs:703:62
c.add_input_buffer(io_id,bytes).map_err(|e| e.at(here!()))?;

@lilith
Copy link
Member

lilith commented Feb 21, 2023 via email

@villagemedia
Copy link
Author

villagemedia commented Feb 21, 2023 via email

@lilith lilith transferred this issue from imazen/imageflow-dotnet-server Feb 24, 2023
@lilith
Copy link
Member

lilith commented Feb 24, 2023

I've moved this to the Imageflow project for consideration. I typically don't implement features unless there are multiple users needing them, but I'll keep it in mind. For now, I would suggest normalizing your bitmaps to .png.

@villagemedia
Copy link
Author

villagemedia commented Feb 24, 2023 via email

@lilith
Copy link
Member

lilith commented Feb 24, 2023 via email

@villagemedia
Copy link
Author

villagemedia commented Feb 24, 2023 via email

@lilith
Copy link
Member

lilith commented Feb 24, 2023 via email

@bes-internal
Copy link

Don't take it as rudeness, but I thought imageflow was positioning itself as a replacement for imagemagick, but it turned out to be an enterprise server with a support plan...
Our users also send anything to the server: what is displayed on their systems with a preview. This is a wild world and only on servers is it normalized.
So, for good reason, the question on the agenda is not "why", but "when".

@lilith
Copy link
Member

lilith commented Feb 26, 2023 via email

@villagemedia
Copy link
Author

villagemedia commented Oct 11, 2023 via email

@lilith
Copy link
Member

lilith commented Oct 16, 2023

Hi Scott,

That's really unfortunate. I'm not seeing other user instances where DIBs masquerading as .jpeg files are becoming an issue, but it's clear some tool or system is producing them.

I could write a codec for these if you establish a support contract with us. On my end, it's a massive commitment since I won't be able to drop that functionality in the future, and it is part of the attack surface for the product, so it's a liability for basically everyone who doesn't need DIB support. I'd implement it in Rust, though, which should mitigate many classes of security issues.

Kind regards,
Lilith River

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

No branches or pull requests

3 participants