This commit is contained in:
Alicia 2019-02-23 16:36:02 +00:00
parent 580a7131e9
commit 36e1f9955d

View File

@ -93,11 +93,15 @@ func registerSubmit(c *gin.Context) {
registerResp(c, errorMessage{T(c, "Captcha is invalid.")}) registerResp(c, errorMessage{T(c, "Captcha is invalid.")})
return return
} }
fmt.Printf("%s", cmd5(c.PostForm("key")))
errr := db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key")))
if errr != nil { errr := db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key")))
uMulti, criteria := tryBotnets(c) fmt.Printf("%v", errr)
if errr == nil {
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})
return
}
uMulti, criteria := tryBotnets(c)
if criteria != "" { if criteria != "" {
schiavo.CMs.Send( schiavo.CMs.Send(
fmt.Sprintf( fmt.Sprintf(
@ -136,12 +140,6 @@ func registerSubmit(c *gin.Context) {
addMessage(c, successMessage{T(c, "You have been successfully registered on Ripple! You now need to verify your account.")}) addMessage(c, successMessage{T(c, "You have been successfully registered on Ripple! You now need to verify your account.")})
getSession(c).Save() getSession(c).Save()
c.Redirect(302, "/register/verify?u="+strconv.Itoa(int(lid))) c.Redirect(302, "/register/verify?u="+strconv.Itoa(int(lid)))
} else {
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})
}
} }
func registerResp(c *gin.Context, messages ...message) { func registerResp(c *gin.Context, messages ...message) {