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

isis at torproject.org isis at torproject.org
Thu Feb 19 02:21:14 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