1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

token sanitization and adjust timeouts on u2f

This commit is contained in:
Kyle Spearrin 2017-06-27 08:14:03 -04:00
parent 0ee928cdce
commit 3e61d938bc
4 changed files with 9 additions and 4 deletions

View File

@ -98,6 +98,11 @@ angular
}
$scope.twoFactor = function (token) {
if ($scope.twoFactorProvider === constants.twoFactorProvider.email
|| $scope.twoFactorProvider === constants.twoFactorProvider.authenticator) {
token = token.replace(' ', '');
}
$scope.twoFactorPromise = authService.logIn(_email, _masterPassword, token, $scope.twoFactorProvider,
$scope.rememberTwoFactor.checked || false);
@ -211,6 +216,6 @@ angular
return;
}
$scope.twoFactor(JSON.stringify(data));
}, 5);
}, 10);
}
});

View File

@ -20,7 +20,7 @@ angular
if (token && typeof (provider) !== 'undefined' && provider !== null) {
remember = remember || remember !== false;
request.twoFactorToken = token.replace(' ', '');
request.twoFactorToken = token;
request.twoFactorProvider = provider;
request.twoFactorRemember = remember ? '1' : '0';
}

View File

@ -53,7 +53,7 @@
$scope.deviceResponse = JSON.stringify(data);
$scope.$apply();
}, 5);
}, 10);
};
$scope.submit = function () {

View File

@ -81,7 +81,7 @@ function initU2f(obj) {
}
success(data);
}, 5);
}, 10);
}
function onMessage() {