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

[tor-commits] [flashproxy/master] Show an error if the remote IP address is not given.



commit 40976bd26cc06a2ab95d6c598f9d18f19d76b7b8
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Mar 13 01:48:03 2013 -0700

    Show an error if the remote IP address is not given.
    
    Unlike the http and email methods, this rendezvous method cannot guess
    your external address.
---
 flashproxy-reg-url |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/flashproxy-reg-url b/flashproxy-reg-url
index dcd4ec1..a2aba34 100755
--- a/flashproxy-reg-url
+++ b/flashproxy-reg-url
@@ -108,6 +108,10 @@ if len(args) != 1:
     sys.exit(1)
 
 remote_addr = parse_addr_spec(args[0], defport=DEFAULT_REMOTE_PORT)
+if remote_addr[0] is None:
+    print >> sys.stderr, "An IP address (not just a port) is required."
+    sys.exit(1)
+
 reg_plain = (u"client=%s" % format_addr(remote_addr)).encode("utf-8")
 rsa = RSA.load_pub_key_bio(BIO.MemoryBuffer(FACILITATOR_PUBKEY_PEM))
 reg_crypt = rsa.public_encrypt(reg_plain, RSA.pkcs1_oaep_padding)



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