From c23665dd8254150f0581331e6a15acc8ff05606c Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Sat, 20 May 2017 18:59:47 +0200 Subject: [PATCH] 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. --- app/ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/ui.js b/app/ui.js index 73ad2b44..0d6a6578 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')