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:
parent
0ee928cdce
commit
3e61d938bc
@ -98,6 +98,11 @@ angular
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.twoFactor = function (token) {
|
$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.twoFactorPromise = authService.logIn(_email, _masterPassword, token, $scope.twoFactorProvider,
|
||||||
$scope.rememberTwoFactor.checked || false);
|
$scope.rememberTwoFactor.checked || false);
|
||||||
|
|
||||||
@ -211,6 +216,6 @@ angular
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.twoFactor(JSON.stringify(data));
|
$scope.twoFactor(JSON.stringify(data));
|
||||||
}, 5);
|
}, 10);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@ angular
|
|||||||
if (token && typeof (provider) !== 'undefined' && provider !== null) {
|
if (token && typeof (provider) !== 'undefined' && provider !== null) {
|
||||||
remember = remember || remember !== false;
|
remember = remember || remember !== false;
|
||||||
|
|
||||||
request.twoFactorToken = token.replace(' ', '');
|
request.twoFactorToken = token;
|
||||||
request.twoFactorProvider = provider;
|
request.twoFactorProvider = provider;
|
||||||
request.twoFactorRemember = remember ? '1' : '0';
|
request.twoFactorRemember = remember ? '1' : '0';
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
$scope.deviceResponse = JSON.stringify(data);
|
$scope.deviceResponse = JSON.stringify(data);
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
}, 5);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.submit = function () {
|
$scope.submit = function () {
|
||||||
|
@ -81,7 +81,7 @@ function initU2f(obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
success(data);
|
success(data);
|
||||||
}, 5);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMessage() {
|
function onMessage() {
|
||||||
|
Loading…
Reference in New Issue
Block a user