Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2020-09-17 18:232020-11-09 08:11
ReportercbernerView Statuspublic 
Assigned Tocberner 
PrioritynormalResolutionfixedFixed in VersionPR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0045086: Remove Apache Tika library with already existing Java 7+ functionality

DescriptionApache tika-core 0.9 library is not needed, as Java 7+ alternative already exists in the jdk. It is currently used to handle MIME detection based on file/byte content for images and attachments.

Java 7, introduced a functionality that, although a bit more limited, allows to do the same MIME detection. As such, tika-core library should be removed and usage of it should change to the Java 7 "URLConnection.guessContentTypeFromStream" functionality.
Steps To ReproduceIn description
Proposed SolutionRemove tika-core library and change all usage to URLConnection.guessContentTypeFromStream.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00120572.50MP14 closediperdomo ShowImage servlet should include mime types in the header 
causes defect 0045388 closedcberner API Change: Remove a couple of methods from MimeTypeUtil class 

-  Notes
hgbot (developer)
2020-09-17 18:31

Merge Request created: [^]
hgbot (developer)
2020-09-18 10:18

Merge Request created: [^]
hgbot (developer)
2020-11-06 10:25

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 2d1e219013bf482f68d4c6809f367dcad8f28e7d
Author: Cristian Berner <>
Date: 2020-11-06T09:25:33+00:00
URL: [^]

Fixes ISSUE-45086: Remove tika-core library and use Java7 functionality instead

tika-core 0.9 has some critical vulnerabilities, it is removed and
substituted by Java 7 guessContentTypeFromStream functionality, that
has the same behaviour, althought is a bit more limited in the list of
MIME types available.

svg files were not detectable using URLConnection.guessContentType API,
as an alternative xml is extracted from the File being checked and if
the root element is svg, then it is assumed that the xml is an SVG.

M legal/Licensing.txt
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/
M src-test/src/org/openbravo/test/mimetypes/
M src-util/modulescript/build/classes/org/openbravo/modulescript/ConvertImages.class
M src-util/modulescript/src/org/openbravo/modulescript/
M src/org/openbravo/dal/xml/
M src/org/openbravo/erpCommon/info/
M src/org/openbravo/erpCommon/utility/
R lib/runtime/tika-core-0.9.jar
hgbot (developer)
2020-11-06 10:25

Merge request merged: [^]
hgbot (developer)
2020-11-06 10:25

Repository: [^]
Changeset: e716e91aac70cdbb37a5e0f08bab108a5a27c56e
Author: Cristian Berner <>
Date: 2020-10-28T17:37:56+01:00
URL: [^]

Related to ISSUE-45086: Remove usage of Apache Tika core library

Apache tika-core is being removed from platform, all usages are
substituted by Java API through MimeTypeUtil utility class.

This library was used to retrieve MIME type from file/bytes content.

M src/org/openbravo/integration/alfresco/
hgbot (developer)
2020-11-06 10:25

Merge request merged: [^]
hgbot (developer)
2020-11-06 11:30

Repository: [^]
Changeset: c7b1328745347610b50117413656aec20dc3133e
Author: Cristian Berner <>
Date: 2020-11-06T11:28:58+01:00
URL: [^]

Related to ISSUE-45086: Remove Apache tika-core dependency

Apache tika-core library has been removed from core, so it is no longer
a dependency.

M build.gradle
hgbot (developer)
2020-11-06 14:51

Merge Request created: [^]
hgbot (developer)
2020-11-09 08:11

Repository: [^]
Changeset: f9de9389948227a1510d21a57811818a1e9c880c
Author: Cristian Berner <>
Date: 2020-11-06T15:00:29+01:00
URL: [^]

Related to ISSUE-45086: InputStreams are not being closed on MimeTypeUtil methods

File InputStreams are not being closed in MimeTypeUtil detection
methods, to fix this, those have been introduced in try-with-resources
to be auto-closed after usage.

M src/org/openbravo/erpCommon/utility/
hgbot (developer)
2020-11-09 08:11

Merge request merged: [^]

- Issue History
Date Modified Username Field Change
2020-09-17 18:23 cberner New Issue
2020-09-17 18:23 cberner Assigned To => cberner
2020-09-17 18:23 cberner Modules => Core
2020-09-17 18:23 cberner Triggers an Emergency Pack => No
2020-09-17 18:31 hgbot Note Added: 0123193
2020-09-18 10:18 hgbot Note Added: 0123200
2020-09-18 10:25 cberner Summary Remove Apache Tika library because of critical vulnerability => Remove Apache Tika library with already existing Java 7+ functionality
2020-09-18 10:25 cberner Description Updated View Revisions
2020-11-06 07:42 alostale Relationship added related to 0012057
2020-11-06 09:34 cberner Relationship added causes 0045388
2020-11-06 10:25 hgbot Resolution open => fixed
2020-11-06 10:25 hgbot Status new => closed
2020-11-06 10:25 hgbot Fixed in Version => PR21Q1
2020-11-06 10:25 hgbot Note Added: 0124209
2020-11-06 10:25 hgbot Note Added: 0124210
2020-11-06 10:25 hgbot Note Added: 0124213
2020-11-06 10:25 hgbot Note Added: 0124214
2020-11-06 11:30 hgbot Note Added: 0124216
2020-11-06 14:51 hgbot Note Added: 0124221
2020-11-09 08:11 hgbot Note Added: 0124236
2020-11-09 08:11 hgbot Note Added: 0124237

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker