From 31188ccce6570b005d9afa4286edeb009b96fe8c Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Tue, 10 Oct 2023 16:06:58 +0200 Subject: [PATCH] IDAC: Hotfix to block amdaemon_emu users without correct access code --- titles/idac/season2.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/titles/idac/season2.py b/titles/idac/season2.py index 6ce6b37..537ea0d 100644 --- a/titles/idac/season2.py +++ b/titles/idac/season2.py @@ -342,16 +342,25 @@ class IDACSeason2(IDACBase): def handle_login_checklock_request(self, data: Dict, headers: Dict): user_id = data["id"] + access_code = data["accesscode"] + is_new_player = 0 - # check if an IDAC profile already exists - p = self.data.profile.get_profile(user_id, self.version) - is_new_player = 1 if p is None else 0 + # check that the user_id from access_code matches the user_id + if user_id == self.data.card.get_user_id_from_card(access_code): + lock_result = 1 + + # check if an IDAC profile already exists + p = self.data.profile.get_profile(user_id, self.version) + is_new_player = 1 if p is None else 0 + else: + lock_result = 0 + user_id = "" # other: in use return { "status_code": "0", # 0 = already in use, 1 = good, 2 = too new - "lock_result": 1, + "lock_result": lock_result, "lock_date": int(datetime.now().timestamp()), "daily_play": 1, "session": f"{user_id}",