rc: stop global.* connection string options changing config CVE-2026-49980

A connection string can carry global.* options which change rclone's
process-wide configuration (e.g. global.http_proxy). This is
undesirable for the rc interface which was designed to have multiple
users or connections at once. The rc interface has the `_config`
mechanism for setting request scoped global config.

This blocks global.* options on all rc paths by marking the context as
a remote control request at the rc boundaries. fs.NewFs then skips
applying global.* to the process-wide config for a marked context.

The marker is reapplied in fs.CopyConfig, which is the call rclone
uses to detach context but keep config.

global.* options still apply to the individual backend they are set
on, exactly like override.* options; they just no longer leak into the
rest of the process. Remotes created directly on the command line are
unaffected as are remotes defined in the config file.

See: GHSA-qw24-gh76-8rvv
This commit is contained in:
Nick Craig-Wood
2026-06-05 15:21:01 +01:00
parent 2326ea79f7
commit 53f972830c
9 changed files with 135 additions and 5 deletions
+11
View File
@@ -87,6 +87,17 @@ commands or read arbitrary local files.
Default Off.
### global.* connection string options and the rc
Remotes instantiated by the rc do not let [connection
string](/docs/#connection-strings) `global.*` options change rclone's
process-wide configuration. Remotes created directly on the command
line or defined in the config file are unaffected.
A `global.*` option still takes effect for the individual backend it
is set on (exactly like an `override.*` option), it just does not leak
into the global config for the rest of the process.
### --rc-serve-no-modtime
Set this flag to skip reading the modification time (can speed things up).