aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/main.go b/main.go
index 90cd238..0bc509e 100644
--- a/main.go
+++ b/main.go
@@ -243,7 +243,6 @@ func main() {
auth := CreateTripCode(verify.Code)
auth = CreateTripCode(auth)
-
if CreateTripCode(auth) == code {
w.WriteHeader(http.StatusOK)
} else {
@@ -266,7 +265,6 @@ func main() {
w.WriteHeader(http.StatusForbidden)
w.Write([]byte("404 no path"))
-
})
http.HandleFunc("/post", func(w http.ResponseWriter, r *http.Request){
@@ -780,7 +778,7 @@ func main() {
return
}
- if(!CheckCaptcha(db, captcha)) {
+ if(r.FormValue("captchaCode") == "" || !CheckCaptcha(db, captcha)) {
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte("captcha required"))
return