agamez26 / epubcheck

Automatically exported from code.google.com/p/epubcheck
0 stars 0 forks source link

IDPF encrypted fonts fail validation in 3.0RC1 #220

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by ch...@hexforge.co.uk on 8 Nov 2012 at 5:26

Attachments:

GoogleCodeExporter commented 9 years ago
Chris, thanks for the sample. 

Original comment by markus.g...@gmail.com on 29 Nov 2012 at 2:04

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r388.

Original comment by rdeltour@gmail.com on 29 Nov 2012 at 2:33