summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-os/client/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-os/client/src/app.js')
-rw-r--r--ecomp-portal-FE-os/client/src/app.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ecomp-portal-FE-os/client/src/app.js b/ecomp-portal-FE-os/client/src/app.js
index a481d867..ec531846 100644
--- a/ecomp-portal-FE-os/client/src/app.js
+++ b/ecomp-portal-FE-os/client/src/app.js
@@ -55,7 +55,7 @@ var app = angular.module('ecompApp', [
'oc.lazyLoad',
'b2b.att'
])
- .config(($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, ngDialogProvider, $controllerProvider, hammerDefaultOptsProvider) => {
+ .config(($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, ngDialogProvider, $controllerProvider, hammerDefaultOptsProvider, $sanitizeProvider) => {
app.controllerProvider = $controllerProvider;
$urlRouterProvider.otherwise('/error404');
$locationProvider.html5Mode(true);
@@ -102,13 +102,14 @@ var app = angular.module('ecompApp', [
'responseError': function (rejection) {
$log.error('Interceptor rejection: ' + JSON.stringify(rejection));
var $state = $injector.get('$state');
+ var $sanitize = $injector.get('$sanitize');
switch (rejection.status) {
case 401:
var globalLoginUrl = rejection.headers()['global-login-url'];
if (globalLoginUrl) {
- window.location = globalLoginUrl +
+ window.location = $sanitize(globalLoginUrl +
(globalLoginUrl.indexOf('?') === -1 ? '?' : '') +
- '&retUrl=' + encodeURI(window.location);
+ '&retUrl=' + encodeURI(window.location));
return;
}
break;