0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2025-01-27 23:04:32 -05:00

fix XSS and potential SSRF

This commit is contained in:
Eran Chetz 2018-06-20 12:54:12 +03:00
parent 2ad861f4b0
commit 61ef803026

View file

@ -330,8 +330,8 @@ func (t *TransformingTransport) RoundTrip(req *http.Request) (*http.Response, er
img, err := Transform(b, opt)
if err != nil {
log.Printf("error transforming image %s: %v", u.String(), err)
img = b
// probablyt not an image will not proxy
return nil, fmt.Errorf("error transforming image %s: %v", u.String(), err)
}
// replay response with transformed image and updated content length