mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
## Summary - Extracts credentials from WebSocket URL (`ws://user:pass@host`) and sends them as Basic Authorization header - User-provided `Authorization` header takes precedence over URL credentials - Credentials are properly URL-decoded before being Base64-encoded Fixes #24388 ## Test plan - [x] Added regression test `test/regression/issue/24388.test.ts` with 5 test cases: - Basic credentials in URL - Empty password - No credentials (no header sent) - Custom Authorization header takes precedence - Special characters (URL-encoded) in credentials - [x] Tests pass with `bun bd test test/regression/issue/24388.test.ts` - [x] Tests fail with `USE_SYSTEM_BUN=1 bun test` (confirming the bug existed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
6.6 KiB
6.6 KiB