0

When I'm trying to extract Excel to .csv with ConvertExcelToCSVProcessor I got an error:

IOException thrown from ConvertExcelToCSVProcessor[id=b2f4320e-902a-1b61-0000-00006ed1ed34]: 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. Uncompressed size: 16640363, Raw/compressed size: 166400, ratio: 0.010000 Limits: MIN_INFLATE_RATIO: 0.010000, Entry: xl/pivotCache/pivotCacheRecords1.xml

I read about this problem, for example: Using Apache POI - Zip Bomb detected. But How can I fix this with Apache NiFi? I should write own custom processor with this option?

fujidaon
  • 355
  • 1
  • 6
  • 1
    NiFi would have to add a property to that processor to allow configuration of the Minimum Inflate Ratio and apply that before opening the workbook. I have written up https://issues.apache.org/jira/browse/NIFI-11787 to cover this improvement. – mattyb Jul 07 '23 at 15:33
  • Thanks! I'll wait for this, but for now I already have made a custom processor based on default processor for this option :) – fujidaon Jul 07 '23 at 15:40
  • 1
    We're dealing with an issue in the aforementioned Jira since the solution is to set a static variable on a class. For a custom processor you might not care but it seems possible if you have multiple instances of a processor that calls that static method that it can be overwritten and you might see failures unless the setting is supposed to be the same across instances of the processor. – mattyb Jul 09 '23 at 23:12

0 Answers0