andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.57k stars 1.08k forks source link

Cannot upload files if filenames contain quotes or backslashes #488

Open JonathanLennox opened 5 years ago

JonathanLennox commented 5 years ago

If a filename contains a quote mark or backslash, dropbox_uploader fails:

$ ./dropbox_uploader.sh upload "testData/J. R. \"Bob\" Dobbs.txt" du_tests/
 > Uploading "/home/jlennox/Git/Dropbox-Uploader/testData/J. R. "Bob" Dobbs.txt" to "/du_tests/J. R. "Bob" Dobbs.txt"... FAILED
An error occurred requesting /upload
Some error occured. Please check the log.

 ./dropbox_uploader.sh upload 'testData/test\atest.txt' du_tests/
 > Uploading "/home/jlennox/Git/Dropbox-Uploader/testData/testtest.txt" to "/du_tests/testtest.txt"... FAILED
An error occurred requesting /upload
Some error occured. Please check the log.

Note that in the latter case, dropbox_uploader's console output is also mangled (it produces beep sounds when the literal \a is interpreted).