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.master
parent
bb6a3c02c9
commit
ea01d687b5
Loading…
Reference in New Issue