From 91c53c5fd17438253e2e7946a23ae1456de9f096 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Mon, 1 Jun 2015 17:54:24 -0400 Subject: [PATCH] Log this specific protocol error. --- .../ActiveSync/lib/Horde/ActiveSync/Request/Sync.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php b/framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php index e9a9d9b018a..51688089fd3 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php @@ -750,6 +750,15 @@ protected function _parseSyncFolders() case Horde_ActiveSync::SYNC_FOLDERID: $collection['id'] = $this->_decoder->getElementContent(); + if ($collection['id'] === false) { + // Log this case explicitly since we can't send back + // a protocol error status (the response requires a + // collection id and we obviously don't have one). + $this->_logger->err(sprintf( + '[%s] PROTOCOL ERROR. Client sent an empty SYNC_FOLDERID value.', + $this->_procid)); + throw new Horde_ActiveSync_Exception('Protocol error'); + } if (!$this->_decoder->getElementEndTag()) { throw new Horde_ActiveSync_Exception('Protocol error'); }