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

Revert RedirectResponse changes #1504

Merged
merged 2 commits into from
Nov 18, 2018

Conversation

jim-parry
Copy link
Contributor

Address issue raised in #1501 #1492

@jim-parry jim-parry merged commit 4594b8e into codeigniter4:develop Nov 18, 2018
@@ -818,7 +818,7 @@ function redirect(string $uri = null)

if (! empty($uri))
{
return $response->route($uri);
Copy link
Member

Choose a reason for hiding this comment

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

This was originally forced to use route instead of to to make it difficult to redirect to pages outside the site on accident. This was inspired by OWASP's 2013 Top 10 list, Unvalidated Redirects and Forwards. It is no longer in the Top 10 list, but still a decent security precaution, I believe.

@jim-parry
Copy link
Contributor Author

It was originally ->to)_, and I changed it to route(), which made more sense to me.
This got reverted to to() trying to nail down the culprit for the blank pages, but this wasn't the cause.
Are you suggesting this should remain on "route()" when the dust settles?

@jim-parry jim-parry deleted the testing11/http branch November 19, 2018 04:15
@lonnieezell
Copy link
Member

I think it's a good security thing, yes, even though it might be a bit less user-friendly. I'm not 100% convinced it's crucial so if it causes issues with users, i'm fine leaving it at to and letting them control their own fate. It's simpler to use that way.

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