From a229edfd085d88df14eda12838e32a1ed33a28dc Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Mon, 24 Jan 2022 14:31:44 +0100 Subject: [PATCH] feat: restrict obfuscation to font core media types EPUB 3.3 explicitly restricts the font obfuscation algorithm to resources being declared as dont Core Media Types. This commit: - registers obfuscated resources to the OCFPackage when parsing the `encyrption.xml` file (with parsing location) - checks that if obfuscated resources are declared in Package Documents, they have a font core media type - add and tweak tests Fix #1291 --- .../epubcheck/messages/DefaultSeverities.java | 1 + .../adobe/epubcheck/messages/MessageId.java | 1 + .../epubcheck/ocf/EncryptionHandler.java | 8 +++-- .../com/adobe/epubcheck/ocf/OCFChecker.java | 26 +++++++++++++- .../com/adobe/epubcheck/ocf/OCFPackage.java | 34 ++++++++++++++---- .../com/adobe/epubcheck/opf/OPFHandler.java | 4 +++ .../messages/MessageBundle.properties | 3 +- .../epub3/container-publication.feature | 22 +++++++----- .../EPUB/content_001.xhtml | 0 .../EPUB/nav.xhtml | 0 .../EPUB/package.opf | 0 .../META-INF/container.xml | 0 .../META-INF/encryption.xml | 0 .../mimetype | 0 .../EPUB/content_001.xhtml | 11 ++++++ .../EPUB/nav.xhtml | 14 ++++++++ .../EPUB/obfuscated-font.otf | Bin 0 -> 4329 bytes .../EPUB/package.opf | 17 +++++++++ .../META-INF/container.xml | 6 ++++ .../META-INF/encryption.xml | 9 +++++ .../mimetype | 0 .../EPUB/content_001.xhtml | 1 - .../EPUB/doc.xml} | Bin .../EPUB/nav.xhtml | 0 .../EPUB/package.opf | 2 +- .../META-INF/container.xml | 0 .../META-INF/encryption.xml | 2 +- .../ocf-obfuscation-not-font-error/mimetype | 1 + .../ocf-obfuscation-valid/EPUB/package.opf | 2 +- 29 files changed, 141 insertions(+), 23 deletions(-) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/EPUB/content_001.xhtml (100%) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/EPUB/nav.xhtml (100%) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/EPUB/package.opf (100%) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/META-INF/container.xml (100%) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/META-INF/encryption.xml (100%) rename src/test/resources/epub3/files/epub/{ocf-encryption-unknown-error => ocf-encryption-unknown-valid}/mimetype (100%) create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/content_001.xhtml create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/nav.xhtml create mode 100755 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/obfuscated-font.otf create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/package.opf create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/container.xml create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/encryption.xml rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-cmt-error}/mimetype (100%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-font-error}/EPUB/content_001.xhtml (86%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid/EPUB/emoji.svg => ocf-obfuscation-not-font-error/EPUB/doc.xml} (100%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-font-error}/EPUB/nav.xhtml (100%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-font-error}/EPUB/package.opf (90%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-font-error}/META-INF/container.xml (100%) rename src/test/resources/epub3/files/epub/{ocf-obfuscation-svg-valid => ocf-obfuscation-not-font-error}/META-INF/encryption.xml (86%) create mode 100644 src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/mimetype diff --git a/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java b/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java index af871ac41..b9c6629dd 100644 --- a/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java +++ b/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java @@ -302,6 +302,7 @@ private void initialize() severities.put(MessageId.PKG_023, Severity.USAGE); severities.put(MessageId.PKG_024, Severity.INFO); severities.put(MessageId.PKG_025, Severity.ERROR); + severities.put(MessageId.PKG_026, Severity.ERROR); // Resources severities.put(MessageId.RSC_001, Severity.ERROR); diff --git a/src/main/java/com/adobe/epubcheck/messages/MessageId.java b/src/main/java/com/adobe/epubcheck/messages/MessageId.java index 06fb120aa..040920da4 100644 --- a/src/main/java/com/adobe/epubcheck/messages/MessageId.java +++ b/src/main/java/com/adobe/epubcheck/messages/MessageId.java @@ -296,6 +296,7 @@ public enum MessageId implements Comparable PKG_023("PKG-023"), PKG_024("PKG-024"), PKG_025("PKG-025"), + PKG_026("PKG-026"), // Messages relating to resources RSC_001("RSC-001"), diff --git a/src/main/java/com/adobe/epubcheck/ocf/EncryptionHandler.java b/src/main/java/com/adobe/epubcheck/ocf/EncryptionHandler.java index a92caadf5..648e17da2 100644 --- a/src/main/java/com/adobe/epubcheck/ocf/EncryptionHandler.java +++ b/src/main/java/com/adobe/epubcheck/ocf/EncryptionHandler.java @@ -22,14 +22,15 @@ package com.adobe.epubcheck.ocf; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; + +import com.adobe.epubcheck.api.EPUBLocation; import com.adobe.epubcheck.util.HandlerUtil; import com.adobe.epubcheck.xml.XMLElement; import com.adobe.epubcheck.xml.XMLHandler; import com.adobe.epubcheck.xml.XMLParser; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; - public class EncryptionHandler implements XMLHandler { private final OCFPackage ocf; @@ -83,6 +84,7 @@ public void startElement() if (algorithm.equals("http://www.idpf.org/2008/embedding")) { ocf.setEncryption(entryName, new IDPFFontManglingFilter(null)); + ocf.setObfuscated(entryName, parser.getLocation()); } else if (algorithm.equals("http://ns.adobe.com/pdf/enc#RC")) { diff --git a/src/main/java/com/adobe/epubcheck/ocf/OCFChecker.java b/src/main/java/com/adobe/epubcheck/ocf/OCFChecker.java index b5639cec1..836d217fb 100755 --- a/src/main/java/com/adobe/epubcheck/ocf/OCFChecker.java +++ b/src/main/java/com/adobe/epubcheck/ocf/OCFChecker.java @@ -51,9 +51,11 @@ import com.adobe.epubcheck.api.Report; import com.adobe.epubcheck.messages.MessageId; import com.adobe.epubcheck.opf.OPFChecker; +import com.adobe.epubcheck.opf.OPFChecker30; import com.adobe.epubcheck.opf.OPFData; import com.adobe.epubcheck.opf.OPFHandler; import com.adobe.epubcheck.opf.OPFHandler30; +import com.adobe.epubcheck.opf.OPFItem; import com.adobe.epubcheck.opf.ValidationContext; import com.adobe.epubcheck.opf.ValidationContext.ValidationContextBuilder; import com.adobe.epubcheck.util.CheckUtil; @@ -64,6 +66,7 @@ import com.adobe.epubcheck.xml.XMLParser; import com.adobe.epubcheck.xml.XMLValidator; import com.adobe.epubcheck.xml.XMLValidators; +import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.base.Predicates; @@ -349,7 +352,7 @@ else if (!normalizedEntriesSet.add(Normalizer.normalize(entry, Form.NFC))) for (final String entry : ocf.getFileEntries()) { ocf.reportMetadata(entry, report); - + // if the entry is not in the whitelist (META-INF/* + mimetype) // and not declared in (one of) the OPF document(s) if (!entry.startsWith("META-INF/") && !entry.startsWith("META-INF\\") @@ -371,6 +374,27 @@ public boolean apply(OPFHandler opfHandler) report.message(MessageId.OPF_003, EPUBLocation.create(ocf.getName()), entry); } OCFFilenameChecker.checkCompatiblyEscaped(entry, report, validationVersion); + + // check obfuscated resource are Font Core Media Types + if (ocf.isObfuscatedFont(entry)) + { + for (OPFHandler opf : opfHandlers) + { + // try to find the first Package Document where the entry is + // declared + Optional item = opf.getItemByPath(entry); + if (item.isPresent()) + { + // report if it is not a font core media type + if (!OPFChecker30.isBlessedFontType(item.get().getMimeType())) + { + report.message(MessageId.PKG_026, ocf.getObfuscationDeclarationLocation(entry), + item.get().getMimeType(), opf.getPath()); + } + break; + } + } + } } // check all directory entries without duplicates diff --git a/src/main/java/com/adobe/epubcheck/ocf/OCFPackage.java b/src/main/java/com/adobe/epubcheck/ocf/OCFPackage.java index 6821d90af..5747ca203 100644 --- a/src/main/java/com/adobe/epubcheck/ocf/OCFPackage.java +++ b/src/main/java/com/adobe/epubcheck/ocf/OCFPackage.java @@ -4,7 +4,6 @@ import java.io.InputStream; import java.util.Collections; import java.util.HashMap; -import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Set; @@ -26,7 +25,8 @@ public abstract class OCFPackage implements GenericResourceProvider { - final Hashtable enc; + final Map enc = new HashMap<>(); + final Map obfuscated = new HashMap<>(); String uniqueIdentifier; private Report reporter; private final Supplier ocfData = Suppliers.memoize(new Supplier() @@ -72,16 +72,17 @@ public Map get() } }); - public OCFPackage() - { - this.enc = new Hashtable(); - } public void setEncryption(String name, EncryptionFilter encryptionFilter) { enc.put(name, encryptionFilter); } + public void setObfuscated(String name, EPUBLocation location) + { + obfuscated.put(name, location); + } + /** * @param name * the name of a relative file that is possibly in the container @@ -133,6 +134,27 @@ public boolean canDecrypt(String fileName) return filter == null || filter.canDecrypt(); } + /** + * @param path path of the resource to test + * @return true if that resource is encrypted with the font obfuscation algorithm + */ + public boolean isObfuscatedFont(String path) + { + return obfuscated.containsKey(path); + } + + /** + * Returns the location in META-INF/encryption.xml where the given resource + * is declared as an obfuscated font, or null if it is not. + * + * @param path path of the resource to test + * @return the location in META-INF/encryption.xml, or null + */ + public EPUBLocation getObfuscationDeclarationLocation(String path) + { + return obfuscated.get(path); + } + /** * This method parses the container entry and stores important data, but does * /not/ validate the container against a schema definition. diff --git a/src/main/java/com/adobe/epubcheck/opf/OPFHandler.java b/src/main/java/com/adobe/epubcheck/opf/OPFHandler.java index a246236fb..8630119e7 100755 --- a/src/main/java/com/adobe/epubcheck/opf/OPFHandler.java +++ b/src/main/java/com/adobe/epubcheck/opf/OPFHandler.java @@ -127,6 +127,10 @@ public OPFHandler(ValidationContext context, XMLParser parser) this.report = context.report; this.parser = parser; } + + public String getPath() { + return path; + } public boolean getOpf12PackageFile() { diff --git a/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties b/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties index 6b7fd61db..623cf516b 100644 --- a/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties +++ b/src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties @@ -313,7 +313,8 @@ PKG_022=Wrong file extension for image. The image is a "%1$s" file but has the f PKG_023=Validating the EPUB against version 2.0, default validation profile will be used. PKG_024=Uncommon EPUB file extension. PKG_024_SUG=For maximum compatibility, use ".epub". -PKG_025=Publication resource must not be located in the META-INF directory +PKG_025=Publication resource must not be located in the META-INF directory +PKG_026=Obfuscated resource must be a Font Core Media Type (was declared as "%1$s" in "%2$s"). #Resources RSC_001=File "%1$s" could not be found. diff --git a/src/test/resources/epub3/container-publication.feature b/src/test/resources/epub3/container-publication.feature index 1f27ad886..599ecf483 100644 --- a/src/test/resources/epub3/container-publication.feature +++ b/src/test/resources/epub3/container-publication.feature @@ -119,9 +119,10 @@ Feature: EPUB 3 ▸ Open Container Format ▸ Full Publication Checks And the message contains 'expected element "encryption"' And no other errors or warnings are reported - Scenario: Report an unknown encryption scheme + Scenario: Verify encryption can be used + (but file will not be parsed) Given the reporting level is set to INFO - When checking EPUB 'ocf-encryption-unknown-error' + When checking EPUB 'ocf-encryption-unknown-valid' Then info RSC-004 is reported And no other errors or warnings are reported @@ -180,16 +181,21 @@ Feature: EPUB 3 ▸ Open Container Format ▸ Full Publication Checks ## 5. Resource Obfuscation - - Scenario: Verify a publication with obfuscated resource (here a font file) + + Scenario: Verify a publication with obfuscated font When checking EPUB 'ocf-obfuscation-valid' Then no errors or warnings are reported - Scenario: Verify a publication with obfuscation of a usually-parsed resource (here an SVG image) - When checking EPUB 'ocf-obfuscation-svg-valid' - Then info RSC-004 is reported + Scenario: Report an obfuscated font that is not a Core Media Type + When checking EPUB 'ocf-obfuscation-not-cmt-error' + Then error PKG-026 is reported And no errors or warnings are reported - + + Scenario: Report an obfuscated font that is not a font + When checking EPUB 'ocf-obfuscation-not-font-error' + Then error PKG-026 is reported + And no errors or warnings are reported + ## C. the 'application/epub+zip' Media Type diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/content_001.xhtml b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/content_001.xhtml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/content_001.xhtml rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/content_001.xhtml diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/nav.xhtml b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/nav.xhtml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/nav.xhtml rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/nav.xhtml diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/package.opf b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/package.opf similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/EPUB/package.opf rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/EPUB/package.opf diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/META-INF/container.xml b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/META-INF/container.xml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/META-INF/container.xml rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/META-INF/container.xml diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/META-INF/encryption.xml b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/META-INF/encryption.xml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/META-INF/encryption.xml rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/META-INF/encryption.xml diff --git a/src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/mimetype b/src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/mimetype similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-encryption-unknown-error/mimetype rename to src/test/resources/epub3/files/epub/ocf-encryption-unknown-valid/mimetype diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/content_001.xhtml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/content_001.xhtml new file mode 100644 index 000000000..ea29a1610 --- /dev/null +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/content_001.xhtml @@ -0,0 +1,11 @@ + + + + + Minimal EPUB + + +

Loomings

+

Call me Ishmael.

+ + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/nav.xhtml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/nav.xhtml new file mode 100644 index 000000000..240745e63 --- /dev/null +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/nav.xhtml @@ -0,0 +1,14 @@ + + + + + Minimal Nav + + + + + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/obfuscated-font.otf b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/EPUB/obfuscated-font.otf new file mode 100755 index 0000000000000000000000000000000000000000..18ac1fcd7c05c1de79864bf57f49d1020af818d5 GIT binary patch literal 4329 zcmVKLZ*U+IBfRsybQWXdwQbL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@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z000IQNklx3&@_OLg;gc<@klKmJLl)^Aeer>FN$ zPty14g^)kRFpS}FNC*l46vHrV+YZMQLdbA945yOl*r-3(u|J0$;Ru_!aGg1VK=(Rzd&h=qTzQ+TYpP z;hYmfeBaOIa+K0sE(i7}3;52RJ3@%(&!4|~^$N4db=^{_RraY;JCr%jGZ(x3;#nx3?3QSlPp27}~at{n!QtA%tNVhGDeZZ6O4n z1eHof*LBOX7-NbxXv;l}F*tSPiBKV`FRP)l<2cZE90#n$#uamDO|$_tP5b!qW4T;D zK0bc(D?Ne&MW)2C1{reZeflAk~(;#LTH zpdo}1LfE#g>pEOWr~vm$p-@nO*EsYrs%#jBWmz(=m|Cut(we4en)dkd<3^)VDwX7) z=I7_PwzfWe`0!Wqu;1_By?a;Fw7-zjgTVkv2ILat?at1Q+?g)x>+3LZB>Izua}Kjm zN~_gs5CpMID3{9-LN+!wKpAIACvb@YFE1~@fBzmx24F^DEe{_)6hdUPS!7G;ORdly z-}jG>jsPuzyWo@jQHsUlty{N*5T55bj#I1EVwq5{*MmH7wOYz7DFiN27-I<2`&x3vheNpnHJlx>6lxdm5grZzZ-t7v3!`YMGfNm6v#cVdq82k3^+s4Mm zbQ|O3FFs#*VEHeLJ0h+P^c6})$Mj+_}}qz9EQ{4rpG(O-x~@BpBZPqa z1E1Fv#xcw3FfUh#j zkzZR2g#ti!xkq-+^E|-n3giX|F=oIxyKUR(7)-68l&H7ye7Ih(pP!$9{`^@8@#4h` zLdc^>j{tAw^LgL*(VJecx4XN0b#=uU6GA+A@L+p;JEaH&xO#qmUM9&TxzZWSsPMZu zjuWj;5kju6uHX>@ideF@iQ8EDw8P;L5ud_Q(uXUH1~4 + + + Minimal EPUB 3.0 + en + NOID + 2017-06-14T00:00:01Z + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/container.xml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/container.xml new file mode 100644 index 000000000..318782179 --- /dev/null +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/container.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/encryption.xml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/encryption.xml new file mode 100644 index 000000000..3764b5474 --- /dev/null +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/META-INF/encryption.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/mimetype b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/mimetype similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/mimetype rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-cmt-error/mimetype diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/content_001.xhtml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/content_001.xhtml similarity index 86% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/content_001.xhtml rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/content_001.xhtml index 601da6e51..2f8492a6f 100644 --- a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/content_001.xhtml +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/content_001.xhtml @@ -7,6 +7,5 @@

Loomings

Call me Ishmael.

- a smiling emoji diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/emoji.svg b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/doc.xml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/emoji.svg rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/doc.xml diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/nav.xhtml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/nav.xhtml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/nav.xhtml rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/nav.xhtml diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/package.opf b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/package.opf similarity index 90% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/package.opf rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/package.opf index 9f4ba40d7..fb40ce83f 100644 --- a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/EPUB/package.opf +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/EPUB/package.opf @@ -9,7 +9,7 @@ - + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/META-INF/container.xml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/META-INF/container.xml similarity index 100% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/META-INF/container.xml rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/META-INF/container.xml diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/META-INF/encryption.xml b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/META-INF/encryption.xml similarity index 86% rename from src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/META-INF/encryption.xml rename to src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/META-INF/encryption.xml index d172242b5..b25f63d02 100644 --- a/src/test/resources/epub3/files/epub/ocf-obfuscation-svg-valid/META-INF/encryption.xml +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/META-INF/encryption.xml @@ -4,7 +4,7 @@ - + diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/mimetype b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/mimetype new file mode 100644 index 000000000..57ef03f24 --- /dev/null +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-not-font-error/mimetype @@ -0,0 +1 @@ +application/epub+zip \ No newline at end of file diff --git a/src/test/resources/epub3/files/epub/ocf-obfuscation-valid/EPUB/package.opf b/src/test/resources/epub3/files/epub/ocf-obfuscation-valid/EPUB/package.opf index 4d1038448..d0cdd1fbd 100644 --- a/src/test/resources/epub3/files/epub/ocf-obfuscation-valid/EPUB/package.opf +++ b/src/test/resources/epub3/files/epub/ocf-obfuscation-valid/EPUB/package.opf @@ -9,7 +9,7 @@ - +