libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami opened a new pull request #1457: Don't encode ~ in the object name in the S3 driver
Date Sun, 03 May 2020 20:07:53 GMT

Kami opened a new pull request #1457:
URL: https://github.com/apache/libcloud/pull/1457


   This pull request addresses the issue reported in #1452.
   
   It makes sure we don't url encode ``~`` character in the internal driver ``_clean_object_name``
method.
   
   I tested the change and verified it works for objects with ``~`` in the name.
   
   ## Background, Context
   
   @mmilitzer reported this issue in 1452.
   
   I was able to replicate the bug in the S3 driver.
   
   As far as changed Python 3 behavior goes - I tested it using Python 3.6 and ``~`` is still
url encoded by default.
   
   It looks like the change itself was introduced in 3.7 - https://github.com/python/cpython/commit/21024f06622c4c55b666adb130797a4ee205d005#diff-67a4980d053b561c26794c63eb5ac1deR461.
   
   That's why I decided it's safer to only make that change in the S3 driver to begin with.
   
   Doing it inside our ``urlquote`` wrapper may be too risky - who knows how many provider
APIs (if any) on ``~`` being encoded as ``%7E``.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message