From b906716ac5125520b3a5c2cf3a107ecfa9cd00bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Arias=20de=20Reyna?= Date: Wed, 17 May 2017 10:43:29 +0200 Subject: [PATCH] Make sure there is a csrf token for login --- web-ui/src/main/resources/catalog/js/LoginController.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web-ui/src/main/resources/catalog/js/LoginController.js b/web-ui/src/main/resources/catalog/js/LoginController.js index 884f836f34d..cc2e2c38538 100644 --- a/web-ui/src/main/resources/catalog/js/LoginController.js +++ b/web-ui/src/main/resources/catalog/js/LoginController.js @@ -57,6 +57,11 @@ $scope.signinFailure = gnUtilityService.getUrlParameter('failure'); $scope.gnConfig = gnConfig; + //If no csrf, ask for one: + if(!$rootScope.csrf) { + $http.post('info?type=me'); + } + function initForm() { if ($window.location.pathname.indexOf('new.password') !== -1) { // Retrieve username from URL parameter