From 2c019bb9856dfae5987d383c8a0a0d846dbc7bf6 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Thu, 19 Oct 2023 10:36:40 -0400 Subject: [PATCH] NIFI-11909 Cleared Password field after login - Clearing the password in the login form when login fails or unable to verify access once authentication succeeds. This closes #11909 Signed-off-by: David Handermann (cherry picked from commit 97dfe2d812a9fa8b0fcc2b1d0b7f352f656b530e) --- .../nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js index 8cfaf948c57e..a29c7073e127 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/login/nf-login.js @@ -127,6 +127,9 @@ $('#login-message-title').text('Unable to log in'); $('#login-message').text(accessStatus.message); + // clear the password + $('#password').val(''); + // update visibility $('#login-container').hide(); $('#login-submission-container').hide(); @@ -137,6 +140,9 @@ $('#login-message-title').text('Unable to log in'); $('#login-message').text(xhr.responseText); + // clear the password + $('#password').val(''); + // update visibility $('#login-container').hide(); $('#login-submission-container').hide(); @@ -149,6 +155,9 @@ dialogContent: nfCommon.escapeHtml(xhr.responseText) }); + // clear the password + $('#password').val(''); + // update the form visibility $('#login-submission-container').show(); $('#login-progress-container').hide();