[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    [Bug 65701] New: Encrypted excel file is corrupt if Saxon is default transformer and EncryptionMode.
From:       bugzilla () apache ! org
Date:       2021-11-24 14:28:24
Message-ID: bug-65701-47293 () https ! bz ! apache ! org/bugzilla/
[Download RAW message or body]

https://bz.apache.org/bugzilla/show_bug.cgi?id=65701

            Bug ID: 65701
           Summary: Encrypted excel file is corrupt if Saxon is default
                    transformer and EncryptionMode.agile is used
           Product: POI
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POIFS
          Assignee: dev@poi.apache.org
          Reporter: bernhard.schuhmann@jedox.com
  Target Milestone: ---

Created attachment 38101
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38101&action=edit
Corrupt excel file - use 'test' as password.

If Saxon is on the classpath or javax.xml.transform.TransformerFactory is set
to net.sf.saxon.TransformerFactoryImpl and EncryptionMode.agile is used for
encryption, excel files generated by POI are corrupt and Excel fails to open
them.

The encryption info in the encrypted file has an empty namespace for element
KeyData: ...<keyData xmlns="" blockSize=...

This might be caused by org.apache.poi.poifs.crypt.agile.KeyData.write() (and
probably other places) using Document.createElement() instead of
Document.createElementNS().

This only seems to be an issue with Saxon as child nodes without namespace
don't inherit their parents' namespace. Other transformer implementations
(Xalan) behave differently, there's no xmlns="" in the generated XML and Excel
is able to open them.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic