mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 14:28:38 -04:00
The netstorage backend joins the path after `remote:` onto the configured host URL according to the URL standard. A path beginning with `//` is a network-path reference under that standard, so a path such as `//other.example/dir/` replaced the configured host (and port and userinfo) rather than being treated as a path. Every request, including the initial stat, was then signed with the account secret and sent to the substituted host. The signature covers the request path and action but not the host, so the substituted host received signatures valid for replay against the real NetStorage endpoint for the duration of their validity. Use rest.URLJoinRoot, which refuses any root that changes the scheme, host or userinfo of the configured URL.