Skip to content

assertion left == right failed #73

@a-kolechko

Description

@a-kolechko

If you have base64 private key with underscore or hyphen at the beginning, like _M7rji76yb8vSG7p4unMZ_cHUaiIyCvHX2ExpJoslvg, and create a builder with it, but without the first character (VapidSignatureBuilder::from_base64('M7rji76yb8vSG7p4unMZ_cHUaiIyCvHX2ExpJoslvg', &subscription_info), it's accepted as a valid key, but then app panics after trying to send a notification:

2025-05-08 19:44:15 thread 'tokio-runtime-worker' panicked at /Users/akolechko/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.7/src/lib.rs:572:9:
2025-05-08 19:44:15 assertion `left == right` failed
2025-05-08 19:44:15   left: 31
2025-05-08 19:44:15  right: 32
2025-05-08 19:44:15 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions