fix: recaptcha fixes, auth fixes and line endings

* http: auth: remove unnecessary fields in recaptcha validation

* http: render: never expose ReCaptchaSecret to public

* build: dos2unix build.sh
pull/340/head
Equim 2018-01-22 16:35:39 +08:00 committed by Henrique Dias
parent 93566aceef
commit 9b8c2862e2
3 changed files with 21 additions and 25 deletions

View File

@ -39,9 +39,6 @@ func reCaptcha(secret string, response string) (bool, error) {
var data struct {
Success bool `json:"success"`
ChallengeTS time.Time `json:"challenge_ts"`
Hostname string `json:"hostname"`
ErrorCodes interface{} `json:"error-codes"`
}
err = json.NewDecoder(resp.Body).Decode(&data)

View File

@ -229,7 +229,6 @@ func renderFile(c *fm.Context, w http.ResponseWriter, file string) (int, error)
"CSS": template.CSS(c.CSS),
"ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "",
"ReCaptchaKey": c.ReCaptchaKey,
"ReCaptchaSecret": c.ReCaptchaSecret,
}
if c.StaticGen != nil {