From 348d039b282fa97654020457527137cf0a53ebd1 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sat, 24 Dec 2022 10:10:07 +0100 Subject: [PATCH] Prevent others from mismatching their authentication token with the current, different client ID --- twitch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twitch.py b/twitch.py index 876a2007..d2dcebe5 100644 --- a/twitch.py +++ b/twitch.py @@ -560,6 +560,8 @@ async def _validate(self): break else: raise RuntimeError("Login verification failure") + if validate_response["client_id"] != CLIENT_ID: + raise MinerException("You're using an old cookie file, please generate a new one.") self.user_id = int(validate_response["user_id"]) cookie["persistent"] = str(self.user_id) logger.info(f"Login successful, user ID: {self.user_id}")