[tor-commits] [bridgedb/develop] Add Sphinx docstring to CaptchaProtectedResource.render_POST().

isis at torproject.org isis at torproject.org
Sat Feb 1 23:57:39 UTC 2014


commit dc9757df396b9d8cf5fda0e8bdb838ab9af33a53
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sun Jan 26 02:49:00 2014 +0000

    Add Sphinx docstring to CaptchaProtectedResource.render_POST().
---
 lib/bridgedb/HTTPServer.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 9b4c515..5ce8b72 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -112,6 +112,18 @@ class CaptchaProtectedResource(twisted.web.resource.Resource):
         return rendered
 
     def render_POST(self, request):
+    """Process a client CAPTCHA by sending it to the ReCaptcha server.
+
+        The client's IP address is not sent to the ReCaptcha server; instead,
+        a completely random IP is generated and sent instead.
+
+        :type request: :api:`twisted.web.http.Request`
+        :param request: A ``Request`` object containing the POST arguments
+                        should include two key/value pairs: one key being
+                        ``'recaptcha_challange_field'``, and the other,
+                        ``'recaptcha_response_field'``. These POST arguments
+                        should be obtained from :meth:`render_GET`.
+        """
         try:
             challenge = request.args['recaptcha_challenge_field'][0]
             response = request.args['recaptcha_response_field'][0]





More information about the tor-commits mailing list