From 1f19690cbea8c2ba1f521173294923ca22f4ba5c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 15 Sep 2016 15:49:54 +0200 Subject: [PATCH] [jan] Fix parsing GETACL responses from RFC 4314 capable IMAP servers (Bug #14466). --- .../Imap_Client/lib/Horde/Imap/Client/Data/Acl.php | 14 +++++++++++--- framework/Imap_Client/package.xml | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Data/Acl.php b/framework/Imap_Client/lib/Horde/Imap/Client/Data/Acl.php index 8d1614be23a..8175604adcc 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Data/Acl.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Data/Acl.php @@ -78,12 +78,20 @@ protected function _normalize() * to handle these rights when dealing with RFC 2086 servers since * we are abstracting out use of ACL_CREATE/ACL_DELETE to their * component RFC 4314 rights. */ + foreach ($this->_virtual as $key => $val) { + foreach ($val as $right) { + if ($this[$right]) { + foreach (array_keys($this->_virtual) as $virtual) { + unset($this[$virtual]); + } + return; + } + } + } foreach ($this->_virtual as $key => $val) { if ($this[$key]) { unset($this[$key]); - if (!$this[reset($val)]) { - $this->_rights = array_unique(array_merge($this->_rights, $val)); - } + $this->_rights = array_unique(array_merge($this->_rights, $val)); } } } diff --git a/framework/Imap_Client/package.xml b/framework/Imap_Client/package.xml index 64237852f9a..6bb9353ab7b 100644 --- a/framework/Imap_Client/package.xml +++ b/framework/Imap_Client/package.xml @@ -21,7 +21,7 @@ LGPL-2.1 -* +* [jan] Fix parsing GETACL responses from RFC 4314 capable IMAP servers (Bug #14466). @@ -3050,7 +3050,7 @@ 2016-09-01 LGPL-2.1 -* +* [jan] Fix parsing GETACL responses from RFC 4314 capable IMAP servers (Bug #14466).