Skip to content

Commit

Permalink
fixup! database: don't store creds in a pickle
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Sep 19, 2023
1 parent 21991da commit bc13781
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linkedin_matrix/db/upgrade/v08_splat_pickle_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ async def upgrade_v8(conn: Connection):
cookies = pickle.loads(client_pickle)
jsessionid, li_at = None, None
for cookies in cookies.values():
jsessionid = cookies.get("JSESSIONID").value
li_at = cookies.get("li_at").value
if j := cookies.get("JSESSIONID"):
jsessionid = j.value
if li := cookies.get("li_at"):
li_at = li.value

if not jsessionid or not li_at:
log.warning(f"User {user_id} doesn't have JSESSIONID or li_at")
Expand Down

0 comments on commit bc13781

Please sign in to comment.