Skip to content

Commit

Permalink
Update login.py LoginSecure fix (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfovik authored Feb 3, 2024
1 parent a00cf4d commit 13c41cc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions steampy/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ def _send_login_request(self) -> Response:
def set_sessionid_cookies(self):
community_domain = SteamUrl.COMMUNITY_URL[8:]
store_domain = SteamUrl.STORE_URL[8:]
community_cookie_dic = self.session.cookies.get_dict(domain = community_domain)
store_cookie_dic = self.session.cookies.get_dict(domain = store_domain)

This comment has been minimized.

Copy link
@xidios

xidios Feb 10, 2024

unused line

for name in ('steamLoginSecure', 'sessionid', 'steamRefresh_steam', 'steamCountry'):
cookie = self.session.cookies.get_dict()[name]
community_cookie = create_cookie(name, cookie, community_domain)
store_cookie = create_cookie(name, cookie, store_domain)
if name in ["sessionid", "steamLoginSecure"]:
community_cookie = create_cookie(name, community_cookie_dic[name], community_domain)
else:
community_cookie = create_cookie(name, cookie, community_domain)

This comment has been minimized.

Copy link
@invoker-bot

invoker-bot Feb 28, 2024

should add store_cookie = create_cookie(name, store_cookie_dict.get(name, cookie), store_domain), please fix this bug.

This comment has been minimized.

Copy link
@d1ret

d1ret Sep 7, 2024

store_cookie_dict

store_cookie_dic*

store_cookie = create_cookie(name, store_cookie_dic.get(name, cookie), store_domain)

self.session.cookies.set(**community_cookie)
self.session.cookies.set(**store_cookie)
self.session.cookies.set(**store_cookie)

def _fetch_rsa_params(self, current_number_of_repetitions: int = 0) -> dict:
self.session.post(SteamUrl.COMMUNITY_URL)
Expand Down

0 comments on commit 13c41cc

Please sign in to comment.