rclone/rclone

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

开放

#6,893 创建于 2023年3月25日

 (0 条评论) (1 个反应) (0 位负责人)Go (5,090 个派生)batch import
API / Remote Control / RCWeb GUIbughelp wanted

仓库指标

星标
 (57,185 个星标)
PR 合并指标
 (平均合并 32天 20小时) (30 天内合并 23 个 PR)

描述

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.

贡献者指南