dennisv / django-storage-swift

OpenStack Swift storage backend for Django
MIT License
86 stars 59 forks source link

Properly encode resource names with unicode characters. #87

Closed Roadmaster closed 7 years ago

Roadmaster commented 7 years ago

We observed that filenames with non-ascii characters are properly saved to swift and stored in the database, but when trying to construct the url, the _path method's call to quote() results in KeyErrors if the argument is a string containing non-ascii. This encodes the name with utf-8 so we always pass "bytes" to quote().

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 97.826% when pulling b1baf181e7e41969bfda6758fa2ed1837c1d214f on Roadmaster:encode-unicode-names into e2618ea1266f5f0a7368081ff1c33cf1b0117f0b on blacktorn:master.