[horde] Can't synchronize older devices with ActiveSync-2.13.2

Arjen de Korte arjen+horde at de-korte.org
Sun Mar 23 20:08:20 UTC 2014


Citeren Arjen de Korte <arjen+horde at de-korte.org>:

> Citeren Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting Arjen de Korte <arjen+horde at de-korte.org>:
>>
>>> I have several (older) devices that stop synchronizing with the  
>>> latest (2.13.2) version of Horde_ActiveSync. Calendar  
>>> synchronization has been broken for most of them (and the newer  
>>> ones too) for quite a while already (see Bug #13022), but now also  
>>> mailboxes are affected. Some mailboxes will synchronize fine, but  
>>> others (it seems to be the ones with lots of messages in them)  
>>> don't. Removing accounts and provisioning devices again doesn't  
>>> help.
>>>
>>> One thing that I noticed is, that now all devices report the same  
>>> 'Supporting protocol version':
>>>
>>> INFO: [5891] Request being handled for device: HTCAND543813B4,  
>>> Supporting protocol version: 14,1, Using Horde_ActiveSync v2.13.2
>>> INFO: [5207] Request being handled for device: 847CC7DCA0F0B1CF,  
>>> Supporting protocol version: 14.1, Using Horde_ActiveSync v2.13.2
>>> INFO: [7820] Request being handled for device:  
>>> ANDROID1325376003651, Supporting protocol version: 14.1, Using  
>>> Horde_ActiveSync v2.13.2
>>>
>>> The last version of Horde_ActiveSync that more-or-less works here  
>>> is 2.12.4, where the supporting protocol version matches with what  
>>> the devices actually support:
>>>
>>> INFO: [19415] Request being handled for device: HTCAND543813B4,  
>>> Supporting protocol version: 12.1, Using Horde_ActiveSync v2.12.4
>>> INFO: [20366] Request being handled for device: 847CC7DCA0F0B1CF,  
>>> Supporting protocol version: 12.1, Using Horde_ActiveSync v2.12.4
>>> INFO: [26236] Request being handled for device:  
>>> ANDROID1325376003651, Supporting protocol version: 14.1, Using  
>>> Horde_ActiveSync v2.12.4
>>>
>>> Only the ANDROID1325376003651 is able to synchronize mail without  
>>> issues, for the other two there will be massive looping syncs  
>>> before Horde gives up on synchronization (large mailboxes and the  
>>> calendar seem to be affected). With v2.12.4 all devices  
>>> synchronize at least mail and contacts properly and some accounts  
>>> (this doesn't seem to be related to the devices) will also have  
>>> their calendar synchronized.
>>
>> Can you provide the exact string that the client sends in the  
>> version header?
>
> Do I need to grab this from the wire or is this logged somewhere?

I think I found the problem. The version returned by the client is not  
used anymore. It is supposed to be set in Horde/ActiveSync.php by the  
following code

   1018      /**
   1019       * Obtain the ActiveSync protocol version requested by  
the client headers.
   1020       *
   1021       * @return long
   1022       */
   1023      public function getProtocolVersion()
   1024      {
   1025          if (isset(self::$_version)) {
   1026              return self::$_version;
   1027          }
   1028          self::$_version =  
$this->_request->getHeader('MS-ASProtocolVersion');
   1029          if (empty(self::$_version)) {
   1030              $get = $this->getGetVars();
   1031              self::$_version = empty($get['ProtVer']) ? '1.0'  
: $get['ProtVer'];
   1032          }
   1033          return self::$_version;
   1034      }
   1035

If I understand the above correctly, this will no longer work since  
the following commit already defaults $_version to 14.1 (and the  
function will always return without parsing the header).

diff --git a/framework/ActiveSync/lib/Horde/ActiveSync.php  
b/framework/ActiveSync/lib/Horde/ActiveSync.php
index e1e5840..d3bda80 100644
--- a/framework/ActiveSync/lib/Horde/ActiveSync.php
+++ b/framework/ActiveSync/lib/Horde/ActiveSync.php
@@ -324,7 +324,7 @@ class Horde_ActiveSync
       *
       * @var float
       */
-    static protected $_version;
+    static protected $_version = 14.1;

      /**
       * Multipart support?

I have yet to try if reverting this will fix things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140323/8309a486/attachment-0001.bin>


More information about the horde mailing list