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

Document.loadDocument(File file, String password) doesn't work for encrypted ods file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.6.2-incubating
    • odfdom
    • None
    • Redhat7/Libreoffice4.1/Eclipse3.8/Java1.7

    Description

      Referenced jar:
      -odfdom-java-0.8.10-incubation-SNAPSHOT-jar-with-dependencies.jar
      -simple-odf-0.8.1-incubation-SNAPSHOT-jar-with-dependencies.jar

      Steps:
      1. Save a .ods file with password manually
      2. Execute API "SpreadsheetDocument.load(filePath, password)", it throws NullPointerException.

      Reason:
      1. In org.odftoolkit.odfdom.pkg.ZipHelper.line87, "System.getProperty("Java.version")" returns null, then it cause NPE. Obviously, the parameter here should use "java.version" instead.
      2. The key point is line83, "inputStream.getNextEntry()" throws java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor.

      Remark:
      If use API Document.save(File file, String password) to save a new ods file with password, then invoke Document.loadDocument(File file, String password), it works.

      Attachments

        Activity

          People

            svanteschubert Svante Schubert
            william.zhang william zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: