Commit a329e4fc authored by Adin Schmahmann's avatar Adin Schmahmann

p2p-proxy: better request length checking

parent 895b340e
......@@ -65,7 +65,7 @@ func parseRequest(request *http.Request) (*proxyRequest, error) {
}
split = strings.SplitN(path, "/", 7)
if split[3] != "x" || split[5] != "http" {
if len(split) < 7 || split[3] != "x" || split[5] != "http" {
return nil, fmt.Errorf("Invalid request path '%s'", path)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment