From 2d31a166473191520e6a20c1490b9cf4a3c3401f Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 26 Apr 2021 10:26:16 -0400 Subject: [PATCH] propagate require-sasl into tor-listeners.require-sasl --- irc/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/irc/config.go b/irc/config.go index 44168e7e..3fab6fe2 100644 --- a/irc/config.go +++ b/irc/config.go @@ -1333,6 +1333,12 @@ func LoadConfig(filename string) (config *Config, err error) { config.Accounts.Registration.AllowBeforeConnect = false } + if config.Accounts.RequireSasl.Enabled { + // minor gotcha: Tor listeners will typically be loopback and + // therefore exempted from require-sasl. if require-sasl is enabled + // for non-Tor (non-local) connections, enable it for Tor as well: + config.Server.TorListeners.RequireSasl = true + } config.Accounts.RequireSasl.exemptedNets, err = utils.ParseNetList(config.Accounts.RequireSasl.Exempted) if err != nil { return nil, fmt.Errorf("Could not parse require-sasl exempted nets: %v", err.Error())