cookie-quick-manager icon indicating copy to clipboard operation
cookie-quick-manager copied to clipboard

Fails to correctly restore cookies saved to Netscape formatted cookies.txt

Open barkoder opened this issue 7 months ago • 0 comments

Steps to reproduce -

  1. Go to about:addons and set Export template to Netscape for Cookie Quick Manager.

  2. Go to Cookie Quick Manager options moz-extension://<EXTENSION_GUID>/options.html and delete all cookies

  3. Login to your website of choice.

  4. Go to Cookie Quick Manager options and Save all to cookies.txt

  5. Delete all cookies.

  6. Restore cookies from cookies.txt

  7. Go to your website of choice again, and refresh the webpage.

  8. You're logged out!

This only happens when restoring Netscape formatted cookies.txt. Restoring cookies.json works fine.

In my investigation, I found that some fields are missing from cookies.txt that are present in cookies.json

  1. Login to website, say github.com

  2. Export to cookies.json

  3. Delete all cookies in cookie quick manager.

  4. Restore cookies.json

  5. Change to Netscape format from JSON format in about:addon options.

  6. Go to Cookie Quick Manager options and Export to cookies.txt

  7. Delete all cookies in cookie quick manager.

  8. Restore cookies.txt

  9. Change to JSON format from Netscape format in about:addon options.

  10. Export to cookies(1).json

  11. diff 'cookies(1).json' 'cookies.json'

  12. cookies(1).json and cookies.json should be identical but they are not. Some fields have been changed.

The original cookies.json had

"HTTP only raw": "true",
"SameSite raw": "lax",
"First Party Domain": "github.com"

but in cookies(1).json that has been changed to

"HTTP only raw": "false",
"SameSite raw": "no_restriction",
"First Party Domain": ""

Thanks for the extension @ysard . When you're not busy, I hope you or someone else gets around to fixing this issue. Thanks!

barkoder avatar May 16 '25 20:05 barkoder