mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
token sanitization and adjust timeouts on u2f
This commit is contained in:
parent
0ee928cdce
commit
3e61d938bc
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
$scope.deviceResponse = JSON.stringify(data);
|
||||
$scope.$apply();
|
||||
}, 5);
|
||||
}, 10);
|
||||
};
|
||||
|
||||
$scope.submit = function () {
|
||||
|
@ -81,7 +81,7 @@ function initU2f(obj) {
|
||||
}
|
||||
|
||||
success(data);
|
||||
}, 5);
|
||||
}, 10);
|
||||
}
|
||||
|
||||
function onMessage() {
|
||||
|
Loading…
Reference in New Issue
Block a user