Fixed a security issue on the login page by clearing the buffer of the virtual keyboard when pressing 'cancel'.

This commit is contained in:
Julian Müller (ChaoticByte) 2023-06-07 19:04:17 +02:00
parent 51fda11281
commit dd36c3c114

View file

@ -6,7 +6,6 @@
let passwordOverlayElement;
let pwOverlayCancelButton;
let userlistButtons;
let pinpadButtons;
let userlistContainerElement;
// Add event listeners after DOM Content loaded
document.addEventListener("DOMContentLoaded", () => {
@ -40,5 +39,9 @@
function hide_password_overlay() {
passwordOverlayElement.classList.add("nodisplay");
passwordInputElement.value = "";
// Dispatch an Input Event to the input element to trigger the on-
// screen keyboard to update its buffer. This fixes a security
// issue on the login page.
passwordInputElement.dispatchEvent(new Event("input", {bubbles: true}));
}
})();