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

[6.x] Throw an exception when signing route if a parameter key is 'signature' #30444

Conversation

martinhinrichs
Copy link
Contributor

Following up on #30439. This makes UrlGenerator->signedRoute throw an InvalidArgumentException when the passed $parameters array contains the key 'signature'.

@martinhinrichs martinhinrichs changed the title Throw an exception when signing route if a parameter key is 'signature' [6.x] Throw an exception when signing route if a parameter key is 'signature' Oct 28, 2019
@SjorsO
Copy link
Contributor

SjorsO commented Oct 28, 2019

It would be better if the error message was more helpful. Maybe something like: "Your route has a parameter named 'signature'. This is a reserved name when using signed routes. Please rename the route parameter."

@taylorotwell taylorotwell merged commit 3d9b268 into laravel:6.x Oct 28, 2019
@martinhinrichs martinhinrichs deleted the signed_route_signature_parameter_exception branch October 28, 2019 12:58
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.

3 participants