Manually applied fix from trunk for revision: 1852503

===
Fixed: Upgrade Apache Tika to 1.20 (CVE-2018-8017/CVE-2018-17197)
In Apache Tika 1.2 to 1.18, a carefully crafted file can trigger an infinite loop in the IptcAnpaParser. 
A carefully crafted or corrupt sqlite file can cause an infinite loop in Apache Tika's SQLite3Parser in versions 1.8-1.19.1 of Apache Tika. 
===


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1852517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Deepak Dixit
2019-01-30 11:32:51 +00:00
parent 631abf1f3d
commit 0fb3d533a6
2 changed files with 6 additions and 5 deletions
@@ -41,6 +41,7 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.CellType;
public class ImportProductServices {
@@ -122,12 +123,12 @@ public class ImportProductServices {
// read productId from first column "sheet column index
// starts from 0"
HSSFCell cell2 = row.getCell(2);
cell2.setCellType(HSSFCell.CELL_TYPE_STRING);
cell2.setCellType(CellType.STRING);
String productId = cell2.getRichStringCellValue().toString();
// read QOH from ninth column
HSSFCell cell5 = row.getCell(5);
BigDecimal quantityOnHand = BigDecimal.ZERO;
if (cell5 != null && cell5.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
if (cell5 != null && cell5.getCellType() == CellType.NUMERIC) {
quantityOnHand = new BigDecimal(cell5.getNumericCellValue());
}
+3 -3
View File
@@ -136,10 +136,10 @@ dependencies {
compile 'org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1'
compile 'org.apache.httpcomponents:httpclient-cache:4.5.4'
compile 'org.apache.logging.log4j:log4j-api:2.10.0' // the API of log4j 2
compile 'org.apache.poi:poi:3.17'
compile 'org.apache.shiro:shiro-core:1.4.0'
compile 'org.apache.tika:tika-core:1.16'
compile 'org.apache.tika:tika-parsers:1.16'
compile 'org.apache.tika:tika-core:1.20'
compile 'org.apache.tika:tika-parsers:1.20'
compile 'org.apache.poi:poi:3.17'
compile 'org.apache.tomcat:tomcat-catalina-ha:9.0.10'
compile 'org.apache.tomcat:tomcat-catalina:9.0.10'
compile 'org.apache.tomcat:tomcat-jasper:9.0.10'