mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 03:02:48 +01:00
config: don't casefold tls names
I don't think casefolding things like `:6697` ever made sense. Since these are configured by the ircd operator, it makes sense to assume they'll already be in a canonical form regardless.
This commit is contained in:
parent
449ef4cea1
commit
3b47f3d470
@ -369,12 +369,7 @@ func (conf *Config) TLSListeners() map[string]*tls.Config {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
name, err := CasefoldName(s)
|
tlsListeners[s] = config
|
||||||
if err == nil {
|
|
||||||
tlsListeners[name] = config
|
|
||||||
} else {
|
|
||||||
log.Println("Could not casefold TLS listener:", err.Error())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return tlsListeners
|
return tlsListeners
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,6 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/oragono/oragono/irc"
|
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -48,12 +46,7 @@ func (conf *Config) TLSListeners() map[string]*tls.Config {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
name, err := irc.CasefoldName(s)
|
tlsListeners[name] = config
|
||||||
if err == nil {
|
|
||||||
tlsListeners[name] = config
|
|
||||||
} else {
|
|
||||||
log.Println("Could not casefold TLS listener:", err.Error())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return tlsListeners
|
return tlsListeners
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user