Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on EPUB with OTF obfuscated fonts #2

Closed
vdaubry opened this issue Apr 3, 2013 · 6 comments
Closed

Crash on EPUB with OTF obfuscated fonts #2

vdaubry opened this issue Apr 3, 2013 · 6 comments

Comments

@vdaubry
Copy link

vdaubry commented Apr 3, 2013

Hi,

The SDK crashes when opening epub with OTF obfuscated fonts such as this one :

https://code.google.com/p/epub-samples/downloads/detail?name=wasteland-otf-obf-20120118.epub

I tracked down the crash to EncryptionInfo.cpp:32

It throws an invalid_argument error "Node does not contain enc:EncryptionMethod with an Algorithm attribute".

The META-INF/encryption.xml seems valid and contains the algrotihm :

<enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
        <enc:CipherReference URI="OEBPS/fonts/jGaramond.ttf"/>
    </enc:CipherData>
</enc:EncryptedData>

Vincent

@AlanQuatermain
Copy link
Member

Thanks Vincent, I'll take a look at this directly. I fixed something in the FontObfuscation filter the other day, but this one I wasn't aware of.

@rkwright
Copy link
Member

rkwright commented Apr 3, 2013

Thanks Jim. If you can't get to it right away, let me know and I will be
happy to file and issue on it.

Ric

From: Jim Dovey notifications@github.com
Reply-To: readium/readium-sdk
<reply+i-12758508-8d18cb381b09be7154f6d401f5cddc199138d7f9-3025864@reply.git
hub.com>
Date: Wednesday, April 3, 2013 10:45 AM
To: readium/readium-sdk readium-sdk@noreply.github.com
Subject: Re: [readium-sdk] Crash on EPUB with OTF obfuscated fonts (#2)

Thanks Vincent, I'll take a look at this directly. I fixed something in the
FontObfuscation filter the other day, but this one I wasn't aware of.


Reply to this email directly or view it on GitHub
#2 (comment) .

@AlanQuatermain
Copy link
Member

I think I've fixed it— just have to try it out now, so I'm doing a unit test.

@rkwright
Copy link
Member

rkwright commented Apr 3, 2013

OK, great. Thanks

From: Jim Dovey notifications@github.com
Reply-To: readium/readium-sdk
<reply+i-12758508-8d18cb381b09be7154f6d401f5cddc199138d7f9-3025864@reply.git
hub.com>
Date: Wednesday, April 3, 2013 10:48 AM
To: readium/readium-sdk readium-sdk@noreply.github.com
Cc: Ric Wright rkwright@geofx.com
Subject: Re: [readium-sdk] Crash on EPUB with OTF obfuscated fonts (#2)

I think I've fixed it‹ just have to try it out now, so I'm doing a unit
test.


Reply to this email directly or view it on GitHub
#2 (comment) .

@vdaubry
Copy link
Author

vdaubry commented Apr 3, 2013

Thanks for answering so fast.

@AlanQuatermain
Copy link
Member

This is fixed in commit 9af2864 on the develop branch. Note that the content loading system isn't implemented yet, so all filters have to be applied to data manually at present (look at the unit test for an example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants