ARTEMIS-1681 fix hawtio console security issue

Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/89967986
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/89967986
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/89967986

Branch: refs/heads/master
Commit: 89967986d682594ff13c2a3d8517c75fef460cd9
Parents: 646e555
Author: Stanislav Knot <sk...@redhat.com>
Authored: Wed Feb 14 12:48:19 2018 +0100
Committer: Clebert Suconic <clebertsuco...@apache.org>
Committed: Wed Feb 14 12:01:01 2018 -0500

----------------------------------------------------------------------
 .../src/main/webapp/plugin/js/artemisPlugin.js               | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/89967986/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js
----------------------------------------------------------------------
diff --git 
a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js 
b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js
index a1c3d6a..d6acc3c 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/artemisPlugin.js
@@ -155,7 +155,7 @@ var ARTEMIS = (function(ARTEMIS) {
 
    // one-time initialization happens in the run function
    // of our module
-   ARTEMIS.module.run(function(workspace, viewRegistry, helpRegistry, 
preferencesRegistry, localStorage, jolokia, ARTEMISService, $rootScope) {
+   ARTEMIS.module.run(function(workspace, viewRegistry, helpRegistry, 
preferencesRegistry, localStorage, jolokia, ARTEMISService, $rootScope, 
preLogoutTasks) {
       // let folks know we're actually running
       ARTEMIS.log.info("plugin running " + jolokia);
 
@@ -297,6 +297,12 @@ var ARTEMIS = (function(ARTEMIS) {
            isValid: function (workspace) { return 
workspace.isTopTabActive("artemis") || 
workspace.selectionHasDomain(artemisJmxDomain); },
            href: function () { return "#/artemis/connections"; }
        });
+
+       preLogoutTasks.addTask("clearArtemisCredentials", () => {
+           localStorage.removeItem('artemisUserName');
+           localStorage.removeItem('artemisPassword');
+       });
+
 });
 
 

Reply via email to