Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-402

ZipException on encrypted files: only DEFLATED entries can have EXT descriptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • odfdom
    • None

    Description

      Any encrypted ODF file written by LibreOffice reproducibly fails to open:

      Document document = Document.loadDocument(new File(args[0]), "abc");

      due to an exception produced early in parsing the ZIP file. The exception is masked by the NullPointerException in the exception handler as per ODFTOOLKIT-401, but if that is patched, the original exception is this:

      java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor
      at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:309)
      at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:121)
      at ReadZip.entriesToMap(ReadZip.java:64)
      at org.odftoolkit.odfdom.pkg.ZipHelper.entriesToMap(ZipHelper.java:87)
      at org.odftoolkit.odfdom.pkg.OdfPackage.readZip(OdfPackage.java:443)
      at org.odftoolkit.odfdom.pkg.OdfPackage.initializeZip(OdfPackage.java:422)
      at org.odftoolkit.odfdom.pkg.OdfPackage.<init>(OdfPackage.java:250)
      at org.odftoolkit.odfdom.pkg.OdfPackage.loadPackage(OdfPackage.java:405)
      at org.odftoolkit.simple.Document.loadDocument(Document.java:351)
      at local.Main.main(Main.java:21)

      Attachments

        1. use-zipfile.patch
          1 kB
          Damjan Jovanovic
        2. helloEncrypted.odt
          12 kB
          Svante Schubert

        Activity

          People

            Unassigned Unassigned
            damjan Damjan Jovanovic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: