1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
dc78afb1b3 oauthutil: warn if rclone authorize code can't be decoded #2732 2025-08-01 15:37:53 +01:00

View File

@@ -692,6 +692,10 @@ version recommended):
newFormat := true
err := outM.Decode(code)
if err != nil {
if len(code) > 0 && code[0] != '{' {
fs.Errorf(nil, "Couldn't decode rclone authorize output as base64, trying JSON: %v", err)
fs.Errorf(nil, "Check the code is complete and didn't get truncated >>>%s<<<", code)
}
newFormat = false
err = json.Unmarshal([]byte(code), &token)
}