-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fail for references to files outside of the repo #138
Milestone
Comments
Sorokin-Anton
added a commit
that referenced
this issue
Sep 16, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories Solution
Sorokin-Anton
added a commit
that referenced
this issue
Sep 19, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
8 tasks
Sorokin-Anton
added a commit
that referenced
this issue
Sep 21, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Sep 23, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
Sorokin-Anton
added a commit
that referenced
this issue
Sep 23, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Sep 26, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
Sorokin-Anton
added a commit
that referenced
this issue
Sep 26, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Sep 26, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 3, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
Sorokin-Anton
added a commit
that referenced
this issue
Oct 3, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 3, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 3, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 3, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 10, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
Sorokin-Anton
added a commit
that referenced
this issue
Oct 10, 2022
Sorokin-Anton
added a commit
that referenced
this issue
Oct 10, 2022
Problem: as in #138, when we see a local link, we are checking only existance of referred file, not checking that this file is a part of repo and link will compatible with Github's renderer Solution: manually count "nesting levels" of all local links, checking that number of `".."`'s is always less then number of real directories
Sorokin-Anton
added a commit
that referenced
this issue
Oct 10, 2022
…utside-repo [#138] Report links that escape repo directory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clarification and motivation
Given the following file structure:
Say the file
a.md
in repo1 contains a reference to a file in repo2, e.g.[some text](../repo2/c.md)
.At the moment, if I run
xrefcheck
in repo1, it'll succeed - but it shouldn't.The link in
a.md
points to a file outside of the repo's root (/dev/repo1
). When the repo is pushed to github, and the markdown file is rendered by github, the link will be broken.As such, xrefcheck should report this link as broken.
Additionally, pretend
a.md
had a link such as../repo1/c.md
.Locally, that path does point to a file inside the repo root. However, that won't work when the markdown file is rendered by github.
We should report this type of links as broken as well.
Same for
../repo2/../repo1/c.md
and similar shenanigans.Note: the error message should be very clear about why this link is being reported as broken.
Acceptance criteria
The text was updated successfully, but these errors were encountered: