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

Paths with excess routing data should not be permitted #20

Open
bparks opened this issue Oct 2, 2015 · 1 comment
Open

Paths with excess routing data should not be permitted #20

bparks opened this issue Oct 2, 2015 · 1 comment

Comments

@bparks
Copy link
Owner

bparks commented Oct 2, 2015

For instance /home/ and /home/index should both be valid and should be equivalent, but /home/index/does/not/exist should not be a valid path

@bparks
Copy link
Owner Author

bparks commented Oct 18, 2015

This requires tests to be written against more than just the routing code. The path should result in a 404 if and only if there is excess routing information after it has already been resolved to a Controller/Action and the action method is not a __call method and the action method does not take $opts.

In the case of a __call method, it is the responsibility of the ResourceController to determine if there is excess routing information based on the method that gets called. This almost calls for a refactoring of the routing logic to include some in individual controllers. (ugh!)

In the case of action methods that take $opts, it is their responsibility to validate the $opts.

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

No branches or pull requests

1 participant