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

Prevent invalid query strings in referrers from erroring #239

Merged
merged 1 commit into from May 22, 2015
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented May 22, 2015

For certain referrer URLs eg Taxed%20to%2, Rack::Utils.parse_query(uri.query) throws an ArgumentError: invalid %-encoding.

Because this is mostly an enhancement to the table, rather than attempt to decode the query correctly, return a nil search term.

Interestingly, before Ruby 2.1 this URL would have thrown URI::InvalidURIError and the error would have been caught.

A discussion on the nuances of this issue can be found here:
rack/rack#337

cc @benilovj @boffbowsh

For certain referrer URLs  eg `Taxed%20to%2`,
`Rack::Utils.parse_query(uri.query)` throws an ArgumentError: `invalid
%-encoding`.

Because this is mostly an enhancement to the table, rather than attempt
to decode the query correctly, return a nil search term.

A discussion on the nuances of this issue can be found here:
rack/rack#337
@boffbowsh
Copy link
Contributor

@boffbowsh boffbowsh commented May 22, 2015

LGTM 👍

benilovj added a commit that referenced this pull request May 22, 2015
Prevent invalid query strings in referrers from erroring
@benilovj benilovj merged commit fef300f into master May 22, 2015
1 check passed
1 check passed
default "Build #223 succeeded on Jenkins"
Details
@benilovj benilovj deleted the referrer-fix branch May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.