Prevent others from mismatching their authentication token with the current, different client ID

This commit is contained in:
DevilXD
2022-12-24 10:10:07 +01:00
parent 3892dfe59e
commit 348d039b28

View File

@@ -560,6 +560,8 @@ class _AuthState:
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}")