Skip to content

Fix Basic Auth validation for token-based authentication - #1580

Open
wang-chuanhui wants to merge 2 commits into
tsl0922:mainfrom
wang-chuanhui:main
Open

wang-chuanhui wants to merge 2 commits into
tsl0922:mainfrom
wang-chuanhui:main

Conversation

@wang-chuanhui

Copy link
Copy Markdown

Summary

Fix the Basic Auth validation logic to allow requests without a Basic Authorization header to proceed to the subsequent token-based authentication flow.

Problem

The existing code returns false when the Authorization header is missing or shorter than 7 characters, preventing requests from reaching the subsequent WebSocket authentication flow.

Changes

Only validate Basic Auth credentials when the Authorization header is at least 7 characters long.

Allow requests without a valid Basic Auth header to proceed to the subsequent authentication flow, where the authToken sent via WebSocket is validated.

Testing

Verified that requests with valid Basic Auth credentials are still checked against the configured credentials.

Verified that requests without a Basic Auth header can proceed to token-based authentication.

This branch has not been deployed

No deployments
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.

1 participant