这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@h1xxx
Copy link
Contributor

@h1xxx h1xxx commented Feb 19, 2022

Recursion does not work when the user provides port information in the URL and the site returns redirection status code (3xx) with a Location header containing absolute URL path. Bug (#377).

Line responsible:

redirectLocation = baseUrl.ResolveReference(redirectUrl).String()

This line drops the port info when redirectUrl is an absolute path and is the same as baseUrl.
This PR fixes the bug by making sure that the above situation is handled differently than when the redirectUrl contains a relative path.

@h1xxx h1xxx changed the title Fix a recursion bug when redirected to the same domain and a port was… Fix a recursion bug (#377) Feb 19, 2022
… specified (#377)

This fixes the situation where the URL port is specified from the
command line and the "Location" redirection header contains an
absolute URL path.
Copy link
Member

@joohoi joohoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM!

@joohoi joohoi merged commit 571b339 into ffuf:master Mar 6, 2022
@h1xxx h1xxx deleted the bug/recursion_port_bug branch March 6, 2022 16:45
joohoi pushed a commit that referenced this pull request Feb 3, 2023
… specified (#377) (#522)

This fixes the situation where the URL port is specified from the
command line and the "Location" redirection header contains an
absolute URL path.
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