From da44f14e07eaf30ac282dde529a07cb484f3474c Mon Sep 17 00:00:00 2001 From: linquize Date: Mon, 25 Feb 2019 08:57:11 +0800 Subject: [PATCH] fix(auth): prevent redirect parameter to use state portainer.auth (#2701) --- app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.js b/app/app.js index 8a05b219b..9a7577c52 100644 --- a/app/app.js +++ b/app/app.js @@ -44,7 +44,7 @@ function initAuthentication(authManager, Authentication, $rootScope, $state) { // authManager.redirectWhenUnauthenticated() + unauthenticatedRedirector // to have more controls on which URL should trigger the unauthenticated state. $rootScope.$on('unauthenticated', function (event, data) { - if (!_.includes(data.config.url, '/v2/')) { + if (!_.includes(data.config.url, '/v2/') && ($state.current.name !== 'portainer.auth')) { $state.go('portainer.auth', {error: 'Your session has expired', redirect: $state.current.name}); } });