Commit 9194ba7
fix(secureenv): trim whitespace before proxy credential redaction (MCP-2776) (#705)
Follow-up to PR #704 (MCP-2769) reviewer note: redactProxyCredentials did not
trim surrounding whitespace, so a value like " http://user:pass@proxy " made
url.Parse error (leading space) and fall through, forwarding the credentialed
value verbatim and bypassing the redaction guarantee.
Trim whitespace at function entry before parsing; whitespace is never meaningful
in a proxy URL. Adds table cases for whitespace-wrapped scheme'd and schemeless
credentialed values.
Co-authored-by: Paperclip <noreply@paperclip.ing>1 parent 85b2ef7 commit 9194ba7
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
0 commit comments