aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-31 23:18:21 -0800
committerFChannel <=>2021-01-31 23:18:21 -0800
commit3bedb51f6a878253cfdf10ab89c67312fcd93886 (patch)
tree8e81ca4bda88d590ffdacbb01555a59b92ed0fd6 /main.go
parent4a80553734f985dbbdf64b6c289a3985c0bc0880 (diff)
preload metadata of video to see first frame
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