Skip to content

fix: resolve relative redirect locations against the request URL - #572

Merged
Mzack9999 merged 3 commits into
projectdiscovery:mainfrom
hakarrr:fix/relative-redirect
Dec 1, 2026
Merged

Mzack9999 merged 3 commits into
projectdiscovery:mainfrom
hakarrr:fix/relative-redirect

Conversation

@hakarrr

@hakarrr hakarrr commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

When following redirects, only Location values starting with "/" were resolved against the request URL. Other relative forms like "next.html" or "//other/path" were used as-is, so the follow-up request went to the wrong path (or to no host at all).

This resolves relative and scheme-relative redirect locations against the request URL, and adds a regression test (TestRelativeRedirectFollowed).

Related discussion: #571

hakarrr and others added 3 commits November 30, 2026 23:59
Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
fix: resolve relative redirect locations against the request URL

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
@Mzack9999
Mzack9999 merged commit 75dfa72 into projectdiscovery:main Dec 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants