Q726kbXuN / nytxw_puz

Turn NY Times crosswords into Across Lite files
The Unlicense
41 stars 10 forks source link

Cookie loading broken under Parallels #24

Open Q726kbXuN opened 1 year ago

Q726kbXuN commented 1 year ago

Cookie loading doesn't appear to work when run under a Parallels environment:

ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!
Traceback (most recent call last):
  File "browser_cookie3\__init__.pyc", line 450, in _decrypt
  File "browser_cookie3\__init__.pyc", line 441, in _decrypt_windows_chromium
  File "browser_cookie3\__init__.pyc", line 109, in _crypt_unprotect_data
RuntimeError: Failed to decrypt the cipher text with DPAPI

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "browser_cookie3\__init__.pyc", line 466, in _decrypt
  File "Cryptodome\Cipher\_mode_gcm.pyc", line 567, in decrypt_and_verify
  File "Cryptodome\Cipher\_mode_gcm.pyc", line 508, in verify
ValueError: MAC check failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nyt.py", line 567, in main
  File "nyt.py", line 284, in get_puzzle
  File "nyt.py", line 246, in load_cookies
  File "nyt.py", line 135, in chrome_bugfix
  File "browser_cookie3\__init__.pyc", line 426, in load
  File "browser_cookie3\__init__.pyc", line 468, in _decrypt
browser_cookie3.BrowserCookieError: Unable to get key for cookie decryption
ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!
Q726kbXuN commented 1 year ago

Ok, this appears to be because the "v10" encryption technique on Windows either changed its method of encrypting the master password when DPAPI isn't available. The logic that browser_cookie3 uses to decrypt from the key is throwing an exception.

Need to dig through the Chromium sources to understand what's happening.

In the meantime, FireFox on Parallels will work.