Handling of filenames with umlauts and other special characters #1017
Labels
discussion
These topics must be discussed before completion
Priority: High
After critical issues are fixed, these should be dealt with before any further issues.
security
For security related bugs
Milestone
This problem currently exists in ViUR.
A file named
testupload- ö ä -(123).txt
should be uploaded.testupload- ö ä -(123).txt
is selected or dropped.file/getUploadURL
is being called with this filename, and generates an upload URL to Google Cloud Storage with the cloud bucket and file pathproject-id.appspot.com/06eJqwTaFo8JO/source/testupload-%20%C3%B6%20%C3%A4%20-%28123%29.txt
.This first sanitizes the filename to the above filename form (source).
pending
in (source):file/add
is being called with the key of the file leaf skel created byfile/getUploadURL
. This now reads the Google Cloud storage object blob and extracts the filename again from it (source):Wow! Such a nicely resolved piece of code.
string unescaping
is not enough, as the filename is URL-encoded. Why? For security reasons?In the end, this entire stuff is inconsistent and breaks the filename.
testupload- ö ä -(123).txt (pending)
skel["name"]
being created fromblob.name
? Why is06eJqwTaFo8JO/source/testupload-%20%C3%B6%20%C3%A4%20-%28123%29.txt
turned intotestupload-%20%C3%B6%20%C3%A4%20-%28123%29.txt
and then the URL-escaped string isutils.escapeString
ed again. Is this extra-secure? Why not just use the original filename provided before without the(pending)
-postfix, and this, as normal forStringBone
content, is required to beutils.escapeString
ed.The text was updated successfully, but these errors were encountered: