Commit 482367c
committed
Sanitize and bound raw HTTP response body in BitbucketResponseError
Truncate the response body to 512 characters before storing it in
BitbucketResponseError.responseBody. This prevents sensitive data
exposure (tokens, internal paths) and excessively large error payloads
(HTML error pages) from propagating through error chains and logs.
The bound is applied in the responseError() helper before constructing
the error, consistent with the existing transportSafeSourceControlErrorValue
pattern used elsewhere in the source control layer.1 parent bbb7b63 commit 482367c
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
491 | | - | |
492 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
496 | | - | |
| 503 | + | |
497 | 504 | | |
498 | | - | |
499 | | - | |
| 505 | + | |
| 506 | + | |
500 | 507 | | |
501 | 508 | | |
502 | 509 | | |
| |||
0 commit comments