[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Preserve HTTP POST args across redirects.



commit 458e490881e96069642ceaffe9f2ce8c5f251cd8
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sun Jan 26 04:26:06 2014 +0000

    Preserve HTTP POST args across redirects.
    
     * FIXES #10737, an issue where if a CAPTCHA was entered incorrectly, the
       client would be redirected back to /bridges.html without the original HTTP
       POST arguments (which specify the requested pluggable transports, IP
       version, etc.).
---
 lib/bridgedb/HTTPServer.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 5ce8b72..ddb1812 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -145,7 +145,10 @@ class CaptchaProtectedResource(twisted.web.resource.Resource):
                          % (remote_ip, request.args))
             logging.info("Recaptcha error code: %r"
                          % recaptcha_response.error_code)
-        return redirectTo(request.URLPath(), request)
+
+        logging.debug("Client failed a recaptcha; returning redirect to %s"
+                      % request.uri)
+        return redirectTo(request.uri, request)
 
 class WebResource(twisted.web.resource.Resource):
     """This resource is used by Twisted Web to give a web page with some



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits