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

Fix Rails path mutation #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

packrat386
Copy link
Contributor

ActionDispatch will mutate the uri of a request before the application
actually gets a chance to see it. This can lead to auth failures where
the client signed with the original version of the path, and the server
is comparing against a mutated version.

Instead for ActionDispatch::Request we should use #original_fullpath,
which is passed to Rails from Rack.

ActionDispatch will mutate the uri of a request before the application
actually gets a chance to see it. This can lead to auth failures where
the client signed with the original version of the path, and the server
is comparing against a mutated version.

Instead for ActionDispatch::Request we should use #original_fullpath,
which is passed to Rails from Rack.
Some versions of Rails (notably 3.0) don't have #originl_fullpath, so we
have to fall back to #fullpath.
@kjg
Copy link
Collaborator

kjg commented Jul 27, 2016

Can you write a spec that can get run through all the request drivers to proves we maintain the trailing slash in each implementation of #request_uri

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