diff sat/memory/params.py @ 2687:e9cd473a2f46

core (xmpp): server certificate validation: XMPP server certificate is now checked, and connection is refused (by default) if it's not valid. Certificate check can be disabled in the new parameter "Configuration/check_certificate". If certificate checking is disabled, a warning note is sent on every new connection. Twisted and Wokkel are temporarly monkey patched in sat.core.tls_patches module, until modifications are merged upstream.
author Goffi <goffi@goffi.org>
date Sat, 10 Nov 2018 10:16:35 +0100
parents 56f94936df1e
children 378188abe941
line wrap: on
line diff
--- a/sat/memory/params.py	Fri Nov 09 16:17:45 2018 +0100
+++ b/sat/memory/params.py	Sat Nov 10 10:16:35 2018 +0100
@@ -75,23 +75,25 @@
             <param name="%(force_port_param)s" value="" type="int" constraint="1;65535" security="50" />
             <param name="autoconnect" label="%(autoconnect_label)s" value="true" type="bool" security="50" />
             <param name="autodisconnect" label="%(autodisconnect_label)s" value="false"  type="bool" security="50" />
+            <param name="check_certificate" label="%(check_certificate_label)s" value="true"  type="bool" security="4" />
         </category>
     </individual>
     </params>
     """ % {
-        "category_general": D_("General"),
-        "category_connection": D_("Connection"),
-        "history_param": C.HISTORY_LIMIT,
-        "history_label": D_("Chat history limit"),
-        "show_offline_contacts": C.SHOW_OFFLINE_CONTACTS,
-        "show_offline_contacts_label": D_("Show offline contacts"),
-        "show_empty_groups": C.SHOW_EMPTY_GROUPS,
-        "show_empty_groups_label": D_("Show empty groups"),
-        "force_server_param": C.FORCE_SERVER_PARAM,
-        "force_port_param": C.FORCE_PORT_PARAM,
-        "new_account_label": D_("Register new account"),
-        "autoconnect_label": D_("Connect on frontend startup"),
-        "autodisconnect_label": D_("Disconnect on frontend closure"),
+        u"category_general": D_(u"General"),
+        u"category_connection": D_(u"Connection"),
+        u"history_param": C.HISTORY_LIMIT,
+        u"history_label": D_(u"Chat history limit"),
+        u"show_offline_contacts": C.SHOW_OFFLINE_CONTACTS,
+        u"show_offline_contacts_label": D_(u"Show offline contacts"),
+        u"show_empty_groups": C.SHOW_EMPTY_GROUPS,
+        u"show_empty_groups_label": D_(u"Show empty groups"),
+        u"force_server_param": C.FORCE_SERVER_PARAM,
+        u"force_port_param": C.FORCE_PORT_PARAM,
+        u"new_account_label": D_(u"Register new account"),
+        u"autoconnect_label": D_(u"Connect on frontend startup"),
+        u"autodisconnect_label": D_(u"Disconnect on frontend closure"),
+        u"check_certificate_label": D_(u"Check certificate (don't uncheck if unsure)"),
     }
 
     def load_default_params(self):