summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2017-05-20 18:59:47 +0200
committerSamuel Mannehed <samuel@cendio.se>2017-05-20 19:05:46 +0200
commitc23665dd8254150f0581331e6a15acc8ff05606c (patch)
tree071275f1ba174d9a38c1f33e9dc764dce55c7c00
parent777df7c274222806b5d66412058cabf71f5d4ca7 (diff)
downloadnovnc-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.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/ui.js b/app/ui.js
index 73ad2b4..0d6a657 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -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')