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

outdated browser and edge checks for pbkdf2

This commit is contained in:
Kyle Spearrin 2017-07-09 00:23:26 -04:00
parent b9cbc1546c
commit 204ee72926
3 changed files with 12 additions and 2 deletions

View File

@ -8,6 +8,7 @@ angular
vm.usingControlSidebar = vm.openControlSidebar = false;
vm.searchVaultText = null;
vm.version = appSettings.version;
vm.outdatedBrowser = navigator.userAgent.indexOf('MSIE') !== -1;
$scope.currentYear = new Date().getFullYear();
@ -94,6 +95,10 @@ angular
});
};
$scope.updateBrowser = function () {
$window.open('https://browser-update.org/update.html', '_blank');
};
// Append dropdown menu somewhere else
var bodyScrollbarWidth,
appendedDropdownMenu,

View File

@ -235,7 +235,7 @@ angular
};
_service.makeKey = function (password, salt) {
if (!$window.cryptoShimmed) {
if (!$window.cryptoShimmed && $window.navigator.userAgent.indexOf('Edge') === -1) {
return pbkdf2WC(password, salt, 5000, 256).then(function (keyBuf) {
return new SymmetricCryptoKey(bufToB64(keyBuf), true);
});
@ -301,7 +301,7 @@ angular
throw 'Invalid parameters.';
}
if (!$window.cryptoShimmed) {
if (!$window.cryptoShimmed && $window.navigator.userAgent.indexOf('Edge') === -1) {
var keyBuf = key.getBuffers();
return pbkdf2WC(new Uint8Array(keyBuf.key), password, 1, 256).then(function (hashBuf) {
return bufToB64(hashBuf);

View File

@ -147,6 +147,11 @@
</aside>
<div class="content-wrapper">
<div class="alert alert-danger alert-notification" ng-if="main.outdatedBrowser" ng-click="updateBrowser()">
<h4><i class="fa fa-warning fa-fw"></i> Update Your Browser</h4>
You are using an unsupported web browser. The web vault may not function properly.
<u>Update your browser now</u>.
</div>
<div class="alert alert-warning alert-notification" ng-click="updateKey()" ng-if="!main.usingEncKey">
<h4><i class="fa fa-key fa-fw"></i> Update Your Encryption Key</h4>
You are currently using an outdated encryption scheme.