Dont send default server password to the client
This commit is contained in:
parent
1a7360a573
commit
2e8418516a
4 changed files with 28 additions and 13 deletions
|
@ -97,6 +97,12 @@ func (h *wsHandler) connect(b []byte) {
|
|||
i.Password = data.Password
|
||||
i.Realname = data.Realname
|
||||
|
||||
if data.Password == "" && viper.GetString("defaults.password") != "" {
|
||||
i.Password = viper.GetString("defaults.password")
|
||||
} else {
|
||||
i.Password = data.Password
|
||||
}
|
||||
|
||||
if cert := h.session.user.GetCertificate(); cert != nil {
|
||||
i.TLSConfig = &tls.Config{
|
||||
Certificates: []tls.Certificate{*cert},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue