-
Notifications
You must be signed in to change notification settings - Fork 1
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
IBX-7044: Added dynamic route to settings submit form #72
base: 4.6
Are you sure you want to change the base?
Conversation
@@ -112,6 +112,19 @@ public function updateAction(Request $request, UpdateView $view) | |||
]); | |||
} | |||
|
|||
if ($request->query->has('route')) { |
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.
Where this route
param is populated?
Also, I guess return url being part of form make more sense.
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.
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.
I would suggest, at least, to change route
name parameter as it really confusing. How abour return_route_name
?
Not sure about it, but what about generating that whole URL in js, and just pass it here instead of route with params?
@dew326
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.
I think both solutions are valid. If you think it will be cleaner that way I'm ok with that change.
51617d9
to
6f36183
Compare
a072b77
to
6f36183
Compare
@alongosz Pointed possible danger while sending whole url to backend. So I stay with solution while passing route with parameters, which is safer solution. |
The point there was rather to sanitize input and/or attach path & query part to the current request. Now we might have different bug. What would happen if you pass existing route name different than expected, which has different parameters? |
I agree with Alongosz here, @Gengar-i. Route has to be checked before redirection - that it exists and can be created with those route parameters. You could fall back to a default redirect if they do not. |
Quality Gate passedIssues Measures |
Suggestion of solution.
Added dynamic route to settings submit form
I know passing url breaks security and it suppose to be done differently.
Checklist:
$ composer fix-cs
)