sentry-go icon indicating copy to clipboard operation
sentry-go copied to clipboard

fix: input validation to NewRequest

Open athyk opened this issue 1 year ago • 1 comments

Fixes panic: runtime error: invalid memory address or nil pointer dereference when passing http.Request that has not defined r.Host or r.URL.Path or even just nil in general.

req := &http.Request{}
sentry.NewRequest(req)

athyk avatar Jun 28 '24 00:06 athyk

This is a breaking change, as it changes the signature of NewRequest. I assume that's used externally (as it's public/exposed). The added validation doesn't seem worthy of a breaking change.

ribice avatar Jul 01 '24 14:07 ribice