Skip to content

Commit

Permalink
p2p-proxy: better request length checking
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Dec 1, 2020
1 parent 895b340 commit a329e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/p2p_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit a329e4f

Please sign in to comment.