Fix handling of cookies in Chromium cookie database versions >=24. #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NB: Please make an issue prior to embarking on any significant effort towards
a pull request. This will serve as a unified place for discussion and hopefully
make sure that the change seems reasonable to merge once its implementation is
complete.
Description
This attempts to fix the problem described in #72, which I believe I've identified as being caused by the Chromium cookie database format changing to include a SHA256 hash of the domain for the cookie as part of the encrypted value.
To handle this case, I've extracted the database version of the cookie database. If it is greater than 24, I remove the first 32 bytes of the encrypted value before it is passed to clean.
I've also added a fix for not being able to read the value from the database at all, by treating all database strings as byte strings and then decoding them to UTF-8 only after decryption has happened.
Status
READY
Related Issues
Fixes #72.
Todos
Steps to Test or Reproduce
E.g.:
Other notes