Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045064Openbravo ERPA. Platformpublic2020-08-31 13:322020-09-18 11:58
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
PR20Q3.1PR20Q3.1 
Core
No
0045064: Update fileUpload library
Current fileUpload library used in core (1.2.2) should be updated to the latest version available (1.4)[1]

[1] https://commons.apache.org/proper/commons-fileupload/ [^]
.
No tags attached.
blocks feature request 0044937 closed caristu Update fileUpload library 
Issue History
2020-09-16 11:01caristuTypefeature request => backport
2020-09-16 11:01caristuTarget Version => PR20Q3.1
2020-09-16 11:04hgbotNote Added: 0123098
2020-09-18 11:58hgbotResolutionopen => fixed
2020-09-18 11:58hgbotStatusscheduled => closed
2020-09-18 11:58hgbotNote Added: 0123213
2020-09-18 11:58hgbotFixed in Version => PR20Q3.1
2020-09-18 11:58hgbotNote Added: 0123214

Notes
(0123098)
hgbot   
2020-09-16 11:04   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/168 [^]
(0123213)
hgbot   
2020-09-18 11:58   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/168 [^]
(0123214)
hgbot   
2020-09-18 11:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d71420154f907709392a76a4eaf22b5a522b60b6
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 2020-09-18T09:58:52+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d71420154f907709392a76a4eaf22b5a522b60b6 [^]

fixes BUG-45064: Update Apache Commons FileUpload

  Update Apache Commons FileUpload library to version 1.4. Together with
the library upgrade some minor changes are required:

  - FileItem class is no longer serializable[1]. For this reason with the
commons-fileupload update to version 1.4 we are no longer calling
"setSessionObject(String attribute, Serializable value)" with FileItem
as second argument but "setSessionObject(String attribute, Object value)"
which is deprecated.

  The problem is that with this change the session is no longer serializable
after setting into it a FileItem object. For the moment no additional
actions are going to be applied as this is only happening in
ModuleManagement window. So we are just adding a comment and the
SuppressWarnings annotation.

  - Removed unnecessary @SuppressWarnings("unchecked"). The
ServletFileUpload.parseRequest method does no longer require it as now
it is returning List<FileItem> instead of List.

  - Applied some minor code cleanup: removed commented-out code and use
a logger to log the exception.

[1] https://issues.apache.org/jira/browse/FILEUPLOAD-279 [^]

---
A lib/runtime/commons-fileupload-1.4.jar
M legal/Licensing.txt
M src-core/.classpath
M src-core/src/org/openbravo/base/VariablesBase.java
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
R lib/runtime/commons-fileupload-1.2.2.jar
---