Closed user202729 closed 7 months ago
sorry I am just looking at this, Could you clarify why are we changing the format in the session file ?
If I recalled correctly, the issue is that TLX (and a few other websites) store the session key in JavaScript localStorage, so we need to also backup that.
As for the format of the session file, it might be desirable to maintain some backwards compatibility (?) by storing e.g. the file format version (from now on), and then handle it accordingly. (what do you think?)
adding a version entry to the file sounds reasonable, but lets completely deprecate the old one anyways, what I mean is, if the session file they have does not have that "version" entry just ignore it and assume there is no session file. Probably also just print a message in the terminal if it detects they have the old session to warn the user that they will have to login to all their sessions again
Hey @user202729, still working on the changes ?
Alright, all fixed.
What could go wrong? (e.g. user forget password and cpbooster is the only place left where the user is logged in? Can't happen right?)
Looks good, but will give it a day before merging, in case you want to still change something
Note:
This creates a breaking change in the format of the file
~/.cpbooster/cpbooster-session.json
-- if the user upgrade to this version, then all of their cookies will be deleted and they have to login to all sites again.This one is fixable (handling both old and new format), but it will create some legacy code.