mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 00:19:29 +01:00
Merge pull request #1783 from slingamn/scram_mechanisms
remove SCRAM-SHA-256 from advertised SASL mechanisms
This commit is contained in:
commit
0baaf0b711
@ -303,6 +303,7 @@ func (t *ThrottleConfig) UnmarshalYAML(unmarshal func(interface{}) error) (err e
|
|||||||
type AccountConfig struct {
|
type AccountConfig struct {
|
||||||
Registration AccountRegistrationConfig
|
Registration AccountRegistrationConfig
|
||||||
AuthenticationEnabled bool `yaml:"authentication-enabled"`
|
AuthenticationEnabled bool `yaml:"authentication-enabled"`
|
||||||
|
AdvertiseSCRAM bool `yaml:"advertise-scram"` // undocumented, see #1782
|
||||||
RequireSasl struct {
|
RequireSasl struct {
|
||||||
Enabled bool
|
Enabled bool
|
||||||
Exempted []string
|
Exempted []string
|
||||||
@ -1379,7 +1380,12 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||||||
config.Accounts.VHosts.validRegexp = defaultValidVhostRegex
|
config.Accounts.VHosts.validRegexp = defaultValidVhostRegex
|
||||||
}
|
}
|
||||||
|
|
||||||
config.Server.capValues[caps.SASL] = "PLAIN,EXTERNAL,SCRAM-SHA-256"
|
saslCapValue := "PLAIN,EXTERNAL,SCRAM-SHA-256"
|
||||||
|
// TODO(#1782) clean this up:
|
||||||
|
if !config.Accounts.AdvertiseSCRAM {
|
||||||
|
saslCapValue = "PLAIN,EXTERNAL"
|
||||||
|
}
|
||||||
|
config.Server.capValues[caps.SASL] = saslCapValue
|
||||||
if !config.Accounts.AuthenticationEnabled {
|
if !config.Accounts.AuthenticationEnabled {
|
||||||
config.Server.supportedCaps.Disable(caps.SASL)
|
config.Server.supportedCaps.Disable(caps.SASL)
|
||||||
}
|
}
|
||||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
|||||||
Subproject commit 9de76b6063c8c837399d7449218f3b87fb1a1524
|
Subproject commit 125a1cc106655b8c34705fd74a2704fccb8ec91e
|
Loading…
Reference in New Issue
Block a user