changeset 334:36d6763af547

chat: encrypt uploaded file if the session is encrypted
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 12:29:37 +0100
parents 69d2a96ce26f
children 597cc207c8e7
files cagou/plugins/plugin_wid_chat.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py	Fri Dec 20 12:29:37 2019 +0100
+++ b/cagou/plugins/plugin_wid_chat.py	Fri Dec 20 12:29:37 2019 +0100
@@ -692,6 +692,8 @@
             options = {
                 "ignore_tls_errors": not G.host.tls_validation,
             }
+            if self.encrypted:
+                options['encryption'] = C.ENC_AES_GCM
             G.host.bridge.fileUpload(
                 str(file_path),
                 "",