Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049076
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] [POS2] Coremajoralways2022-04-14 10:462022-04-20 14:00
ReporterjmelinView Statuspublic 
Assigned Tocberner 
PriorityhighResolutionfixedFixed in VersionPR22Q1.2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR22Q1.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2020-11-09
Regression introduced in release
Regression introduced by commithttps://gitlab.com/openbravo/product/openbravo/-/commit/f9de9389948227a1510d21a57811818a1e9c880c [^]
Triggers an Emergency PackNo
Summary

0049076: JIRA 2879 - Backoffice - can't import a bmp file

DescriptionWhen 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
Steps To ReproduceConnect 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0049062 closedcberner JIRA 2879 - Backoffice - can't import a bmp file 

-  Notes
(0136583)
hgbot (developer)
2022-04-19 11:28

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/561 [^]
(0136635)
hgbot (developer)
2022-04-20 14:00

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/561 [^]
(0136636)
hgbot (developer)
2022-04-20 14:00

Directly closing issue as related merge request is already approved.

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

Fixes ISSUE-49076: 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
---

- Issue History
Date Modified Username Field Change
2022-04-19 11:19 cberner Type defect => backport
2022-04-19 11:19 cberner Target Version => PR22Q1.2
2022-04-19 11:28 hgbot Note Added: 0136583
2022-04-20 14:00 hgbot Resolution open => fixed
2022-04-20 14:00 hgbot Status scheduled => closed
2022-04-20 14:00 hgbot Note Added: 0136635
2022-04-20 14:00 hgbot Fixed in Version => PR22Q1.2
2022-04-20 14:00 hgbot Note Added: 0136636


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker