-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
8000
Redirect URLs not starting with '/' get dropped #46533
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
Labels
Comments
Would you like to give this a try and send a PR fixing this? |
Given the check in PR welcome indeed. |
UFTimmy
pushed a commit
to UFTimmy/symfony
that referenced
this issue
Jul 26, 2022
fabpot
added a commit
that referenced
this issue
Jul 29, 2022
…m Ward) This PR was merged into the 4.4 branch. Discussion ---------- [Security] Allow redirect after login to absolute URLs | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46533 | License | MIT | Doc PR | Fixes the regression introduced by #46317, and once again allows absolute URLs to be the target of authentication redirection, as specified in the documentation (https://symfony.com/doc/current/security/form_login.html#changing-the-default-page) Commits ------- b9901aa [Security] Allow redirect after login to absolute URLs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected
4.4.42
Description
By fixing bug #46317 a new bug was introduced. If a _target_path starts with 'http' or 'https' it gets dropped and the default location is returned. Using the Referer should still work.
How to reproduce
In a login form allowing _target_path, modify the value to send a value which starts with http or https.
Possible Solution
Simply modify the check to see, if it is a valid URL. Something like this could work:
Additional Context
No response
The text was updated successfully, but these errors were encountered: