rclone/rclone

Web GUI cannot download file from folder with square brackets in its name

Offen

#6.893 geöffnet am 25.03.2023

 (0 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Go (5.090 Forks)batch import
API / Remote Control / RCWeb GUIbughelp wanted

Repository-Metriken

Stars
 (57.185 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 32T 20h) (23 gemergte PRs in 30 T)

Beschreibung

Steps to reproduce:

  • Create directory with name [test], and a file named file.txt in 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.txt to 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.

Contributor Guide