Commit ca2145a5 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1013 modified regexp for getting iOS user agent.

Released under the Affero GNU General Public License (AGPL) version 3.
parent b470c614
......@@ -673,7 +673,7 @@ class Request {
case "iPad":
case "iPhone":
$matches = array();
if (stripos(self::GetUserAgent(), "Apple-") == 0 && preg_match("/\/(\d{4})\./", self::GetUserAgent(), $matches) && isset($matches[1]) && $matches[1] >= 1305) {
if (preg_match("/^Apple-.*?\/(\d{4})\./", self::GetUserAgent(), $matches) && isset($matches[1]) && $matches[1] >= 1305) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Request->IsGlobalObjIdHexClient(): %s->%s", self::GetDeviceType(), self::GetUserAgent()));
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment