[tor-commits] [flashproxy/master] Check parsing of "client" and "relay" parameters.

dcf at torproject.org dcf at torproject.org
Fri Oct 12 11:56:56 UTC 2012


commit 419ec0346a4ee8a2235e8056364f03e7fa39306c
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Oct 12 04:55:38 2012 -0700

    Check parsing of "client" and "relay" parameters.
---
 proxy/flashproxy.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index a2e8863..327c9a5 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -415,7 +415,17 @@ function FlashProxy() {
         }
 
         client_addr = get_query_param_addr(query, "client");
+        if (client_addr === null) {
+            puts("Error: can't parse \"client\" parameter.");
+            this.die();
+            return;
+        }
         relay_addr = get_query_param_addr(query, "relay");
+        if (relay_addr === null) {
+            puts("Error: can't parse \"relay\" parameter.");
+            this.die();
+            return;
+        }
         if (client_addr !== undefined && relay_addr !== undefined) {
             this.make_proxy_pair(client_addr, relay_addr);
         } else if (client_addr !== undefined) {



More information about the tor-commits mailing list