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

agent: trim space when parsing X-Nomad-Token header #16469

Merged
merged 1 commit into from
Mar 14, 2023
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Mar 13, 2023

Fixes #11898 and will replace #11897

Our auth token parsing code trims space around the Authorization header but not around X-Nomad-Token. When using the UI, it's easy to accidentally introduce a leading or trailing space, which results in spurious authentication errors. Some browsers fix this automatically, but apparently not all do. Trim the space at the HTTP server.

Our auth token parsing code trims space around the `Authorization` header but
not around `X-Nomad-Token`. When using the UI, it's easy to accidentally
introduce a leading or trailing space, which results in spurious authentication
errors. Trim the space at the HTTP server.
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.5.x backport to 1.5.x release line type/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alloc/exec: WebSocket 1011 acl token lookup failed: index error: UUID must be 36 characters
2 participants