forked from External/ergo
Restrict ident length similar to other servers
This commit is contained in:
parent
8cd5db1194
commit
cfbb4361dc
4 changed files with 17 additions and 7 deletions
|
|
@ -2193,7 +2193,9 @@ func userHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
|||
return false
|
||||
}
|
||||
|
||||
err := client.SetNames(msg.Params[0], msg.Params[3])
|
||||
ident := msg.Params[0][:server.Limits().IdentLen-1] // -1 as SetNames adds the ~ at the start for us
|
||||
|
||||
err := client.SetNames(ident, msg.Params[3])
|
||||
if err == errInvalidUsername {
|
||||
rb.Add(nil, server.name, ERR_INVALIDUSERNAME, client.t("Malformed username"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue