Skip to content

Comments

Fix invalid Bearer prefix format (wrong character instead of a space)#99

Merged
pkieltyka merged 3 commits intomasterfrom
bearer_format
Mar 27, 2025
Merged

Fix invalid Bearer prefix format (wrong character instead of a space)#99
pkieltyka merged 3 commits intomasterfrom
bearer_format

Conversation

@VojtechVitek
Copy link
Contributor

@VojtechVitek VojtechVitek commented Mar 27, 2025

Disallow invalid headers like "Authorization: BEARERx{JWT}" (notice the x character instead of a space).

  • Rewrite simple tests to table-driven tests
  • Add tests cases for invalid Bearer prefixes
  • Disallow invalid character after BEARER prefix

Fixes #98

@VojtechVitek VojtechVitek changed the title bearer format Fix invalid Bearer prefix format (wrong character instead of a space) Mar 27, 2025
Copy link

@klaidliadon klaidliadon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkieltyka pkieltyka merged commit 81e4c11 into master Mar 27, 2025
18 checks passed
@pkieltyka pkieltyka deleted the bearer_format branch March 27, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow wrong character in BEARER prefix

3 participants