@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $this->portable_hashes = $portable_hashes; |
| 43 | 43 | |
| 44 | - $this->random_state = microtime() . uniqid(rand(), TRUE); |
|
| 44 | + $this->random_state = microtime() . uniqid(rand(), true); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | private function get_random_bytes($count) |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | # consequently in lower iteration counts and hashes that are |
| 141 | 141 | # quicker to crack (by non-PHP code). |
| 142 | 142 | if (PHP_VERSION >= '5') { |
| 143 | - $hash = md5($salt . $password, TRUE); |
|
| 143 | + $hash = md5($salt . $password, true); |
|
| 144 | 144 | do { |
| 145 | - $hash = md5($hash . $password, TRUE); |
|
| 145 | + $hash = md5($hash . $password, true); |
|
| 146 | 146 | } while (--$count); |
| 147 | 147 | } else { |
| 148 | 148 | $hash = pack('H*', md5($salt . $password)); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | if (@!empty($whitelists['url'])) { |
| 23 | - if (strpos($package['request_uri'], "?") === FALSE) { |
|
| 23 | + if (strpos($package['request_uri'], "?") === false) { |
|
| 24 | 24 | $request_uri = $package['request_uri']; |
| 25 | 25 | } else { |
| 26 | 26 | $request_uri = substr($package['request_uri'], 0, strpos($package['request_uri'], "?")); |
@@ -160,28 +160,28 @@ discard block |
||
| 160 | 160 | // Specific checks |
| 161 | 161 | @$ua = $package['user_agent']; |
| 162 | 162 | // Search engine checks come first |
| 163 | - if (stripos($ua, "bingbot") !== FALSE || stripos($ua, "msnbot") !== FALSE || stripos($ua, "MS Search") !== FALSE) { |
|
| 163 | + if (stripos($ua, "bingbot") !== false || stripos($ua, "msnbot") !== false || stripos($ua, "MS Search") !== false) { |
|
| 164 | 164 | require_once(BB2_CORE . "/searchengine.inc.php"); |
| 165 | 165 | if ($r = bb2_msnbot($package)) { |
| 166 | 166 | if ($r == 1) return false; # whitelisted |
| 167 | 167 | return $r; |
| 168 | 168 | } |
| 169 | 169 | return false; |
| 170 | - } elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE || stripos($ua, "Google Web Preview") !== FALSE) { |
|
| 170 | + } elseif (stripos($ua, "Googlebot") !== false || stripos($ua, "Mediapartners-Google") !== false || stripos($ua, "Google Web Preview") !== false) { |
|
| 171 | 171 | require_once(BB2_CORE . "/searchengine.inc.php"); |
| 172 | 172 | if ($r = bb2_google($package)) { |
| 173 | 173 | if ($r == 1) return false; # whitelisted |
| 174 | 174 | return $r; |
| 175 | 175 | } |
| 176 | 176 | return false; |
| 177 | - } elseif (stripos($ua, "Yahoo! Slurp") !== FALSE || stripos($ua, "Yahoo! SearchMonkey") !== FALSE) { |
|
| 177 | + } elseif (stripos($ua, "Yahoo! Slurp") !== false || stripos($ua, "Yahoo! SearchMonkey") !== false) { |
|
| 178 | 178 | require_once(BB2_CORE . "/searchengine.inc.php"); |
| 179 | 179 | if ($r = bb2_yahoo($package)) { |
| 180 | 180 | if ($r == 1) return false; # whitelisted |
| 181 | 181 | return $r; |
| 182 | 182 | } |
| 183 | 183 | return false; |
| 184 | - } elseif (stripos($ua, "Baidu") !== FALSE) { |
|
| 184 | + } elseif (stripos($ua, "Baidu") !== false) { |
|
| 185 | 185 | require_once(BB2_CORE . "/searchengine.inc.php"); |
| 186 | 186 | if ($r = bb2_baidu($package)) { |
| 187 | 187 | if ($r == 1) return false; # whitelisted |
@@ -190,34 +190,34 @@ discard block |
||
| 190 | 190 | return false; |
| 191 | 191 | } |
| 192 | 192 | // MSIE checks |
| 193 | - if (stripos($ua, "; MSIE") !== FALSE) { |
|
| 193 | + if (stripos($ua, "; MSIE") !== false) { |
|
| 194 | 194 | $package['is_browser'] = true; |
| 195 | 195 | require_once(BB2_CORE . "/browser.inc.php"); |
| 196 | - if (stripos($ua, "Opera") !== FALSE) { |
|
| 196 | + if (stripos($ua, "Opera") !== false) { |
|
| 197 | 197 | if ($r = bb2_opera($package)) return $r; |
| 198 | 198 | } else { |
| 199 | 199 | if ($r = bb2_msie($package)) return $r; |
| 200 | 200 | } |
| 201 | - } elseif (stripos($ua, "Konqueror") !== FALSE) { |
|
| 201 | + } elseif (stripos($ua, "Konqueror") !== false) { |
|
| 202 | 202 | $package['is_browser'] = true; |
| 203 | 203 | require_once(BB2_CORE . "/browser.inc.php"); |
| 204 | 204 | if ($r = bb2_konqueror($package)) return $r; |
| 205 | - } elseif (stripos($ua, "Opera") !== FALSE) { |
|
| 205 | + } elseif (stripos($ua, "Opera") !== false) { |
|
| 206 | 206 | $package['is_browser'] = true; |
| 207 | 207 | require_once(BB2_CORE . "/browser.inc.php"); |
| 208 | 208 | if ($r = bb2_opera($package)) return $r; |
| 209 | - } elseif (stripos($ua, "Safari") !== FALSE) { |
|
| 209 | + } elseif (stripos($ua, "Safari") !== false) { |
|
| 210 | 210 | $package['is_browser'] = true; |
| 211 | 211 | require_once(BB2_CORE . "/browser.inc.php"); |
| 212 | 212 | if ($r = bb2_safari($package)) return $r; |
| 213 | - } elseif (stripos($ua, "Lynx") !== FALSE) { |
|
| 213 | + } elseif (stripos($ua, "Lynx") !== false) { |
|
| 214 | 214 | $package['is_browser'] = true; |
| 215 | 215 | require_once(BB2_CORE . "/browser.inc.php"); |
| 216 | 216 | if ($r = bb2_lynx($package)) return $r; |
| 217 | - } elseif (stripos($ua, "MovableType") !== FALSE) { |
|
| 217 | + } elseif (stripos($ua, "MovableType") !== false) { |
|
| 218 | 218 | require_once(BB2_CORE . "/movabletype.inc.php"); |
| 219 | 219 | if ($r = bb2_movabletype($package)) return $r; |
| 220 | - } elseif (stripos($ua, "Mozilla") !== FALSE && stripos($ua, "Mozilla") == 0) { |
|
| 220 | + } elseif (stripos($ua, "Mozilla") !== false && stripos($ua, "Mozilla") == 0) { |
|
| 221 | 221 | $package['is_browser'] = true; |
| 222 | 222 | require_once(BB2_CORE . "/browser.inc.php"); |
| 223 | 223 | if ($r = bb2_mozilla($package)) return $r; |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | function bb2_google($package) |
| 8 | 8 | { |
| 9 | 9 | if (@is_ipv6($package['ip'])) return false; # TODO |
| 10 | - if (match_cidr($package['ip'], array("66.249.64.0/19", "64.233.160.0/19", "72.14.192.0/18", "203.208.32.0/19", "74.125.0.0/16", "216.239.32.0/19", "209.85.128.0/17")) === FALSE) { |
|
| 10 | + if (match_cidr($package['ip'], array("66.249.64.0/19", "64.233.160.0/19", "72.14.192.0/18", "203.208.32.0/19", "74.125.0.0/16", "216.239.32.0/19", "209.85.128.0/17")) === false) { |
|
| 11 | 11 | return false; # Soft fail, must pass other screening |
| 12 | 12 | #return "f1182195"; # Hard fail |
| 13 | 13 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | function bb2_msnbot($package) |
| 24 | 24 | { |
| 25 | 25 | if (@is_ipv6($package['ip'])) return false; # TODO |
| 26 | - if (match_cidr($package['ip'], array("207.46.0.0/16", "65.52.0.0/14", "207.68.128.0/18", "207.68.192.0/20", "64.4.0.0/18", "157.54.0.0/15", "157.60.0.0/16", "157.56.0.0/14", "131.253.21.0/24", "131.253.22.0/23", "131.253.24.0/21", "131.253.32.0/20", "40.76.0.0/14")) === FALSE) { |
|
| 26 | + if (match_cidr($package['ip'], array("207.46.0.0/16", "65.52.0.0/14", "207.68.128.0/18", "207.68.192.0/20", "64.4.0.0/18", "157.54.0.0/15", "157.60.0.0/16", "157.56.0.0/14", "131.253.21.0/24", "131.253.22.0/23", "131.253.24.0/21", "131.253.32.0/20", "40.76.0.0/14")) === false) { |
|
| 27 | 27 | return false; # Soft fail, must pass other screening |
| 28 | 28 | #return "e4de0453"; # Hard fail |
| 29 | 29 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | function bb2_yahoo($package) |
| 40 | 40 | { |
| 41 | 41 | if (@is_ipv6($package['ip'])) return false; # TODO |
| 42 | - if (match_cidr($package['ip'], array("202.160.176.0/20", "67.195.0.0/16", "203.209.252.0/24", "72.30.0.0/16", "98.136.0.0/14", "74.6.0.0/16")) === FALSE) { |
|
| 42 | + if (match_cidr($package['ip'], array("202.160.176.0/20", "67.195.0.0/16", "203.209.252.0/24", "72.30.0.0/16", "98.136.0.0/14", "74.6.0.0/16")) === false) { |
|
| 43 | 43 | return false; # Soft fail, must pass other screening |
| 44 | 44 | #return '71436a15'; # Hard fail |
| 45 | 45 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | function bb2_baidu($package) |
| 56 | 56 | { |
| 57 | 57 | if (@is_ipv6($package['ip'])) return false; # TODO |
| 58 | - if (match_cidr($package['ip'], array("119.63.192.0/21", "123.125.71.0/24", "180.76.0.0/16", "220.181.0.0/16")) === FALSE) { |
|
| 58 | + if (match_cidr($package['ip'], array("119.63.192.0/21", "123.125.71.0/24", "180.76.0.0/16", "220.181.0.0/16")) === false) { |
|
| 59 | 59 | return false; # Soft fail, must pass other screening |
| 60 | 60 | } |
| 61 | 61 | return 1; # Real Baidu bot; bypass all other checks |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | // Real ones do not contain Accept:, and have a charset defined |
| 18 | 18 | // Real WP trackbacks may contain Accept: depending on the HTTP |
| 19 | 19 | // transport being used by the sending host |
| 20 | - if (strpos($package['headers_mixed']['User-Agent'], "WordPress/") !== FALSE) { |
|
| 21 | - if (strpos($package['headers_mixed']['Content-Type'], "charset=") === FALSE) { |
|
| 20 | + if (strpos($package['headers_mixed']['User-Agent'], "WordPress/") !== false) { |
|
| 21 | + if (strpos($package['headers_mixed']['Content-Type'], "charset=") === false) { |
|
| 22 | 22 | return 'e3990b47'; |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // if ($r = bb2_blackhole($package)) return $r; |
| 34 | 34 | |
| 35 | 35 | // MovableType needs specialized screening |
| 36 | - if (stripos($package['headers_mixed']['User-Agent'], "MovableType") !== FALSE) { |
|
| 36 | + if (stripos($package['headers_mixed']['User-Agent'], "MovableType") !== false) { |
|
| 37 | 37 | if (strcmp($package['headers_mixed']['Range'], "bytes=0-99999")) { |
| 38 | 38 | return "7d12528e"; |
| 39 | 39 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | // Catch a few completely broken spambots |
| 49 | 49 | foreach ($request_entity as $key => $value) { |
| 50 | 50 | $pos = strpos($key, " document.write"); |
| 51 | - if ($pos !== FALSE) { |
|
| 51 | + if ($pos !== false) { |
|
| 52 | 52 | return "dfd9b1ad"; |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -5,14 +5,14 @@ discard block |
||
| 5 | 5 | function bb2_protocol($settings, $package) |
| 6 | 6 | { |
| 7 | 7 | // We should never see Expect: for HTTP/1.0 requests |
| 8 | - if (array_key_exists('Expect', $package['headers_mixed']) && stripos($package['headers_mixed']['Expect'], "100-continue") !== FALSE && !strcmp($package['server_protocol'], "HTTP/1.0")) { |
|
| 8 | + if (array_key_exists('Expect', $package['headers_mixed']) && stripos($package['headers_mixed']['Expect'], "100-continue") !== false && !strcmp($package['server_protocol'], "HTTP/1.0")) { |
|
| 9 | 9 | return "a0105122"; |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | // Is it claiming to be HTTP/1.1? Then it shouldn't do HTTP/1.0 things |
| 13 | 13 | // Blocks some common corporate proxy servers in strict mode |
| 14 | 14 | if ($settings['strict'] && !strcmp($package['server_protocol'], "HTTP/1.1")) { |
| 15 | - if (array_key_exists('Pragma', $package['headers_mixed']) && strpos($package['headers_mixed']['Pragma'], "no-cache") !== FALSE && !array_key_exists('Cache-Control', $package['headers_mixed'])) { |
|
| 15 | + if (array_key_exists('Pragma', $package['headers_mixed']) && strpos($package['headers_mixed']['Pragma'], "no-cache") !== false && !array_key_exists('Cache-Control', $package['headers_mixed'])) { |
|
| 16 | 16 | return "41feed15"; |
| 17 | 17 | } |
| 18 | 18 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | // First-gen Amazon Kindle is broken; Amazon has been notified 9/24/08 |
| 28 | 28 | // NOTE: RFC 2965 is obsoleted by RFC 6265. Current software MUST NOT |
| 29 | 29 | // use Cookie2 or $Version in Cookie. |
| 30 | - if (@strpos($package['headers_mixed']['Cookie'], '$Version=0') !== FALSE && !array_key_exists('Cookie2', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "Kindle/") === FALSE) { |
|
| 30 | + if (@strpos($package['headers_mixed']['Cookie'], '$Version=0') !== false && !array_key_exists('Cookie2', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "Kindle/") === false) { |
|
| 31 | 31 | return '6c502ff1'; |
| 32 | 32 | } |
| 33 | 33 | return false; |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | // Worse yet, some Javascript client-side apps do the same in |
| 47 | 47 | // blatant violation of the protocol and good sense. |
| 48 | 48 | // if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) { |
| 49 | - if ($settings['strict'] && strpos($package['request_uri'], "#") !== FALSE) { |
|
| 49 | + if ($settings['strict'] && strpos($package['request_uri'], "#") !== false) { |
|
| 50 | 50 | return "dfd9b1ad"; |
| 51 | 51 | } |
| 52 | 52 | // A pretty nasty SQL injection attack on IIS servers |
| 53 | - if (strpos($package['request_uri'], ";DECLARE%20@") !== FALSE) { |
|
| 53 | + if (strpos($package['request_uri'], ";DECLARE%20@") !== false) { |
|
| 54 | 54 | return "dfd9b1ad"; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // NOTE: this blocks the whois.sc bot. No big loss. |
| 60 | 60 | // Exceptions: MT (not fixable); LJ (refuses to fix; may be |
| 61 | 61 | // blocked again in the future); Facebook |
| 62 | - if ($settings['strict'] && array_key_exists('Range', $package['headers_mixed']) && strpos($package['headers_mixed']['Range'], "=0-") !== FALSE) { |
|
| 62 | + if ($settings['strict'] && array_key_exists('Range', $package['headers_mixed']) && strpos($package['headers_mixed']['Range'], "=0-") !== false) { |
|
| 63 | 63 | if (strncmp($ua, "MovableType", 11) && strncmp($ua, "URI::Fetch", 10) && strncmp($ua, "php-openid/", 11) && strncmp($ua, "facebookexternalhit", 19)) { |
| 64 | 64 | return "7ad04a8a"; |
| 65 | 65 | } |
@@ -75,14 +75,14 @@ discard block |
||
| 75 | 75 | // may be blocked again in the future) |
| 76 | 76 | if ($settings['strict'] && |
| 77 | 77 | array_key_exists('via', $package['headers']) && |
| 78 | - strpos($package['headers']['via'],'Clearswift') === FALSE && |
|
| 79 | - strpos($ua,'CoralWebPrx') === FALSE) { |
|
| 78 | + strpos($package['headers']['via'],'Clearswift') === false && |
|
| 79 | + strpos($ua,'CoralWebPrx') === false) { |
|
| 80 | 80 | return "9c9e4979"; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // pinappleproxy is used by referrer spammers |
| 84 | 84 | if (array_key_exists('Via', $package['headers_mixed'])) { |
| 85 | - if (stripos($package['headers_mixed']['Via'], "pinappleproxy") !== FALSE || stripos($package['headers_mixed']['Via'], "PCNETSERVER") !== FALSE || stripos($package['headers_mixed']['Via'], "Invisiware") !== FALSE) { |
|
| 85 | + if (stripos($package['headers_mixed']['Via'], "pinappleproxy") !== false || stripos($package['headers_mixed']['Via'], "PCNETSERVER") !== false || stripos($package['headers_mixed']['Via'], "Invisiware") !== false) { |
|
| 86 | 86 | return "939a6fbb"; |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | return "a52f0448"; |
| 112 | 112 | } |
| 113 | 113 | // Keep-Alive format in RFC 2068; some bots mangle these headers |
| 114 | - if (stripos($package['headers_mixed']['Connection'], "Keep-Alive: ") !== FALSE) { |
|
| 114 | + if (stripos($package['headers_mixed']['Connection'], "Keep-Alive: ") !== false) { |
|
| 115 | 115 | return "b0924802"; |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | // Referer, if it exists, must contain a : |
| 138 | 138 | // While a relative URL is technically valid in Referer, all known |
| 139 | 139 | // legitimate user-agents send an absolute URL |
| 140 | - if (strpos($package['headers_mixed']['Referer'], ":") === FALSE) { |
|
| 140 | + if (strpos($package['headers_mixed']['Referer'], ":") === false) { |
|
| 141 | 141 | return "45b35e30"; |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | // Quick and dirty check for an IPv6 address |
| 6 | 6 | function is_ipv6($address) { |
| 7 | - return (strpos($address, ":")) ? TRUE : FALSE; |
|
| 7 | + return (strpos($address, ":")) ? true : false; |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | // stripos() needed because stripos is only present on PHP 5 |
@@ -168,13 +168,13 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | foreach ($bb2_spambots_0 as $spambot) { |
| 170 | 170 | $pos = strpos($ua, $spambot); |
| 171 | - if ($pos !== FALSE && $pos == 0) { |
|
| 171 | + if ($pos !== false && $pos == 0) { |
|
| 172 | 172 | return "17f4e8c8"; |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | foreach ($bb2_spambots as $spambot) { |
| 177 | - if (strpos($ua, $spambot) !== FALSE) { |
|
| 177 | + if (strpos($ua, $spambot) !== false) { |
|
| 178 | 178 | return "17f4e8c8"; |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -186,10 +186,10 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | foreach ($bb2_spambots_url as $spambot) { |
| 189 | - if (stripos($uri, $spambot) !== FALSE) { |
|
| 189 | + if (stripos($uri, $spambot) !== false) { |
|
| 190 | 190 | return "96c0bd29"; |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - return FALSE; |
|
| 194 | + return false; |
|
| 195 | 195 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | { |
| 7 | 7 | // CafeKelsa is a dev project at Yahoo which indexes job listings for |
| 8 | 8 | // Yahoo! HotJobs. It identifies as Konqueror so we skip these checks. |
| 9 | - if (stripos($package['headers_mixed']['User-Agent'], "YahooSeeker/CafeKelsa") === FALSE || match_cidr($package['ip'], "209.73.160.0/19") === FALSE) { |
|
| 9 | + if (stripos($package['headers_mixed']['User-Agent'], "YahooSeeker/CafeKelsa") === false || match_cidr($package['ip'], "209.73.160.0/19") === false) { |
|
| 10 | 10 | if (!array_key_exists('Accept', $package['headers_mixed'])) { |
| 11 | 11 | return "17566707"; |
| 12 | 12 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | // Google Desktop fixed it, but apparently some old versions are |
| 33 | 33 | // still out there. :( |
| 34 | 34 | // Always check accept header for Mozilla user agents |
| 35 | - if (strpos($package['headers_mixed']['User-Agent'], "Google Desktop") === FALSE && strpos($package['headers_mixed']['User-Agent'], "PLAYSTATION 3") === FALSE) { |
|
| 35 | + if (strpos($package['headers_mixed']['User-Agent'], "Google Desktop") === false && strpos($package['headers_mixed']['User-Agent'], "PLAYSTATION 3") === false) { |
|
| 36 | 36 | if (!array_key_exists('Accept', $package['headers_mixed'])) { |
| 37 | 37 | return "17566707"; |
| 38 | 38 | } |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // MSIE does NOT send "Windows ME" or "Windows XP" in the user agent |
| 52 | - if (strpos($package['headers_mixed']['User-Agent'], "Windows ME") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows XP") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Windows 2000") !== FALSE || strpos($package['headers_mixed']['User-Agent'], "Win32") !== FALSE) { |
|
| 52 | + if (strpos($package['headers_mixed']['User-Agent'], "Windows ME") !== false || strpos($package['headers_mixed']['User-Agent'], "Windows XP") !== false || strpos($package['headers_mixed']['User-Agent'], "Windows 2000") !== false || strpos($package['headers_mixed']['User-Agent'], "Win32") !== false) { |
|
| 53 | 53 | return "a1084bad"; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // MSIE does NOT send Connection: TE but Akamai does |
| 57 | 57 | // Bypass this test when Akamai detected |
| 58 | 58 | // The latest version of IE for Windows CE also uses Connection: TE |
| 59 | - if (!array_key_exists('Akamai-Origin-Hop', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "IEMobile") === FALSE && @preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) { |
|
| 59 | + if (!array_key_exists('Akamai-Origin-Hop', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "IEMobile") === false && @preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) { |
|
| 60 | 60 | return "2b90f772"; |
| 61 | 61 | } |
| 62 | 62 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | function bb2_safari($package) |
| 79 | 79 | { |
| 80 | 80 | // Bypass this test when Android is detected |
| 81 | - if (!array_key_exists('Accept', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "Android") === FALSE) { |
|
| 81 | + if (!array_key_exists('Accept', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "Android") === false) { |
|
| 82 | 82 | return "17566707"; |
| 83 | 83 | } |
| 84 | 84 | return false; |