about summary refs log tree commit diff
path: root/src/Main.hs
diff options
context:
space:
mode:
author"Vincent Ambo ext:(%22) <tazjin@gmail.com>2013-04-28T11·11+0200
committer"Vincent Ambo ext:(%22) <tazjin@gmail.com>2013-04-28T11·11+0200
commitb3fb7f0f341bf3574a5c42fbbf3e0ddc3ea286a1 (patch)
tree0bb3b0ef603f01d42a4922a8f7b59187208daebc /src/Main.hs
parent1bdbe4af642cbaaacb15fbf882a3ad87ebf1e486 (diff)
* re-enabled captchas
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 0c4fcdffcd3f..a6f59acc2870 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -154,9 +154,7 @@ addComment acid lang captchakey eId = do
   nComment <- Comment <$> pure now
                       <*> lookText' "cname"
                       <*> pure (commentEscape nCtext)
-  update' acid (AddComment eId nComment) 
-                >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
-  {- -- captcha verification
+  -- captcha verification
   challenge <- look "recaptcha_challenge_field"
   response <- look "recaptcha_response_field"
   (userIp, _) <- askRq >>= return . rqPeer
@@ -164,7 +162,7 @@ addComment acid lang captchakey eId = do
   case validation of 
     Right _ -> update' acid (AddComment eId nComment) 
                 >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
-    Left _ -> (liftIO $ putStrLn "Captcha failed") >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse()) -}
+    Left _ -> (liftIO $ putStrLn "Captcha failed") >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
 
 commentEscape :: Text -> Text
 commentEscape = newlineEscape . ltEscape . gtEscape . ampEscape