Svante Schubert created ODFTOOLKIT-447:
------------------------------------------

             Summary: Encrypted documents invalid due to misordered manifest 
XML elements
                 Key: ODFTOOLKIT-447
                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-447
             Project: ODF Toolkit
          Issue Type: Bug
          Components: odfdom
            Reporter: Svante Schubert
            Assignee: Svante Schubert


Currently an encyrpted file entry in the manifest.xml looks like:

<manifest:file-entry manifest:full-path="meta.xml" 
manifest:media-type="text/xml" manifest:size="2823">
        <manifest:encryption-data 
manifest:checksum="mIDl6gHPgZTfq24AolQzqe60s88=" 
manifest:checksum-type="SHA1/1K">
                <manifest:algorithm manifest:algorithm-name="Blowfish CFB" 
manifest:initialisation-vector="uBM1fdR60k4="/>
                <manifest:key-derivation manifest:iteration-count="1024" 
manifest:key-derivation-name="PBKDF2" manifest:salt="FVyq8eGe1o5Pz80P9ZEAAw=="/>
                <manifest:start-key-generation manifest:key-size="20" 
manifest:start-key-generation-name="SHA1"/>
        </manifest:encryption-data>
</manifest:file-entry>

The package manifest schema reads like:
<define name="encryption-data">
        <element name="manifest:encryption-data">
                <ref name="encryption-data-attlist"/>
                <ref name="algorithm"/>
                <optional>
                        <ref name="start-key-generation"/>
                </optional>
                <ref name="key-derivation"/>
        </element>
</define>
see 
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-manifest-schema.rng

The latter two child elements of <manifest:encryption-data> have to be switched.

Validated using the ODF online validator 
http://odf-validator.rhcloud.com/
based on our ODF validator project.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to