diff options
author | Samuel Mannehed <samuel@cendio.se> | 2017-05-20 18:59:47 +0200 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2017-05-20 19:05:46 +0200 |
commit | c23665dd8254150f0581331e6a15acc8ff05606c (patch) | |
tree | 071275f1ba174d9a38c1f33e9dc764dce55c7c00 | |
parent | 777df7c274222806b5d66412058cabf71f5d4ca7 (diff) | |
download | novnc-c23665dd8254150f0581331e6a15acc8ff05606c.tar.gz |
Clear the password input field
If a user disconnects but leaves the browser tab open, the password
input field would still contain the password for future connections.
We now clear the input field after reading the password into memory.
-rw-r--r-- | app/ui.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1133,7 +1133,10 @@ const UI = { }, setPassword: function(e) { - var password = document.getElementById('noVNC_password_input').value; + var inputElem = document.getElementById('noVNC_password_input'); + var password = inputElem.value; + // Clear the input after reading the password + inputElem.value = ""; UI.rfb.sendPassword(password); UI.reconnect_password = password; document.getElementById('noVNC_password_dlg') |