mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
PM-12102 | Fix LastPass importer not properly de-encrypting URLs (#11366)
* PM-12102 | Fix LastPass importer not properly de-encrypting URLs * Reuse the original code for the unencrypted path * Add some comments
This commit is contained in:
parent
68f4c2e879
commit
359b6e02d9
@ -60,9 +60,17 @@ export class Parser {
|
|||||||
|
|
||||||
// 3: url
|
// 3: url
|
||||||
step = 3;
|
step = 3;
|
||||||
let url = Utils.fromBufferToUtf8(
|
const urlEncoded = this.readItem(reader);
|
||||||
this.decodeHexLoose(Utils.fromBufferToUtf8(this.readItem(reader))),
|
let url =
|
||||||
);
|
urlEncoded.length > 0 && urlEncoded[0] === 33 // 33 = '!'
|
||||||
|
? // URL is encrypted
|
||||||
|
await this.cryptoUtils.decryptAes256PlainWithDefault(
|
||||||
|
urlEncoded,
|
||||||
|
encryptionKey,
|
||||||
|
placeholder,
|
||||||
|
)
|
||||||
|
: // URL is not encrypted
|
||||||
|
Utils.fromBufferToUtf8(this.decodeHexLoose(Utils.fromBufferToUtf8(urlEncoded)));
|
||||||
|
|
||||||
// Ignore "group" accounts. They have no credentials.
|
// Ignore "group" accounts. They have no credentials.
|
||||||
if (url == "http://group") {
|
if (url == "http://group") {
|
||||||
|
Loading…
Reference in New Issue
Block a user