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
download_strategy: fix bad unescaping in basename parsing #15258
download_strategy: fix bad unescaping in basename parsing #15258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a good improvement. Make sure that all the uses of AbstractFileDownloadStrategy#parse_basename
will work with the new method though.
I wrote a small script to compare the old and new #parse_basename
results and they're pretty similar. All of the differences seem to make sense too. It seems like it fixes the following problem too.
Before | After |
---|---|
file=lft-3.91.tar.gz | lft-3.91.tar.gz |
file=libnatpmp-20150609.tar.gz | libnatpmp-20150609.tar.gz |
I wonder if it makes sense to add some tests for this method as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far, thanks @Bo98!
Thanks! Looks like no regressions here which is good to hear. |
062057c
to
6cf18e3
Compare
Thanks again @Bo98! |
Fixes the core issue causing #15235.
URI.decode_www_form_component
over the whole URL - only run that on query string parts and run other URI unescape methods on the path part