fix(security): fixed login issue that was a potential for social engineering, fixes #6014

This commit is contained in:
Torkel Ödegaard
2016-09-21 15:03:14 +02:00
parent 4a1693196c
commit b4111d78e1
2 changed files with 11 additions and 6 deletions

View File

@@ -6,6 +6,12 @@ define([
function (angular, coreModule, config) {
'use strict';
var failCodes = {
"1000": "Required Github team membership not fulfilled",
"1001": "Required Github organization membership not fulfilled",
"1002": "Required email domain not fulfilled",
};
coreModule.default.controller('LoginCtrl', function($scope, backendSrv, contextSrv, $location) {
$scope.formModel = {
user: '',
@@ -31,8 +37,8 @@ function (angular, coreModule, config) {
$scope.$watch("loginMode", $scope.loginModeChanged);
var params = $location.search();
if (params.failedMsg) {
$scope.appEvent('alert-warning', ['Login Failed', params.failedMsg]);
if (params.failCode) {
$scope.appEvent('alert-warning', ['Login Failed', failCodes[params.failCode]]);
delete params.failedMsg;
$location.search(params);
}