-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add redirect capabilities to Invest Controller #627
Conversation
(cherry picked from commit f863efc)
There are some things missing in this PR.
|
@subiabre whenever you can, please |
$return_to = ''; | ||
|
||
if ($request->query->has('return_to')) { | ||
$return_to = rawurldecode($request->query->get('return_to')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not place the url decoding inside the isAllowedDomain
static method? This way we can safely use the functionality without having to worry about the string we are passing to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎩 What? Why?
Please describe your pull request.
Allow the process of invest to return to an outside link.
Testing
Describe the best way to test or validate your PR.
Add the domain you want to be valid to your settings.yml under the 'url' field.
Add a &redirect_to param to the query when accessing the invest landing of any project. Follow the donation flow and get redirected to that url. The host of that url has to match one of the domains configured in the settings, if it's not the redirect won't work.