Skip to content

Epubcheck 5.2.1 java.lang.IllegalArgumentException for the same EncryptedData twice #1607

Closed

Description

@JackieFei

Hi,

rename IllegalArgumentException.zip to .epub

This is a sample subset epub from my customer, and seems to be made by Adobe InDesign 17.3, then modified by calibre:186.

Epubcheck 5.2.1 throw a Exception :

java.lang.IllegalArgumentException: Multiple entries with same key: https://b73edd61-1c05-4a6b-ae09-fcc19ddf1940.epubcheck.w3c.org/OEBPS/font/AdobeFangsongStd-Regular.otf=com.adobe.epubcheck.ocf.encryption.IDPFFontManglingFilter@6e41ba2 and https://b73edd61-1c05-4a6b-ae09-fcc19ddf1940.epubcheck.w3c.org/OEBPS/font/AdobeFangsongStd-Regular.otf=com.adobe.epubcheck.ocf.encryption.IDPFFontManglingFilter@dfa9893
	at com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:378)
	at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:372)
	at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:246)
	at com.google.common.collect.RegularImmutableMap.fromEntryArrayCheckingBucketOverflow(RegularImmutableMap.java:133)
	at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:95)
	at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:572)
	at com.google.common.collect.ImmutableMap$Builder.buildOrThrow(ImmutableMap.java:600)
	at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:587)
	at com.adobe.epubcheck.ocf.OCFContainer.<init>(OCFContainer.java:77)
	at com.adobe.epubcheck.ocf.OCFContainer$Builder.build(OCFContainer.java:56)
	at com.adobe.epubcheck.ocf.OCFCheckerState.getContainer(OCFCheckerState.java:157)
	at com.adobe.epubcheck.ocf.OCFChecker.checkOtherMetaFiles(OCFChecker.java:492)
	at com.adobe.epubcheck.ocf.OCFChecker.check(OCFChecker.java:159)
	at com.adobe.epubcheck.api.EpubCheck.doValidate(EpubCheck.java:218)
	at com.adobe.epubcheck.tool.EpubChecker.validateFile(EpubChecker.java:253)
	at com.adobe.epubcheck.tool.EpubChecker.processFile(EpubChecker.java:328)
	at com.adobe.epubcheck.tool.EpubChecker.run(EpubChecker.java:151)
	at com.adobe.epubcheck.tool.Checker.main(Checker.java:31)

It's caused by encryption.xml

<encryption xmlns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
	<enc:EncryptedData>
		<enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding" />
		<enc:CipherData>
			<enc:CipherReference URI="OEBPS/font/AdobeFangsongStd-Regular.otf" />
		</enc:CipherData>
	</enc:EncryptedData>
	<enc:EncryptedData>
		<enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding" />
		<enc:CipherData>
			<enc:CipherReference URI="OEBPS/font/AdobeFangsongStd-Regular.otf" />
		</enc:CipherData>
	</enc:EncryptedData>
</encryption>

AdobeFangsongStd-Regular.otf exists once is OK (in fact is only INFO(RSC-004)), twice is IllegalArgumentException.

Activity

  1. rdeltour commented on Apr 14, 2025

    @rdeltour
    Member

    Thanks for the report, I'll look into it!

  2. self-assigned this
    on Apr 14, 2025
  3. added theissue type on Apr 14, 2025
  4. added 3 commits that reference this issue on Sep 1, 2025
    6d845a7
    0817931
    60a6d6c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: acceptedReady to be further processedtype: bugThe issue describes a bug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址