Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049062Openbravo ERP00. Application dictionarypublic2022-04-14 10:462022-04-26 13:08
jmelin 
cberner 
highminoralways
closedfixed 
5
 
PR22Q3 
AugustoMauch
Core
Production - Confirmed Stable
2020-11-09
PR21Q1
https://gitlab.com/openbravo/product/openbravo/-/commit/f9de9389948227a1510d21a57811818a1e9c880c [^]
No
0049062: JIRA 2879 - Backoffice - can't import a bmp file
When trying to import a bmp file using an image import button
Then an error is triggered that said only jpg, png or bmp can be imported

So bmp can't be imported despite being an authorized type
Connect to back office
Open "Products" window and select any product
Try to import a bmp as product image

=> Error is triggered and image is not imported
No tags attached.
depends on backport 0049075PR22Q2 closed cberner JIRA 2879 - Backoffice - can't import a bmp file 
depends on backport 0049076PR22Q1.2 closed cberner JIRA 2879 - Backoffice - can't import a bmp file 
depends on backport 0049134PR21Q4.5 closed cberner JIRA 2879 - Backoffice - can't import a bmp file 
caused by defect 0045086 closed cberner Remove Apache Tika library with already existing Java 7+ functionality 
png Capture.PNG (11,681) 2022-04-14 10:48
https://issues.openbravo.com/file_download.php?file_id=16892&type=bug
png

? Sans titre.bmp (2,222) 2022-04-14 10:48
https://issues.openbravo.com/file_download.php?file_id=16893&type=bug
bmp
Issue History
2022-04-14 10:46jmelinNew Issue
2022-04-14 10:46jmelinAssigned To => Triage Platform Base
2022-04-14 10:46jmelinTriggers an Emergency Pack => No
2022-04-14 10:48jmelinFile Added: Capture.PNG
2022-04-14 10:48jmelinFile Added: Sans titre.bmp
2022-04-19 10:52cbernerRegression level => Production - Confirmed Stable
2022-04-19 10:52cbernerRegression date => 2020-11-09
2022-04-19 10:52cbernerRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/f9de9389948227a1510d21a57811818a1e9c880c [^]
2022-04-19 11:16cbernerAssigned ToTriage Platform Base => cberner
2022-04-19 11:18cbernerProjectPOS2 => Openbravo ERP
2022-04-19 11:19cbernerStatusnew => scheduled
2022-04-19 11:26hgbotNote Added: 0136582
2022-04-20 14:00hgbotNote Added: 0136633
2022-04-20 14:00hgbotResolutionopen => fixed
2022-04-20 14:00hgbotStatusscheduled => closed
2022-04-20 14:00hgbotFixed in Version => PR22Q3
2022-04-20 14:00hgbotNote Added: 0136634
2022-04-20 14:55alostaleModules => Core
2022-04-20 14:55alostaleRegression introduced in release => PR22Q1
2022-04-20 14:55alostaleSeveritymajor => minor
2022-04-20 14:55alostaleCategoryCore => 00. Application dictionary
2022-04-20 14:55alostaleRegression introduced in releasePR22Q1 => PR21Q1
2022-04-20 15:56alostaleRelationship addedcaused by 0045086
2022-04-26 13:07cbernerStatusclosed => new
2022-04-26 13:07cbernerResolutionfixed => open
2022-04-26 13:07cbernerFixed in VersionPR22Q3 =>
2022-04-26 13:07cbernerStatusnew => scheduled
2022-04-26 13:08cbernerStatusscheduled => resolved
2022-04-26 13:08cbernerFixed in Version => PR22Q3
2022-04-26 13:08cbernerFixed in SCM revision => https://gitlab.com/openbravo/product/openbravo/-/commit/f817c84b82512b66e82755471015f241e3917a7f [^]
2022-04-26 13:08cbernerResolutionopen => fixed
2022-04-26 13:08cbernerReview Assigned To => AugustoMauch
2022-04-26 13:08cbernerStatusresolved => closed

Notes
(0136582)
hgbot   
2022-04-19 11:26   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/560 [^]
(0136633)
hgbot   
2022-04-20 14:00   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/560 [^]
(0136634)
hgbot   
2022-04-20 14:00   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: f817c84b82512b66e82755471015f241e3917a7f
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 19-04-2022 11:46:48
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f817c84b82512b66e82755471015f241e3917a7f [^]

Fixes ISSUE-49062: can't import a bmp file

After switching from using tika library to using the jdk URLConnection
guessContentTypeFromStream implementation to determine the mimetype of
an uploaded file, this broke. The URLConnection implementation is not
able to guess if a file is a bmp image or not, it will detect it as a
binary file. To fix this, if it is not detected using this API, ImageIO
API is used to try and read the file, if that's successful, then the
file is a bmp image file.

Regression introduced by commit 2d1e219013bf482f68d4c6809f367dcad8f28e7d

---
M src/org/openbravo/erpCommon/utility/MimeTypeUtil.java
---