Added a check for malformed headers
This commit is contained in:
parent
d58f68f3fe
commit
bb5d849cd9
3 changed files with 25 additions and 0 deletions
|
@ -177,6 +177,10 @@ func (s *server) handleConnection(conn net.Conn) {
|
|||
continue
|
||||
}
|
||||
|
||||
if colon > len(message)-4 {
|
||||
continue
|
||||
}
|
||||
|
||||
key := message[:colon]
|
||||
value := message[colon+2 : len(message)-2]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue