-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
0.7 escapes safe characters (change in behavior from 0.6) #24
Comments
@geemus would you consider a PR that fixes this regression? This is blocking us from upgrading to Ruby 3, so we would be happy to contribute |
* [fog#24] fixes regression Authored-by: Seth Boyles <[email protected]>
Made a PR anyway: #25 I also added a test that shows the regression. |
* fog#24 fixes regression introduced in 0.7 Authored-by: Seth Boyles <[email protected]>
Hey, thanks. Sorry I think I missed the initial issue as I wasn't actively watching the repo any more. I believe we made those changes in response to the URI method deprecation and didn't intend for it to change behavior, so a more effective fix (and one that doesn't rely on our own regex) sounds great. |
This issue has been marked inactive and will be closed if no further activity occurs. |
Looks like this was closed some time ago by #25 and we must have forgotten to close this issue at the time. |
0.6 used
URI.escape
, which usesURI::DEFAULT_PARSER.regexp[:UNSAFE]
(/[^\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]/
) under the hood to determine which characters to escape. This did not escape characters like forward slashes.The change in 0.7 uses a much simpler regex that will result in URIs like this:
%2Fmy%2Furi
When they used to be result like this:
/my/uri
Is there a reason to escape more characters? We would prefer a non-breaking change that escaped the same characters as 0.6.
The text was updated successfully, but these errors were encountered: