Skip to content

Commit

Permalink
Merge pull request #1636 from slingamn/tor_require_sasl
Browse files Browse the repository at this point in the history
propagate require-sasl into tor-listeners.require-sasl
  • Loading branch information
slingamn committed Apr 26, 2021
2 parents 317720b + 2d31a16 commit 5c157ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions irc/config.go
Expand Up @@ -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())
Expand Down

0 comments on commit 5c157ad

Please sign in to comment.