[tor-commits] [bridgedb/master] Stem apparently sets port 0 to 'anyport'.

isis at torproject.org isis at torproject.org
Sat Mar 21 02:02:59 UTC 2015


commit b476afe9422903207ceed4ac358351fdb9382712
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed Dec 24 08:55:40 2014 +0000

    Stem apparently sets port 0 to 'anyport'.
---
 lib/bridgedb/bridges.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/bridges.py b/lib/bridgedb/bridges.py
index 735c603..f612565 100644
--- a/lib/bridgedb/bridges.py
+++ b/lib/bridgedb/bridges.py
@@ -468,7 +468,12 @@ class PluggableTransport(BridgeAddressBase):
         self.fingerprint = str(fingerprint)
         self.methodname = str(methodname)
         self.address = kitchenSink[0]
-        self.port = int(kitchenSink[1])
+
+        port = kitchenSink[1]
+        if port == 'anyport':  # IDK. Stem, WTF?
+            port = 0
+
+        self.port = int(port)
         self.arguments = self._parseArgumentsIntoDict(kitchenSink[2])
         self._runChecks()
 





More information about the tor-commits mailing list