mirror of
https://github.com/bitwarden/browser
synced 2025-01-13 02:47:19 +01:00
utf8 encode params for key derivation
This commit is contained in:
parent
f0d440d204
commit
3ed69d887f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"version": "1.9.0",
|
"version": "1.9.1",
|
||||||
"production": true,
|
"production": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"connect": "3.4.1",
|
"connect": "3.4.1",
|
||||||
|
@ -52,7 +52,8 @@ angular
|
|||||||
};
|
};
|
||||||
|
|
||||||
_service.makeKey = function (password, salt, b64) {
|
_service.makeKey = function (password, salt, b64) {
|
||||||
var key = forge.pbkdf2(password, salt, 5000, 256 / 8, 'sha256');
|
var key = forge.pbkdf2(forge.util.encodeUtf8(password), forge.util.encodeUtf8(salt),
|
||||||
|
5000, 256 / 8, 'sha256');
|
||||||
|
|
||||||
if (b64 && b64 === true) {
|
if (b64 && b64 === true) {
|
||||||
return forge.util.encode64(key);
|
return forge.util.encode64(key);
|
||||||
@ -70,7 +71,7 @@ angular
|
|||||||
throw 'Invalid parameters.';
|
throw 'Invalid parameters.';
|
||||||
}
|
}
|
||||||
|
|
||||||
var hashBits = forge.pbkdf2(key, password, 1, 256 / 8, 'sha256');
|
var hashBits = forge.pbkdf2(key, forge.util.encodeUtf8(password), 1, 256 / 8, 'sha256');
|
||||||
return forge.util.encode64(hashBits);
|
return forge.util.encode64(hashBits);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
angular.module("bit")
|
angular.module("bit")
|
||||||
.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","apiUri":"https://api.bitwarden.com","version":"1.9.0","environment":"Production"});
|
.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","apiUri":"https://api.bitwarden.com","version":"1.9.1","environment":"Production"});
|
||||||
|
Loading…
Reference in New Issue
Block a user