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

BMP attachments display warnings #4771

Closed
rcubetrac opened this issue Feb 19, 2015 · 8 comments

Comments

Projects
None yet
1 participant
@rcubetrac
Copy link

commented Feb 19, 2015

Reported by netesa on 19 Feb 2015 07:25 UTC as Trac ticket #1490282

Roundcube assumes .bmp files to have MIME-type image/bmp. However, it is not officially registered at IANA and on many systems it is detected as image/x-ms-bmp. This triggers a warning in Roundcube while trying to open the attachment: "Expected: image/bmp (.bmp); found: image/x-ms-bmp".

Migrated-From: http://trac.roundcube.net/ticket/1490282

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 19, 2015

Comment by @alecpl on 19 Feb 2015 07:41 UTC

That might be mime detection related issue, but anyway, I think we could ignore the "conflict" if both expected and found type have "image/" prefix. That should not be a security issue, I suppose.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 19, 2015

Milestone changed by @alecpl on 19 Feb 2015 07:41 UTC

later => 1.1.1

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 19, 2015

Comment by @alecpl on 19 Feb 2015 12:45 UTC

Fixed in 4a2a62d.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 19, 2015

Status changed by @alecpl on 19 Feb 2015 12:45 UTC

new => closed

@rcubetrac rcubetrac closed this Feb 19, 2015

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 20, 2015

Comment by netesa on 20 Feb 2015 08:56 UTC

I still observe some problems with BMP files. I'm not quite sure if this is a problem with Roundcube or mime detection issue on my server, however, now the warning is slightly different: "Expected: image/bmp (.bmp); found: image/bmp".

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 20, 2015

Comment by @alecpl on 20 Feb 2015 09:11 UTC

Hmm... What if you change the line

$valid_extension = !$file_extension || in_array($file_extension, (array)$extensions); 

to

$valid_extension = !$file_extension || empty($extensions) || in_array($file_extension, (array)$extensions); 

?

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 20, 2015

Comment by netesa on 20 Feb 2015 09:15 UTC

With that change it is OK, no warning :)

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Feb 20, 2015

Comment by @alecpl on 20 Feb 2015 09:42 UTC

Fixed in 45256e8.

@rcubetrac rcubetrac added this to the 1.1.1 milestone Mar 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.