Web GUI cannot download file from folder with square brackets in its name
#6,893 opened on 2023/03/25
Repository metrics
- Stars
- (57,185 個のスター)
- PR merge metrics
- (平均マージ 32d 20h) (30d で 23 merged PRs)
説明
Steps to reproduce:
- Create directory with name
[test], and a file namedfile.txtin it. - Serve Web GUI with command:
rclone rcd --rc-no-auth --rc-web-gui - Navigate Web GUI: Explorer tab > your remote > directory
[test]- I use local disk for testing, and have a remote configured called "local" which I select here.
- Click the file
file.txtto start download. - Server console has error:
ERROR : rc: "]/file.txt": error: failed to find object: object not found
The web gui sends a HTTP GET request with URL http://127.0.0.1:5572/[local:[test]]/file.txt in this case. If I manually send a request for the same file using a different url http://[127.0.0.1:5572/[local:.]/[test]/file.txt then that finds the file correctly.
This is a limitation of the --rc-serve feature ("serving of remote objects via the HTTP interface") (https://rclone.org/rc/#rc-serve), which the Web GUI file download feature relies on. Fixing it may require introducing escape/encoding rules to this url/request format, or to change to a different protocol.
This issue was created after discussing https://github.com/rclone/rclone/pull/6787.