Add keys
This commit is contained in:
parent
4c33ed64aa
commit
ce53ca26a8
|
@ -94,6 +94,12 @@ func registerSubmit(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if !db.QueryRow("SELECT 1 FROM beta_keys WHERE key_md5 = ?", cmd5(c.PostForm("key"))).
|
||||
Scan(new(int)) != sql.ErrNoRows {
|
||||
registerResp(c, errorMessage{T(c, "Invalid Beta Key.")})
|
||||
return
|
||||
}
|
||||
|
||||
uMulti, criteria := tryBotnets(c)
|
||||
if criteria != "" {
|
||||
schiavo.CMs.Send(
|
||||
|
@ -126,6 +132,7 @@ func registerSubmit(c *gin.Context) {
|
|||
|
||||
setYCookie(int(lid), c)
|
||||
logIP(c, int(lid))
|
||||
db.Exec("UPDATE beta_keys SET allowed = 0 WHERE key_md5 = ?", cmd5(c.PostForm("key"))
|
||||
|
||||
rd.Incr("ripple:registered_users")
|
||||
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
<label>{{ .T "Email" }}</label>
|
||||
<input tabindex="3" type="email" name="email" placeholder="{{ .T "Email" }}" value="{{ .FormData.email }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ .T "Registration Key" }}</label>
|
||||
<input tabindex="3" type="text" name="key" placeholder="{{ .T "Key" }}" value="{{ .FormData.key }}" required>
|
||||
</div>
|
||||
{{ with config "RecaptchaSite" }}
|
||||
<div class="field">
|
||||
<div class="g-recaptcha" data-sitekey="{{ . }}"></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user