Skip to content

Commit 65ff570

Browse files
authored
Merge pull request #69 from bertrandom/fix/apple-silicon
Fix/apple silicon - @3.0.0-beta.1
2 parents 6c46d41 + 32b7d37 commit 65ff570

4 files changed

Lines changed: 865 additions & 263 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ const getCookies = async (uri, format, callback, profileOrPath) => {
369369
// http://tools.ietf.org/html/rfc6265#section-5.4
370370

371371
db.each(
372-
"SELECT host_key, path, is_secure, expires_utc, name, value, encrypted_value, creation_utc, is_httponly, has_expires, is_persistent FROM cookies where host_key like '%" + domain + "' ORDER BY LENGTH(path) DESC, creation_utc ASC",
372+
"SELECT host_key, path, is_secure, expires_utc, name, value, hex(encrypted_value) as encrypted_value, creation_utc, is_httponly, has_expires, is_persistent FROM cookies where host_key like '%" + domain + "' ORDER BY LENGTH(path) DESC, creation_utc ASC",
373373
function (err, cookie) {
374374

375375
let encryptedValue;
@@ -379,7 +379,7 @@ const getCookies = async (uri, format, callback, profileOrPath) => {
379379
}
380380

381381
if (cookie.value === '' && cookie.encrypted_value.length > 0) {
382-
encryptedValue = cookie.encrypted_value;
382+
encryptedValue = Buffer.from(cookie.encrypted_value, 'hex');
383383

384384
if (process.platform === 'win32') {
385385
if (encryptedValue[0] == 0x01 && encryptedValue[1] == 0x00 && encryptedValue[2] == 0x00 && encryptedValue[3] == 0x00){

0 commit comments

Comments
 (0)