From cc86d4509ea5271dd64ab633b6d584f9c527ab71 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Thu, 30 Nov 2023 18:10:22 -0500 Subject: [PATCH] adb: fix for when user_id is None --- core/aimedb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/aimedb.py b/core/aimedb.py index 80d6329..211da5f 100644 --- a/core/aimedb.py +++ b/core/aimedb.py @@ -181,7 +181,7 @@ class AimedbProtocol(Protocol): f"access_code {req.access_code} -> user_id {ret.user_id}" ) - if user_id > 0 and self.config.aimedb.id_secret: + if user_id and user_id > 0 and self.config.aimedb.id_secret: auth_key = create_sega_auth_key(user_id, req.head.game_id, req.head.store_id, self.config.aimedb.id_secret) if auth_key is not None: auth_key_extra_len = 256 - len(auth_key) @@ -253,7 +253,7 @@ class AimedbProtocol(Protocol): resp = ADBFelicaLookup2Response.from_req(req.head, user_id, access_code) - if user_id > 0 and self.config.aimedb.id_secret: + if user_id and user_id > 0 and self.config.aimedb.id_secret: auth_key = create_sega_auth_key(user_id, req.head.game_id, req.head.store_id, self.config.aimedb.id_secret) if auth_key is not None: auth_key_extra_len = 256 - len(auth_key)