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

check that the manifest must not list the package document itself #1453

Closed
rdeltour opened this issue Dec 8, 2022 · 0 comments · Fixed by #1467
Closed

check that the manifest must not list the package document itself #1453

rdeltour opened this issue Dec 8, 2022 · 0 comments · Fixed by #1467
Assignees
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Milestone

Comments

@rdeltour
Copy link
Member

rdeltour commented Dec 8, 2022

The spec says:

Note that the manifest is not self-referencing: EPUB creators MUST NOT specify an item element that refers to the package document itself.

Currently, EPUBCheck loops indefinitely and finally throws a StackOverflowError when the package document refers to itself. We should catch this.

@rdeltour rdeltour added type: bug The issue describes a bug status: accepted Ready to be further processed labels Dec 8, 2022
@rdeltour rdeltour added this to the v5.0.0-rc milestone Dec 8, 2022
@rdeltour rdeltour self-assigned this Dec 8, 2022
rdeltour added a commit that referenced this issue Dec 23, 2022
This commit adds a new check, reported as `OPF-099` (error), to verify
that the package document `manifest` does not include an `item` element
that refers to the package document itself.

This statement was apparently not checked by EPUBCheck previously. Worse,
the code was entering an infinite loop, as the package document checker
was creating a new checker for itself, recursively.

Fix #1453
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Dec 23, 2022
rdeltour added a commit that referenced this issue Jan 3, 2023
This commit adds a new check, reported as `OPF-099` (error), to verify
that the package document `manifest` does not include an `item` element
that refers to the package document itself.

This statement was apparently not checked by EPUBCheck previously. Worse,
the code was entering an infinite loop, as the package document checker
was creating a new checker for itself, recursively.

Fix #1453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant