Skip to content

Bearer token prefix matched case-sensitively #224

Description

@ZhuchkaTriplesix

Where: src/token.rs:9-17 (extract_bearer).

h.strip_prefix("Bearer ") is case-sensitive, so bearer <token> or BEARER <token> (both valid per common client behavior / not forbidden by RFC 6750 in a case-insensitive sense for the scheme name) fail to extract a token and the request is rejected as unauthenticated, even with an otherwise valid JWT. Minor correctness/interop issue, low severity.

Fix direction: match the Bearer scheme name case-insensitively while keeping the token itself untouched.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions