mirror of
https://github.com/moby/moby.git
synced 2026-08-02 22:26:52 +00:00
Add check that the request is good
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