Arc Forumnew | comments | leaders | submitlogin
2 points by hjek 2295 days ago | link | parent

Would you mind preparing a simple code example to show this issue? I'm not sure exactly what you are doing.


2 points by krapp 2295 days ago | link

Sure... the if statement in verify-captcha is where the problem occurs.

It currently works but that's only because json.rkt has been modified.

    (def post-getjson (url params (o port stdin))
      (fromstring (post-url url params) 
        (read-json (port))))

    (def recaptcha-response (s r)
      (post-getjson "https://www.google.com/recaptcha/api/siteverify"
      (list 'secret s 'response r)))

    (def verify-captcha (req)
      (do
        (= resp (recaptcha-response recaptcha-secret* 
        (alref (req 'args) "g-recaptcha-response")))
      (if resp!success 
        (pr "success") 
        (pr "failure"))))

-----

2 points by hjek 2295 days ago | link

> when I tried to do a boolean check on it,

Can I ask how you did a "boolean check" on #t?

-----