Commit cf361656 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1013 iOS does not send meeting response.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 65714ee7
...@@ -588,8 +588,15 @@ class MAPIProvider { ...@@ -588,8 +588,15 @@ class MAPIProvider {
$props = $this->getProps($mapimessage, $meetingrequestproperties); $props = $this->getProps($mapimessage, $meetingrequestproperties);
// Get the GOID // Get the GOID
if(isset($props[$meetingrequestproperties["goidtag"]])) if(isset($props[$meetingrequestproperties["goidtag"]])) {
$message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]); // GlobalObjId support was removed in AS 16.0
if (Request::IsGlobalObjIdHexClient()) {
$message->meetingrequest->globalobjid = bin2hex($props[$meetingrequestproperties["goidtag"]]);
}
else {
$message->meetingrequest->globalobjid = base64_encode($props[$meetingrequestproperties["goidtag"]]);
}
}
// Set Timezone // Set Timezone
if(isset($props[$meetingrequestproperties["timezonetag"]])) if(isset($props[$meetingrequestproperties["timezonetag"]]))
......
...@@ -654,6 +654,32 @@ class Request { ...@@ -654,6 +654,32 @@ class Request {
return (time() - $_SERVER["REQUEST_TIME"]) >= self::GetExpectedConnectionTimeout(); return (time() - $_SERVER["REQUEST_TIME"]) >= self::GetExpectedConnectionTimeout();
} }
/**
* Checks the device type if it expects the globalobjid in meeting requests encoded as hex.
* If it's not the case, globalobjid will be base64 encoded.
*
* WindowsOutlook and iOS device since 9.3 (?) version expect globalobjid to be hex encoded.
* @see https://jira.z-hub.io/projects/ZP/issues/ZP-1013
*
* @access public
* @return boolean
*/
static public function IsGlobalObjIdHexClient() {
switch (self::GetDeviceType()) {
case "WindowsOutlook":
ZLog::Write(LOGLEVEL_DEBUG, "Request->IsGlobalObjIdHexClient(): WindowsOutlook");
return true;
case "iPod":
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) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Request->IsGlobalObjIdHexClient(): %s->%s", self::GetDeviceType(), self::GetUserAgent()));
return true;
}
}
return false;
}
/**---------------------------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------------------------
* Private stuff * Private stuff
*/ */
......
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