From cf30c52cb2abb138d3305b62849480b9e2a3b34b Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 27 Jun 2014 12:24:44 +0200 Subject: [PATCH] Really fix the ID decoding check --- plugins/kolab_addressbook/kolab_addressbook.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php index dba4ca7f..a960a003 100644 --- a/plugins/kolab_addressbook/kolab_addressbook.php +++ b/plugins/kolab_addressbook/kolab_addressbook.php @@ -371,10 +371,10 @@ class kolab_addressbook extends rcube_plugin } else { $id = kolab_storage::id_decode($p['id']); - if (preg_match('![^A-Za-z0-9/+=]!', $id)) // check for falsely base64 decoded identifier + if (preg_match('![^A-Za-z0-9=/+&._ -]!', $id)) // check for falsely base64 decoded identifier $id = $p['id']; $folder = kolab_storage::get_folder($id); - if (!$folder->type && $id != $p['id']) { // try with unencoded (old-style) identifier + if ($folder->type != 'contact' && $id != $p['id']) { // try with unencoded (old-style) identifier $folder = kolab_storage::get_folder($p['id']); } if ($folder->type) {