Reject JOIN with invalid channel names
This prevents us from storing typo'ed channel names in the DB.
This commit is contained in:
parent
4b6a529b69
commit
517be78868
@ -1435,6 +1435,15 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
key = keys[i]
|
key = keys[i]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !uc.isChannel(upstreamName) {
|
||||||
|
dc.SendMessage(&irc.Message{
|
||||||
|
Prefix: dc.srv.prefix(),
|
||||||
|
Command: irc.ERR_NOSUCHCHANNEL,
|
||||||
|
Params: []string{name, "Not a channel name"},
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
params := []string{upstreamName}
|
params := []string{upstreamName}
|
||||||
if key != "" {
|
if key != "" {
|
||||||
params = append(params, key)
|
params = append(params, key)
|
||||||
|
Loading…
Reference in New Issue
Block a user