mirror of
https://github.com/rclone/rclone.git
synced 2025-12-16 00:04:40 +00:00
jottacloud: fix legacy authentication
This fixes the issue where configuration would fail after supplying passoword:
Reveal failed: input too short when revealing password - is it obscured?
This commit is contained in:
@@ -242,12 +242,12 @@ machines.`)
|
|||||||
authCode, _ := m.Get("auth_code")
|
authCode, _ := m.Get("auth_code")
|
||||||
|
|
||||||
srv := rest.NewClient(fshttp.NewClient(ctx))
|
srv := rest.NewClient(fshttp.NewClient(ctx))
|
||||||
clientID, ok := m.Get(configClientID)
|
clientID, _ := m.Get(configClientID)
|
||||||
if !ok {
|
if clientID == "" {
|
||||||
clientID = legacyClientID
|
clientID = legacyClientID
|
||||||
}
|
}
|
||||||
clientSecret, ok := m.Get(configClientSecret)
|
clientSecret, _ := m.Get(configClientSecret)
|
||||||
if !ok {
|
if clientSecret == "" {
|
||||||
clientSecret = legacyEncryptedClientSecret
|
clientSecret = legacyEncryptedClientSecret
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -929,12 +929,12 @@ func getOAuthClient(ctx context.Context, name string, m configmap.Mapper) (oAuth
|
|||||||
oauthConfig.AuthURL = tokenURL
|
oauthConfig.AuthURL = tokenURL
|
||||||
}
|
}
|
||||||
} else if ver == legacyConfigVersion {
|
} else if ver == legacyConfigVersion {
|
||||||
clientID, ok := m.Get(configClientID)
|
clientID, _ := m.Get(configClientID)
|
||||||
if !ok {
|
if clientID == "" {
|
||||||
clientID = legacyClientID
|
clientID = legacyClientID
|
||||||
}
|
}
|
||||||
clientSecret, ok := m.Get(configClientSecret)
|
clientSecret, _ := m.Get(configClientSecret)
|
||||||
if !ok {
|
if clientSecret == "" {
|
||||||
clientSecret = legacyEncryptedClientSecret
|
clientSecret = legacyEncryptedClientSecret
|
||||||
}
|
}
|
||||||
oauthConfig.ClientID = clientID
|
oauthConfig.ClientID = clientID
|
||||||
|
|||||||
Reference in New Issue
Block a user