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

Jpeg headers not recognized by fFile::determineMimeTypeByContents #198

Open
ChrissDeGrece opened this issue Nov 20, 2013 · 1 comment
Open

Comments

@ChrissDeGrece
Copy link

I am trying to upload an image using fUpload but it fails because fUpload thinks it's not a JPEG type.

I traced the class and noticed that it calls fFile::determineMimeTypeByContents which reads the file headers. Well I found a jpeg file which has different headers but it is a jpeg image.

996660_571217926260110_1637116378_n

If I open and saveAs this file from MsPaint then it is properly detected.

Here is a screenshot with my hex editor, first XVI window contains the jpg which can't be recognized. The second window is a "Save As" from IrfanView.

jpeg_headers

@severak
Copy link

severak commented Jan 8, 2018

BrendonKoz added a commit to BrendonKoz/flourish-classes that referenced this issue Jan 10, 2018
Additional detection for unusual (but likely valid) JPEG header formats.
flourishlib#198 (comment)
BrendonKoz added a commit to BrendonKoz/flourish-classes that referenced this issue Jan 10, 2018
Additional detection for unusual (but likely valid) JPEG header formats.
flourishlib#198 (comment)
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

2 participants