dutchcoders / transfer.sh

Easy and fast file sharing from the command-line.
https://github.com/dutchcoders/transfer.sh
MIT License
15.08k stars 1.54k forks source link

Download button fails for names with hash mark (#) #582

Open Ulysses1337 opened 8 months ago

Ulysses1337 commented 8 months ago

Mirror of #213 on the web frontend. If I upload foo#1.txt with curl, the download button gives a 404 because the get link has an unencoded #, so the server will not find /get/hash/foo.

If I upload the same file with the frontend, the download button works, but the filename is truncated at the #.

aspacca commented 8 months ago

@Ulysses1337

thanks for reporting the issue, I was able to reproduce

as you mentionedm for the curl upload with frontend giving 404 the problem is that the file is uploaded as foo%231.txt while the link points to foo#1.txt. I will look into urlencoding the filename in the frontend link. minor thing is that will produce urlencoded url probably for every non-ascii chars, including non latin alphabets

I will look into the js for the part on the frontend truncating at #

aspacca commented 8 months ago

adding that deleting from frontend is broken as well