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

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



commit b476afe9422903207ceed4ac358351fdb9382712
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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()
 



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