dc:identifier line being removed from content.opf

Bug #1847890 reported by David Bowerman on 2019-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Adobe uses a line similar to: <dc:identifier opf:scheme="UUID">urn:uuid:e6f8cedf-f756-4a24-8f2e-7fa9b76de736</dc:identifier> for removing obfuscation from Adobe style obfuscated fonts. Calibre removes this line when metadata is updated. I noted it using the ModifyEpub plugin however it also disappeared when using calibre's editor or Polish.

Calibre version is 4.1
OS is Windows 10 x64

Easy enough to duplicate. I used Sigil to add the dc:identifier line back to content.opf, checked and fonts were okay. If I updated the metadata before opening the book using ModifyEpub or Polish, calibre's editor popped up an error about the obfuscation key being missing.

Attach an EPUB file demonstrating/reproducing the problem to this bug report. You can do that by clicking the "Add attachment or patch" link at the bottom of the bug's page. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny yellow icon next to "This report contains Public information" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
David Bowerman (dbowerman) wrote :

I've attached two epubs.

The first attached epub has two fonts that are using Adobe obfuscation. If calibre updates the metadata, the <dc:identifier opf:scheme="UUID">urn:uuid:ef424b40-3f28-4fc6-ba08-2930290145bc</dc:identifier> line is removed from content.opf and the fonts are unusable.

The second attached epub with polished in it's name is the result of running Polish with update metadata ticked which removes the dc:identifier line.

David Bowerman (dbowerman) wrote :

Sorry but I didn't realize that I was limited to one attachment per comment. This comment has the first epub with the dc:identifer line intact.

The first attached epub has two fonts that are using Adobe obfuscation. If calibre updates the metadata, the <dc:identifier opf:scheme="UUID">urn:uuid:ef424b40-3f28-4fc6-ba08-2930290145bc</dc:identifier> line is removed from content.opf and the fonts are unusable.

The second attached epub with polished in it's name is the result of running Polish with update metadata ticked which removes the dc:identifier line.

Kovid Goyal (kovid) wrote :

The obfuscation key has to come from the package uid. Not just any
identifier with scheme UUID. In the attached EPUB the package identifier
is

<dc:identifier id="uid">3500794507</dc:identifier>

you can tell what it is by looking at the unique-identifier attribute on
the <package> tag. This identifier is not touched by calibre during
metadata operations. Random other identifiers are changed and cannot be
used for font obfuscation anyway. To fix you issue, move id="uid" into
the UUID identifier.

 status invalid

Changed in calibre:
status: Incomplete → Invalid
Kovid Goyal (kovid) wrote :

Actually, I guess I could make the metadata update a little smarter, to
preserve scheme="UUID" identifiers in EPUB 2 files, if Adobe font obfuscation
is present.

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers