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

Plugin/Auth/Extensible.pm _default_login_page will call uri_escape() multiple times for return_url #1453

Open
cc-skelos opened this issue Apr 27, 2018 · 1 comment
Labels

Comments

@cc-skelos
Copy link

cc-skelos commented Apr 27, 2018

Granted almost everyone will replace the default login page, this bug is disconcerting when starting to learn authentication and session management for Dancer2.

Once a route is added requiring a role, the user is referred to /login. If an incorrect name/password combination is given the user is referred back to /login agin but uri_escape() is called on request_url again, breaking it in the hidden field although it still looks OK in the browser location bar.

/login, first time: <input type="hidden" name="return_url" value="%2Freport">
/login, second time: <input type="hidden" name="return_url" value="%252Freport">

I'm not nearly sure what the fix should be. Trusting user input? Ah, no. But blindly escaping things twice causes problems too, as when the user supplies a correct username and password they are no longer routed back to the route they started with.

Edit: use sufficient HTML markup to see all the problem report.

@SysPete
Copy link
Member

SysPete commented Apr 27, 2018

Thanks for the bug report @cc-skelos - good catch! I'll have a look at this over the weekend.

@cromedome cromedome added the Bug label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants