mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
Add check that the request is good
Upstream-commit: e4752c8c1a09fc3cc96dbb9be7183b271db3d6b7 Component: engine
This commit is contained in:
@@ -736,6 +736,9 @@ func GetReleaseVersion() string {
|
||||
return ""
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.ContentLength > 24 || resp.StatusCode != 200 {
|
||||
return ""
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user