1
0
mirror of synced 2024-11-28 07:50:48 +01:00

adding encryption version check for Ongeki

This commit is contained in:
Midorica 2023-11-09 00:10:19 -05:00
parent eaf64dbd50
commit 4047a38370

View File

@ -208,6 +208,7 @@ class OngekiServlet(BaseServlet):
if ( if (
not encrtped not encrtped
and self.game_cfg.crypto.encrypted_only and self.game_cfg.crypto.encrypted_only
and version >= 120
): ):
self.logger.error( self.logger.error(
f"Unencrypted v{version} {endpoint} request, but config is set to encrypted only: {req_raw}" f"Unencrypted v{version} {endpoint} request, but config is set to encrypted only: {req_raw}"
@ -251,7 +252,7 @@ class OngekiServlet(BaseServlet):
zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8")) zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8"))
if not encrtped: if not encrtped and version < 120:
return zipped return zipped
padded = pad(zipped, 16) padded = pad(zipped, 16)