fs: fix passwords and tokens appearing in the debug log during rclone config
Previously running rclone config (or driving it via the rc API or web GUI) with -vv would write secrets to the debug log. This was dangerous as users debugging a failing config flow often paste their -vv logs into the forum or GitHub issues. These values are now redacted from the log as "XXX". Values whose option is known are only redacted if the option is marked IsPassword or Sensitive, so normal answers remain visible. Use --dump auth to see the unredacted values when debugging a config flow - rclone prints a warning that secrets will appear in the log when this is in effect. This was discovered by CodeQL: https://github.com/rclone/rclone/security/code-scanning/182
This commit is contained in:
@@ -3267,7 +3267,9 @@ The available flags are:
|
||||
- `auth` dumps HTTP headers like `headers`, but also includes any `Authorization:`
|
||||
headers. This means the output will probably contain sensitive information.
|
||||
Use `headers` to dump without `Authorization:` headers. Can be very verbose.
|
||||
Useful for debugging only.
|
||||
Useful for debugging only. This flag also makes the debug log of the config
|
||||
process (e.g. `rclone config -vv`) show answers to questions, passwords and
|
||||
tokens which are otherwise redacted.
|
||||
- `bodies` dumps HTTP headers and bodies. May contain sensitive info.
|
||||
Can be very verbose. Useful for debugging only. Note that the bodies
|
||||
are buffered in memory so don't use this for enormous files.
|
||||
|
||||
Reference in New Issue
Block a user