[tor-commits] [flashproxy/master] Use repr on a user-controlled string in a log message.

dcf at torproject.org dcf at torproject.org
Sat Jun 11 18:17:19 UTC 2011


commit 8a78d7d8885543ce894d9c2489596cfb0b35f6f1
Author: David Fifield <david at bamsoftware.com>
Date:   Sat Jun 11 10:09:18 2011 -0700

    Use repr on a user-controlled string in a log message.
---
 facilitator.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/facilitator.py b/facilitator.py
index 801d0ad..0c1e4dd 100755
--- a/facilitator.py
+++ b/facilitator.py
@@ -235,7 +235,7 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
             log(u"client %s syntax error in %s: %s" % (format_addr(self.client_address), repr(client_spec), repr(str(e))))
             return
 
-        log(u"client %s regs %s -> %s" % (format_addr(self.client_address), client_spec, unicode(reg)))
+        log(u"client %s regs %s -> %s" % (format_addr(self.client_address), repr(client_spec), unicode(reg)))
         if REGS.add(reg):
             log(u"client %s %s (now %d)" % (format_addr(self.client_address), unicode(reg), len(REGS)))
         else:





More information about the tor-commits mailing list