Kaynağa Gözat

propagate require-sasl into tor-listeners.require-sasl

tags/v2.7.0-rc1
Shivaram Lingamneni 3 yıl önce
ebeveyn
işleme
2d31a16647
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6
    0
      irc/config.go

+ 6
- 0
irc/config.go Dosyayı Görüntüle

@@ -1333,6 +1333,12 @@ func LoadConfig(filename string) (config *Config, err error) {
1333 1333
 		config.Accounts.Registration.AllowBeforeConnect = false
1334 1334
 	}
1335 1335
 
1336
+	if config.Accounts.RequireSasl.Enabled {
1337
+		// minor gotcha: Tor listeners will typically be loopback and
1338
+		// therefore exempted from require-sasl. if require-sasl is enabled
1339
+		// for non-Tor (non-local) connections, enable it for Tor as well:
1340
+		config.Server.TorListeners.RequireSasl = true
1341
+	}
1336 1342
 	config.Accounts.RequireSasl.exemptedNets, err = utils.ParseNetList(config.Accounts.RequireSasl.Exempted)
1337 1343
 	if err != nil {
1338 1344
 		return nil, fmt.Errorf("Could not parse require-sasl exempted nets: %v", err.Error())

Loading…
İptal
Kaydet