[tor-commits] [arm/master] Backporting fix for parsing multi-line exit policies to current release.

sebastian at torproject.org sebastian at torproject.org
Sun Apr 24 05:55:00 UTC 2011


commit d50aefb997137c360b4cd51d31faf83d93d9417d
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Aug 7 22:00:08 2010 +0000

    Backporting fix for parsing multi-line exit policies to current release.
    
    
    
    svn:r22820
---
 interface/connPanel.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/interface/connPanel.py b/interface/connPanel.py
index d78c3ed..2fb1d72 100644
--- a/interface/connPanel.py
+++ b/interface/connPanel.py
@@ -8,7 +8,7 @@ import curses
 from threading import RLock
 from TorCtl import TorCtl
 
-from util import log, connections, hostnames, panel, uiTools
+from util import log, connections, hostnames, panel, torTools, uiTools
 
 # Scrubs private data from any connection that might belong to client or exit
 # traffic. This is a little overly conservative, hiding anything that isn't
@@ -192,7 +192,10 @@ class ConnPanel(TorCtl.PostEventListener, panel.Panel):
       else: self.family = []
       
       self.isBridge = self.conn.get_option("BridgeRelay")[0][1] == "1"
-      self.exitPolicy = self.conn.get_option("ExitPolicy")[0][1]
+      
+      policyEntries = torTools.getConn().getOption("ExitPolicy", multiple=True)
+      self.exitPolicy = ",".join(policyEntries)
+      self.exitPolicy = self.exitPolicy.replace("\\t", " ").replace("\"", "")
       
       if self.exitPolicy: self.exitPolicy += "," + self.conn.get_info("exit-policy/default")["exit-policy/default"]
       else: self.exitPolicy = self.conn.get_info("exit-policy/default")["exit-policy/default"]





More information about the tor-commits mailing list