-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added control for the nil request #507
Conversation
/lgtm |
https.go
Outdated
@@ -246,7 +246,11 @@ func (proxy *ProxyHttpServer) handleHttps(w http.ResponseWriter, r *http.Request | |||
return | |||
} | |||
if err != nil { | |||
ctx.Warnf("Illegal URL %s", "https://"+r.Host+req.URL.Path) | |||
if req != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive by review: Should this be if req.URL != nil
? If req
is nil
, then I'd expect isWebSocketRequest
above to panic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch. I've changed to if req.URL != nil
instead.
Any plans to merge this? |
We need a maintainer approval. |
…491) ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
The patch to be dropped on the nearest CSI driver rebase (upstream aws-ebs CSI driver does not depend on goproxy since v1.19.0). The PR removing goproxy deps upstream: kubernetes-sigs#1602 The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
…s#2511) The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788 Co-authored-by: Maxim Patlasov <mpt@redhat.com>
…VE-2023-37788 > The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor ``` > where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
…VE-2023-37788 The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
…VE-2023-37788 The content of this patch resulted from: ``` $ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor ``` where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
This fix is to prevent Goproxy server crashes if the request cannot be parsed in line https://github.com/elazarl/goproxy/blob/master/https.go#L234 then logged in line https://github.com/elazarl/goproxy/blob/master/https.go#L249 when proxy is in MITM mode.
Fixes #502