From a843e3d3ac1e67f66fc483272a77c939f40cba95 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Sat, 18 Feb 2023 23:40:19 -0500 Subject: [PATCH] added token replacement --- core/allnet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/allnet.py b/core/allnet.py index 49b7828..b528295 100644 --- a/core/allnet.py +++ b/core/allnet.py @@ -142,11 +142,15 @@ class AllnetServlet: req.region_name2 = arcade["city"] req.client_timezone = arcade["timezone"] if arcade["timezone"] is not None else "+0900" + int_ver = req.ver.replace(".", "") + req.uri = req.uri.replace("$v", int_ver) + req.host = req.host.replace("$v", int_ver) + msg = f"{req.serial} authenticated from {request_ip}: {req.game_id} v{req.ver}" self.data.base.log_event("allnet", "ALLNET_AUTH_SUCCESS", logging.INFO, msg) self.logger.info(msg) - return self.dict_to_http_form_string([vars(resp)]) + return self.dict_to_http_form_string([vars(resp)]).encode("utf-8") def handle_dlorder(self, request: Request, _: Dict): request_ip = request.getClientAddress().host