Sfoglia il codice sorgente

remove SCRAM-SHA-256 from advertised SASL mechanisms

Advertising SCRAM-SHA-256 breaks irccloud, which doesn't fall back to PLAIN
if it sees SCRAM advertised but SCRAM then fails (as is the case for any
account password hashed on Ergo 2.7 or lower).

Leave a config option for irctest to enable it in the controller.
tags/v2.8.0-rc1
Shivaram Lingamneni 2 anni fa
parent
commit
12947644e2
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7
    1
      irc/config.go

+ 7
- 1
irc/config.go Vedi File

@@ -303,6 +303,7 @@ func (t *ThrottleConfig) UnmarshalYAML(unmarshal func(interface{}) error) (err e
303 303
 type AccountConfig struct {
304 304
 	Registration          AccountRegistrationConfig
305 305
 	AuthenticationEnabled bool `yaml:"authentication-enabled"`
306
+	AdvertiseSCRAM        bool `yaml:"advertise-scram"` // undocumented, see #1782
306 307
 	RequireSasl           struct {
307 308
 		Enabled      bool
308 309
 		Exempted     []string
@@ -1379,7 +1380,12 @@ func LoadConfig(filename string) (config *Config, err error) {
1379 1380
 		config.Accounts.VHosts.validRegexp = defaultValidVhostRegex
1380 1381
 	}
1381 1382
 
1382
-	config.Server.capValues[caps.SASL] = "PLAIN,EXTERNAL,SCRAM-SHA-256"
1383
+	saslCapValue := "PLAIN,EXTERNAL,SCRAM-SHA-256"
1384
+	// TODO(#1782) clean this up:
1385
+	if !config.Accounts.AdvertiseSCRAM {
1386
+		saslCapValue = "PLAIN,EXTERNAL"
1387
+	}
1388
+	config.Server.capValues[caps.SASL] = saslCapValue
1383 1389
 	if !config.Accounts.AuthenticationEnabled {
1384 1390
 		config.Server.supportedCaps.Disable(caps.SASL)
1385 1391
 	}

Loading…
Annulla
Salva