Skip to content

Conversation

@hkdeman
Copy link
Contributor

@hkdeman hkdeman commented Jul 13, 2025

Implement comprehensive WebSocket playground component with real-time connection management

Summary

  • Add WebSocket playground component with real-time messaging capabilities
  • Support for custom headers, subprotocols, and multiple server endpoints
  • Message history with timestamps and connection status indicators
  • Consistent UI/UX with existing HTTP playground

Test plan

  • Test WebSocket connection to echo server
  • Verify message sending and receiving
  • Test custom headers and subprotocols
  • Verify connection status indicators
  • Test multiple server endpoints
  • Test binary message support

Closes #26

🤖 Generated with Claude Code

- Implement comprehensive WebSocket playground component with real-time connection management
- Add support for custom headers, subprotocols, and bidirectional messaging
- Create message history with timestamps and type indicators
- Support both text and binary message types
- Include multiple server endpoint management
- Add visual connection status indicators
- Create demo page with examples and usage documentation
- Update features documentation to showcase WebSocket playground
- Mark WebSocket client as completed in roadmap

Features:
- Real-time WebSocket connection management
- Message history with timestamps
- Custom headers and subprotocols support
- Text and binary message support
- Multiple server endpoints
- Connection status indicators
- Consistent UI/UX with existing HTTP playground

Closes #26

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: H <[email protected]>
@jazzberry-ai
Copy link

jazzberry-ai bot commented Jul 13, 2025

Bug Report

Name Severity Example test case Description
Potential XSS vulnerability in binary message handling Medium Set the message type to "binary". Enter a string containing HTML or JavaScript code, such as <img src=x onerror=alert(1)>. Click "Send". The sendMessage function, when handling binary messages, encodes the messageInput string using TextEncoder and sends the resulting ArrayBuffer to the WebSocket server. However, the received message is then displayed in the message history without proper sanitization. This could lead to a stored XSS vulnerability if the server echoes the binary data back to the client, as the client-side code then displays the unsanitized binary data as text in the message history.

Comments? Email us.

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.

[FR] - Websocket Playground

2 participants