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.
This commit is contained in:
Samuel Mannehed 2017-05-20 18:59:47 +02:00
parent 777df7c274
commit c23665dd82
1 changed files with 4 additions and 1 deletions

View File

@ -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')