name property in /renter/backups/create is not properly escaped
BUG REPORT
Stack Trace or error message
/renter/backups/create: 400 - {"message":"failed to create backup: open /var/folders/46/jpxl8w290zndxqp1svtb9b880000gn/T/sia-backup941882399/SiaStream 14/07/2020 12:40:47-KLPQNDWXB37743MDOKCH.bak: no such file or directory"}
Expected Behavior
POST /renter/backups/create
with name = "SiaStream 14/07/2020 12:40:47"
should be persisted properly
Observed Behavior
When using a name with /
, siad doesn't escape it properly when using it as a part of the file path and throws "no such file or directory" error.
How to reproduce it (as minimally and precisely as possible)
POST /renter/backups/create
with name = "SiaStream 14/07/2020 12:40:47"
Environment
- Sia version: 1.5.0-master (from master branch)
- OS: macos