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:
parent
2ad861f4b0
commit
61ef803026
1 changed files with 2 additions and 2 deletions
|
@ -330,8 +330,8 @@ func (t *TransformingTransport) RoundTrip(req *http.Request) (*http.Response, er
|
||||||
|
|
||||||
img, err := Transform(b, opt)
|
img, err := Transform(b, opt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error transforming image %s: %v", u.String(), err)
|
// probablyt not an image will not proxy
|
||||||
img = b
|
return nil, fmt.Errorf("error transforming image %s: %v", u.String(), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// replay response with transformed image and updated content length
|
// replay response with transformed image and updated content length
|
||||||
|
|
Loading…
Add table
Reference in a new issue