Skip to content

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

@obi1kenobi

Description

@obi1kenobi
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

Activity

added a commit that references this issue on Aug 9, 2023
1d43be1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @arlosi@obi1kenobi

      Issue actions

        Debug logging causes panic while looking for secrets to redact · Issue #12459 · rust-lang/cargo