Parcourir la source

Limit maximum TLS version in ftp_server to 1.2

This might fix (#58) getting uploads from the linux version of the
BambuStudio network plugin. Issue observer is connection resets with
larger uploads (somewhere >80k).
Gernot Vormayr il y a 3 mois
Parent
commit
47ed16ae60
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      backend/app/services/virtual_printer/ftp_server.py

+ 1 - 0
backend/app/services/virtual_printer/ftp_server.py

@@ -504,6 +504,7 @@ class VirtualPrinterFTPServer:
         self._ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
         self._ssl_context.load_cert_chain(str(self.cert_path), str(self.key_path))
         self._ssl_context.minimum_version = ssl.TLSVersion.TLSv1_2
+        self._ssl_context.maximum_version = ssl.TLSVersion.TLSv1_2
 
         # Use standard TLS settings for compatibility
         self._ssl_context.set_ciphers("HIGH:!aNULL:!MD5:!RC4")