Commit 453b88e
committed
fix(cmd/login): mask SSO tokens and sanitize callback URL in logs
The oauth2login function logged the raw access token and refresh token
directly via log.Printf, making them visible in any terminal or CI/CD
log where --verbose is active.
- Replace token log calls with utils.MaskSecret so the values are
always printed as '[REDACTED]' regardless of --verbose state
- Sanitize the OAuth2 callback URL logged on each redirect using
utils.SanitizeString to redact any authorization codes or state
params that may appear in query strings
Fixes #265
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>1 parent 9360ded commit 453b88e
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| |||
0 commit comments