mirror of
https://github.com/ergochat/ergo.git
synced 2025-06-06 23:07:32 +02:00
Merge pull request #2249 from slingamn/targetspanic
validate that CHATHISTORY limit parameters are nonnegative
This commit is contained in:
commit
2cf569c5d9
@ -765,7 +765,7 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.Message, rb *
|
||||
return maxChathistoryLimit
|
||||
}
|
||||
limit, err := strconv.Atoi(msg.Params[paramIndex])
|
||||
if err != nil || limit == 0 || limit > maxChathistoryLimit {
|
||||
if err != nil || limit <= 0 || limit > maxChathistoryLimit {
|
||||
limit = maxChathistoryLimit
|
||||
}
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user