11 Commits (master)

Author SHA1 Message Date
Jessie Murray ea01d687b5
Apply ACL rules to WebSocket commands
ACLs were not considered when processing commands coming over WebSocket
connections. WS commands that are disabled with ACLs are now rejected
with a custom message for JSON and raw WS clients, the two supported
formats for this protocol. For JSON an equivalent HTTP status code is
included in the response, although this is only an indication of how
Webdis would have responded if it came from a regular HTTP request.

Tests are added to validate that DEBUG commands are rejected by Webdis
without even making it to Redis, for both JSON and raw WS clients.

Add DEBUG OBJECT demo to websocket.html: DEBUG is disabled with ACLs
by default in webdis.json. A DEBUG button is added to the WebSocket
HTML demo to show what kind of response is produced when WebSocket
clients attempt to send such a command.

The error responses are documented in the README in the ACL section.

Fixes #240.
12 months ago
Jessie Murray 71223ae005
Address review comments (tests) 3 years ago
Jessie Murray d48353cec3
Rename self_cmd to reused_cmd 3 years ago
Jessie Murray d7703b97b3
Add pub/sub test in HTML demo
1. Add publish button with channel and message
2. Add subscribe button with channel
3. Change "Clear logs" button to appear when logs are visible
3 years ago
Jessie Murray 4c0d3f4032
Refactor websocket.html to remove duplicate HTML 3 years ago
Jessie Murray 05a90b7b7a
Add "PING" button to HTML demo 3 years ago
Jessie Murray a15fb4e28e
Modernize websocket.html web page
* Use pure.css for a basic grid
* Detect disconnections, update UI accordingly
* Make GET/SET commands configurable and interactive
* Add button to clear logs
* Test with current branch
3 years ago
Nicolas Favre-Felix 5190c16157 Updated WebSocket protocol to RFC6455.
WebSocket HTML demo now works with Google Chrome 17
and Firefox 8.
13 years ago
Nicolas Favre-Felix 9b2cadadab Fixed byte-ordering in SHA1, added separate Origin header, and added support for prefixed MozWebSocket. 13 years ago
Nicolas Favre-Felix cdde256d9b Better WebSocket HTML5 page. 14 years ago
Nicolas Favre-Felix b3f2b2f306 Support Redis wire protocol over HTML5 WebSockets. 14 years ago