mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
tweaks for consistency
This commit is contained in:
parent
98e83b0a82
commit
6033d9f569
@ -211,7 +211,7 @@ type OperConfig struct {
|
||||
Vhost string
|
||||
WhoisLine string `yaml:"whois-line"`
|
||||
Password string
|
||||
Certfp string
|
||||
Fingerprint string
|
||||
Modes string
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ type Oper struct {
|
||||
WhoisLine string
|
||||
Vhost string
|
||||
Pass []byte
|
||||
Certfp string
|
||||
Fingerprint string
|
||||
Modes []modes.ModeChange
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ func (conf *Config) Operators(oc map[string]*OperClass) (map[string]*Oper, error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
oper.Certfp = opConf.Certfp
|
||||
oper.Fingerprint = opConf.Fingerprint
|
||||
|
||||
oper.Vhost = opConf.Vhost
|
||||
class, exists := oc[opConf.Class]
|
||||
|
@ -2180,7 +2180,7 @@ func operHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
||||
authorized := false
|
||||
oper := server.GetOperator(msg.Params[0])
|
||||
if oper != nil {
|
||||
if utils.CertfpsMatch(oper.Certfp, client.certfp) {
|
||||
if utils.CertfpsMatch(oper.Fingerprint, client.certfp) {
|
||||
authorized = true
|
||||
} else if 1 < len(msg.Params) {
|
||||
password := []byte(msg.Params[1])
|
||||
@ -2645,7 +2645,7 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
|
||||
if 0 < len(info.Password) && bcrypt.CompareHashAndPassword(info.Password, givenPassword) != nil {
|
||||
continue
|
||||
}
|
||||
if 0 < len(info.Fingerprint) && client.certfp != info.Fingerprint {
|
||||
if 0 < len(info.Fingerprint) && !utils.CertfpsMatch(info.Fingerprint, client.certfp) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ opers:
|
||||
|
||||
# if you're logged in using the client cert with this SHA-256 fingerprint,
|
||||
# you'll be able to /OPER without a password
|
||||
certfp: "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
|
||||
fingerprint: "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
|
||||
|
||||
# logging, takes inspiration from Insp
|
||||
logging:
|
||||
|
Loading…
Reference in New Issue
Block a user