diff --git a/contrib/pantalaimon.conf b/contrib/pantalaimon.conf index 922d1be..9b08bda 100644 --- a/contrib/pantalaimon.conf +++ b/contrib/pantalaimon.conf @@ -8,3 +8,4 @@ ListenAddress = localhost ListenPort = 8009 Proxy = http://localhost:8080 SSL = False +IgnoreVerification = False diff --git a/man/pantalaimon.conf.5 b/man/pantalaimon.conf.5 index e0a0efe..53c4906 100644 --- a/man/pantalaimon.conf.5 +++ b/man/pantalaimon.conf.5 @@ -41,6 +41,11 @@ homeserver. .It Cm SSL A boolean that decides if SSL verification should be enabled for outgoing connections to the homeserver. Defaults to "True". +.It Cm IgnoreVerification +A boolean that decides if device verification should be enabled. If this is True +devices will be marked as ignored automatically and encryption keys will be +shared with them, if this is False the user needs to verify, blacklist or ignore +devices manually before messages can be sent to a room. Defaults to "False". .El .Pp Aditional to the homeserver section a special section with the name @@ -50,6 +55,7 @@ can be used to configure the following values for all homeservers: .Cm ListenPort , .Cm Proxy , .Cm SSL +.Cm IgnoreVerification .Pp The .Cm Default diff --git a/pantalaimon/config.py b/pantalaimon/config.py index 40c9c38..7e99b18 100644 --- a/pantalaimon/config.py +++ b/pantalaimon/config.py @@ -14,6 +14,7 @@ class PanConfigParser(configparser.ConfigParser): default_section="Default", defaults={ "SSL": "True", + "IgnoreVerification": "False", "ListenAddress": "localhost", "ListenPort": "8009", "LogLevel": "warnig", @@ -93,6 +94,7 @@ class ServerConfig: listen_port = attr.ib(type=int) proxy = attr.ib(type=str) ssl = attr.ib(type=bool, default=True) + ignore_verification = attr.ib(type=bool, default=False) @attr.s @@ -142,6 +144,7 @@ class PanConfig: listen_address = section.getaddress("ListenAddress") listen_port = section.getint("ListenPort") ssl = section.getboolean("SSL") + ignore_verification = section.getboolean("IgnoreVerification") proxy = section.geturl("Proxy") listen_tuple = (listen_address, listen_port) @@ -158,7 +161,8 @@ class PanConfig: listen_address, listen_port, proxy, - ssl + ssl, + ignore_verification ) self.servers[section_name] = server_conf diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index c1cfb51..f00185f 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -724,7 +724,7 @@ class ProxyDaemon: async with sem: try: - return await _send() + return await _send(self.conf.ignore_verification) except OlmTrustError as e: # There are unverified/unblocked devices in the room, notify # the UI thread about this and wait for a response.