Skip to content

Commit

Permalink
fix: close response body on the client side
Browse files Browse the repository at this point in the history
  • Loading branch information
darora committed Aug 30, 2021
1 parent f43454a commit 7589873
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/hcaptcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func verifyCaptchaCode(token string, secretKey string, clientIP string) (Verific
return VerificationProcessFailure, errors.Wrap(err, "failed to verify hcaptcha token")
}
verResult := VerificationResponse{}
defer res.Body.Close()
decoder := json.NewDecoder(res.Body)
err = decoder.Decode(&verResult)
if err != nil {
Expand Down

0 comments on commit 7589873

Please sign in to comment.