From ec0445cec8c88f34637ae84410e0fb80bfd7c99a Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 16:25:28 +0000 Subject: [PATCH] ? --- register.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/register.go b/register.go index 2760ec6..c539d7d 100644 --- a/register.go +++ b/register.go @@ -94,8 +94,9 @@ func registerSubmit(c *gin.Context) { return } - if db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ?", 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 { + fmt.Println(db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key")))) registerResp(c, errorMessage{T(c, "Invalid Beta Key.")}) return }