Support Article

Unable to import records from Excel file to decision table

SA-54744

Summary



Decision tables are created and records are exported to an Excel file. After modifying the records, unable to import the records from the Excel file to the decision table. The Excel file has more than 2000 files.


Error Messages



java.io.IOException: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the size of the expanded data. This may indicate that the file is used to inflate memory usage and thus could pose a security risk. You can adjust this limit via ZipSecureFile.setMinInflateRatio() if you need to work with files which exceed this limit. Counter: 1313221, cis.counter: 13114, ratio: 0.009986133331708828Limits: MIN_INFLATE_RATIO: 0.01


Steps to Reproduce

  1. Create a decision table.
  2. Export the table to Excel.
  3. Modify the Excel file to include large amounts of data.
  4. Import the Excel to the decision table.


Root Cause



While importing the Excel sheet, third-party JAR (Apache POI) was used to create a workbook instance. Apache has in-built validation to prevent hacking. If a large number of data is uploaded to the server, it can consume all the server memory and impact server performance. To prevent this, in-built protection gates are created.

One of the parameters is MinInflateRatio. When redundant data is present in an Excel file, the file is compressed by a very high scale while saving. Hence, when the same file is used to retrieve data (during import), it expands with the same scale to prepare the actual file. The Zip bomb detected exception occurs when the expanded file crosses the default MinInflateRatio set in the Apache JAR.


Resolution



Apply HFix-42835.


 
Suggest Edit

Published August 28, 2018 - Updated October 8, 2020

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.