forked from Hay1tsme/artemis
Encryption started in v1.10 (DX PLUS)
This commit is contained in:
@ -350,7 +350,7 @@ class Mai2Servlet(BaseServlet):
|
|||||||
if (
|
if (
|
||||||
not encrypted
|
not encrypted
|
||||||
and self.game_cfg.crypto.encrypted_only
|
and self.game_cfg.crypto.encrypted_only
|
||||||
and version >= 120 # TODO: Since when was encryption implemented?
|
and version >= 110
|
||||||
):
|
):
|
||||||
self.logger.error(
|
self.logger.error(
|
||||||
"Unencrypted v%s %s request, but config is set to encrypted only: %r",
|
"Unencrypted v%s %s request, but config is set to encrypted only: %r",
|
||||||
@ -400,7 +400,7 @@ class Mai2Servlet(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 encrypted or version < 120: # TODO: Since when was encryption implemented?
|
if not encrypted or version < 110:
|
||||||
return Response(zipped)
|
return Response(zipped)
|
||||||
|
|
||||||
padded = pad(zipped, 16)
|
padded = pad(zipped, 16)
|
||||||
|
Reference in New Issue
Block a user