From 488d637eb9df2649444c5223c61669e142096a2b Mon Sep 17 00:00:00 2001 From: kliment-slice <61919865+kliment-slice@users.noreply.github.com> Date: Mon, 20 May 2024 17:36:07 +0300 Subject: [PATCH] fix(unchunker): initial allowed message size to env var (#158) * initial allowed message size to env var --- python/src/wslink/chunking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/src/wslink/chunking.py b/python/src/wslink/chunking.py index dd9b5b1..5db73c9 100644 --- a/python/src/wslink/chunking.py +++ b/python/src/wslink/chunking.py @@ -1,3 +1,4 @@ +import os import sys import secrets import msgpack @@ -87,7 +88,7 @@ class UnChunker: def __init__(self): self.pending_messages = {} - self.max_message_size = 512 + self.max_message_size = int(os.environ.get("WSLINK_AUTH_MSG_SIZE", 512)) def set_max_message_size(self, size): self.max_message_size = size