Only authenticate when password is set

This commit is contained in:
Daniel Perna 2018-04-22 21:20:06 +02:00
parent 5ce0d34bd8
commit 3bb560e5d0
2 changed files with 6 additions and 2 deletions

View file

@ -2108,7 +2108,9 @@ INDEX = Template(r"""<!DOCTYPE html>
id: 1,
type: "subscribe_events"
};
ws.send(JSON.stringify(auth));
if (document.getElementById("ws_password").value) {
ws.send(JSON.stringify(auth));
}
ws.send(JSON.stringify(data));
});
ws.onmessage = function(event) {