Skip to content

Commit c304dd2

Browse files
modular-magicianmegan07
authored andcommitted
don't output JSON credentials to console when malformed (#5995) (#4266)
* don't output JSON credentials to console when malformed * remove creds too Signed-off-by: Modular Magician <[email protected]>
1 parent 83a40bd commit c304dd2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/5995.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
provider: removed printing credentials to the console if malformed JSON is given
3+
```

google-beta/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ func validateCredentials(v interface{}, k string) (warnings []string, errors []e
17081708
}
17091709
if _, err := googleoauth.CredentialsFromJSON(context.Background(), []byte(creds)); err != nil {
17101710
errors = append(errors,
1711-
fmt.Errorf("JSON credentials in %q are not valid: %s", creds, err))
1711+
fmt.Errorf("JSON credentials are not valid: %s", err))
17121712
}
17131713

17141714
return

0 commit comments

Comments
 (0)