This commit is contained in:
Alicia 2019-02-23 16:32:34 +00:00
parent 2b1589c255
commit f21be9641d

View File

@ -94,8 +94,7 @@ func registerSubmit(c *gin.Context) {
return
}
fmt.Printf("%s", cmd5(c.PostForm("key")))
if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))).
Scan(new(int)) != sql.ErrNoRows {
if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))) == sql.ErrNoRows {
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})
return
}