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

Broken redirect that was _exception #89

Closed
lidel opened this issue Mar 6, 2021 · 0 comments · Fixed by #90
Closed

Broken redirect that was _exception #89

lidel opened this issue Mar 6, 2021 · 0 comments · Fixed by #90
Assignees
Labels
kind/bug A bug in existing code (including security flaws) snapshots issues related to snapshot creation and updates

Comments

@lidel
Copy link
Member

lidel commented Mar 6, 2021

This was found during #61

There is an edge case when exception was resolved by moving _exception/FOO to wiki/BAR/index.html AND it is a redirect at the same time.

While we adjust src and href attributes on regular pages, we do not fix redirect HTML, which produces error by pointing at file one level too deep.

Example:

$ curl https://bafybeiehlicfvvqhauuxyj7ghspu63uv7vlq224aqytcfv5frewve5jxoq.ipfs.dweb.link/wiki/United_States_of_America/
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="refresh" content="0;url=United_States"></head><body></body></html>

Fix is to tweak url inside of content attr and adjust it the same way we do href

@lidel lidel added kind/bug A bug in existing code (including security flaws) snapshots issues related to snapshot creation and updates labels Mar 6, 2021
@lidel lidel self-assigned this Mar 6, 2021
lidel added a commit that referenced this issue Mar 9, 2021
@lidel lidel closed this as completed in #90 Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) snapshots issues related to snapshot creation and updates
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant