diff --git a/src/page-captcha.rkt b/src/page-captcha.rkt index dcd72be..91889b6 100644 --- a/src/page-captcha.rkt +++ b/src/page-captcha.rkt @@ -152,9 +152,10 @@ (printf "captcha pass - key ~a [~a]~n" x (get-ip req))) (header #"Set-Cookie" (cookie->set-cookie-header (make-cookie "captcha" "key" #:path "/" #:max-age (* 60 60 24 365 10))))] - [else + [(= y 0) (when (config-true? 'captcha::log) - (printf "captcha fail - key ~a instead of ~a [~a]~n" x (get-key-solution req) (get-ip req)))]) + (printf "captcha fail - key ~a instead of ~a [~a]~n" x (get-key-solution req) (get-ip req)))] + [else (void)]) (when (> y 0) (let-values ([(solution-x solution-y) (get-coordinate-solution req w h)]) (let ([dist (+ (expt (- x solution-x) 2) (expt (- y solution-y) 2))])