cpbooster icon indicating copy to clipboard operation
cpbooster copied to clipboard

Implement submit to TLX

Open user202729 opened this issue 1 year ago • 6 comments

Note:

  • Depends on #https://github.com/searleser97/cpbooster/pull/105. Maybe review that one first.

  • 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.

user202729 avatar Oct 22 '23 08:10 user202729

sorry I am just looking at this, Could you clarify why are we changing the format in the session file ?

searleser97 avatar Dec 08 '23 15:12 searleser97

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?)

user202729 avatar Dec 08 '23 15:12 user202729

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

searleser97 avatar Dec 08 '23 16:12 searleser97

Hey @user202729, still working on the changes ?

searleser97 avatar Dec 14 '23 16:12 searleser97

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?)

user202729 avatar Dec 15 '23 07:12 user202729

Looks good, but will give it a day before merging, in case you want to still change something

searleser97 avatar Dec 15 '23 07:12 searleser97