diff options
-rw-r--r-- | source/html/epub-doc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c index e77770ac..b7b24c42 100644 --- a/source/html/epub-doc.c +++ b/source/html/epub-doc.c @@ -203,6 +203,11 @@ epub_parse_header(fz_context *ctx, epub_document *doc) char ncx[2048], s[2048]; epub_chapter *head, *tail; + if (fz_has_archive_entry(ctx, zip, "META-INF/rights.xml")) + fz_throw(ctx, FZ_ERROR_GENERIC, "EPUB is locked by DRM"); + if (fz_has_archive_entry(ctx, zip, "META-INF/encryption.xml")) + fz_throw(ctx, FZ_ERROR_GENERIC, "EPUB is locked by DRM"); + /* parse META-INF/container.xml to find OPF */ buf = fz_read_archive_entry(ctx, zip, "META-INF/container.xml"); |