Skip to content

IDPF encrypted fonts fail validation in 3.0RC1 #220

@rdeltour

Description

@rdeltour

From ch...@hexforge.co.uk on November 08, 2012 18:26:33

PROBLEM: If fonts are obfuscated using the IDPF method, a warning appears during validation:

Epubcheck Version 3.0-RC-1

Validating against EPUB version 2.0
WARNING: ../encrypted_sample.epub: resource OEBPS/Fonts/Avenir-Roman.otf cannot be decrypted

Check finished with warnings or errors METHOD: 1. Create an epub containing at least one IDPF-obfuscated font, with the appropriate META-INF/encryption.xml file
2. Validate with 3.0RC1 or 3.0b5, and observe the warning above.
3. Validate with 3.0b4, and no warning appears RESULT: An unexpected warning occurs EXPECTED: I expected the epub to validate without warnings. PLATFORM: The incorrect warning appears in 3.0b5 and 3.0RC1. It works correctly in 3.0b4.
Running on MacOS 10.7.5 ADDITIONAL INFO: I downloaded the source for RC1 and stepped through the encryption validation. It appears that com.adobe.epubcheck.ocf.EncryptionHandler constructs IDPFFontManglingFilter with a null parameter. This causes the filter to always return False from canDecrypt, resulting in the warning.

The attached example epub demonstrates the problem - it validates cleanly with 3.0b4, but fails with the decryption warning in 3.0b5 and 3.0RC1. For licensing reasons, the OTF file included is not a real font, but since epubcheck doesn't actually examine the font data, I believe it's valid for the purposes of reproducing the issue.

Attachment: encrypted_sample.epub

Original issue: http://code.google.com/p/epubcheck/issues/detail?id=220

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions