Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug logging causes panic while looking for secrets to redact #12459

Closed
obi1kenobi opened this issue Aug 7, 2023 · 0 comments · Fixed by #12468
Closed

Debug logging causes panic while looking for secrets to redact #12459

obi1kenobi opened this issue Aug 7, 2023 · 0 comments · Fixed by #12468
Labels
C-bug Category: bug

Comments

@obi1kenobi
Copy link
Member

A cargo metadata call spuriously causes a panic while downloading dependencies, possibly during a time of intermittent network issues on GitHub. The panic is in some cargo debug logging code that is attempting to redact secret information like cookies as headers are being logged.

Error:

thread 'main' panicked at 'byte index 14 is not a char boundary; it is inside 'ꓦ' (bytes 12..15) of `>iꓦ>iꓦ>iꓦ>iꓦ>iꓦ>i`', src/cargo/ops/registry.rs:715:17

The line in question:

line[..line.len().min(text.len())].eq_ignore_ascii_case(text)

Log file:
error.log

Similar issues here:
https://github.com/libp2p/rust-libp2p/actions/runs/5782756485/job/15670482772#step:41:715
https://github.com/libp2p/rust-libp2p/actions/runs/5782750882/job/15670392407

Underlying cause of: obi1kenobi/cargo-semver-checks#513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants