[tor-commits] [flashproxy/master] Move matches on ua to the block where ua is defined.

dcf at torproject.org dcf at torproject.org
Sun Nov 10 08:12:36 UTC 2013


commit f8a0809805d938f122d87e91b5b4d7f76d45ba81
Author: David Fifield <david at bamsoftware.com>
Date:   Sat Nov 9 23:37:27 2013 -0800

    Move matches on ua to the block where ua is defined.
    
    This bug was noticed by Arlo. I based the patch on
    https://trac.torproject.org/projects/tor/attachment/ticket/9069/0001-Test-if-userAgent-is-a-string.patch.
---
 proxy/flashproxy.js |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 8f73aba..cc14008 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -1065,14 +1065,14 @@ function flashproxy_should_disable() {
                 return true;
             }
         }
-    }
 
-    if (ua.match(/\bsafari\b/i) && !ua.match(/\bchrome\b/i)
-        && !ua.match(/\bversion\/[6789]\./i)) {
-        /* Disable before Safari 6.0 because it doesn't have the hybi/RFC type
-           of WebSockets. */
-        puts("Disable because User-Agent is Safari before 6.0.");
-        return true;
+        if (ua.match(/\bsafari\b/i) && !ua.match(/\bchrome\b/i)
+            && !ua.match(/\bversion\/[6789]\./i)) {
+            /* Disable before Safari 6.0 because it doesn't have the hybi/RFC type
+               of WebSockets. */
+            puts("Disable because User-Agent is Safari before 6.0.");
+            return true;
+        }
     }
 
     if (!WebSocket) {





More information about the tor-commits mailing list