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

[tor-commits] [bridgedb/develop] Don't safelog randomly generated IPs.



commit bf852f9e95162f42c02f50554853e3075bedbd9f
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sat Jan 25 17:38:31 2014 +0000

    Don't safelog randomly generated IPs.
    
     * REMOVE calls to `Util.safelog` which masked the IP addresses which
       are randomly generated in
       `HTTPServer.CaptchaProtectedResource.render_POST()`. These random IPs
       are sent to the ReCaptcha server in order to not reveal the client's
       real IP, and they are no more revealing/identifying of a particular
       client than the `twisted.web.http.Request.args` which are logged.
---
 lib/bridgedb/HTTPServer.py |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index 32399b3..eac1fb9 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -114,13 +114,14 @@ class CaptchaProtectedResource(twisted.web.resource.Resource):
         recaptcha_response = captcha.submit(challenge, response,
                                         self.recaptchaPrivKey, remote_ip)
         if recaptcha_response.is_valid:
-            logging.info("Valid recaptcha from %s. Parameters were %r",
-                    Util.logSafely(remote_ip), request.args)
+            logging.info("Valid recaptcha from %s. Parameters were %r"
+                         % (remote_ip, request.args))
             return self.resource.render(request)
         else:
-            logging.info("Invalid recaptcha from %s. Parameters were %r",
-                         Util.logSafely(remote_ip), request.args)
-            logging.info("Recaptcha error code: %s", recaptcha_response.error_code)
+            logging.info("Invalid recaptcha from %s. Parameters were %r"
+                         % (remote_ip, request.args))
+            logging.info("Recaptcha error code: %r"
+                         % recaptcha_response.error_code)
         return redirectTo(request.URLPath(), request)
 
 class WebResource(twisted.web.resource.Resource):



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