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

Path names containing spaces cause an infinite redirect loop #1151

Closed
ifree opened this issue Mar 27, 2024 · 1 comment · Fixed by #1155
Closed

Path names containing spaces cause an infinite redirect loop #1151

ifree opened this issue Mar 27, 2024 · 1 comment · Fixed by #1155
Assignees
Labels
bug Something isn’t working

Comments

@ifree
Copy link

ifree commented Mar 27, 2024

I think the root cause is due to the fact that an escaped path name containing spaces will never be equal to the original path name.

framework/src/preview.ts

Lines 174 to 179 in 0186815

const normalizedPathname = config.md.normalizeLink(pathname);
if (pathname !== normalizedPathname) {
res.writeHead(302, {Location: normalizedPathname + url.search});
res.end();
return;
}

@Fil Fil added the bug Something isn’t working label Mar 27, 2024
@Fil
Copy link
Contributor

Fil commented Mar 27, 2024

related to #783

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants