6.0.0-alpha14
7/2/25

[#11034] wrong setting of "secure" session attribute breaks TLS IMAP server
Summary wrong setting of "secure" session attribute breaks TLS IMAP server
Queue Kolab
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester jmozdzen (at) nde (dot) ag
Created 02/27/2012 (4874 days ago)
Due
Updated 03/01/2012 (4871 days ago)
Assigned
Resolved 02/29/2012 (4872 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/01/2012 08:35:13 AM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (develop):

commit d4ebc79d9993243ca429b4a9fa0ad2aaf6ae056c
Author: Jan Schneider <jan@horde.org>
Date:   Wed Feb 29 18:51:00 2012 +0100

     Fix 'secure' parameter (Bug #11034).

  .../Core/lib/Horde/Core/Factory/KolabStorage.php   |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/d4ebc79d9993243ca429b4a9fa0ad2aaf6ae056c
03/01/2012 08:33:56 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (develop):

commit a6faf8d5d2b173d50649774f539a559ef06e7fc7
Author: Jan Schneider <jan@horde.org>
Date:   Wed Feb 29 15:12:36 2012 +0100

     true is not a valid paramter value for 'secure' (Bug #11034).

  .../Kolab_Session/lib/Horde/Kolab/Session/Imap.php |    2 +-
  framework/Kolab_Session/package.xml                |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

http://git.horde.org/horde-git/-/commit/a6faf8d5d2b173d50649774f539a559ef06e7fc7
02/29/2012 05:51:13 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit d4ebc79d9993243ca429b4a9fa0ad2aaf6ae056c
Author: Jan Schneider <jan@horde.org>
Date:   Wed Feb 29 18:51:00 2012 +0100

     Fix 'secure' parameter (Bug #11034).

  .../Core/lib/Horde/Core/Factory/KolabStorage.php   |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/d4ebc79d9993243ca429b4a9fa0ad2aaf6ae056c
02/29/2012 05:35:51 PM jmozdzen (at) nde (dot) ag Comment #3 Reply to this comment
Sorry, I missed /usr/share/php5/PEAR/Horde/Core/Factory/KolabStorage.php:

93c93
<                 'secure'   => true
---
                 'secure'   => 'tls'
Regards
Jens
02/29/2012 02:18:22 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
02/29/2012 02:17:42 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit a6faf8d5d2b173d50649774f539a559ef06e7fc7
Author: Jan Schneider <jan@horde.org>
Date:   Wed Feb 29 15:12:36 2012 +0100

     true is not a valid paramter value for 'secure' (Bug #11034).

  .../Kolab_Session/lib/Horde/Kolab/Session/Imap.php |    2 +-
  framework/Kolab_Session/package.xml                |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

http://git.horde.org/horde-git/-/commit/a6faf8d5d2b173d50649774f539a559ef06e7fc7
02/27/2012 01:35:17 PM jmozdzen (at) nde (dot) ag Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ wrong setting of "secure" session attribute breaks TLS IMAP server
Queue ⇒ Kolab
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Latest Horde4 code from PEAR.

In /usr/share/php5/PEAR/Horde/Kolab/Session/Imap.php line 120, the 
"secure" attribute is set to "true:

         $imap = $this->_imap->create(
             array(
                 'hostspec' => $details['imap']['server'],
                 'username' => $user_id,
                 'password' => $password,
                 'port'     => $port,
                 'secure'   => true
             )
         );

This breaks access to a TLS-only (non-SSL) Kolab IMAP server:

/usr/share/php5/PEAR/Horde/Imap/Client/Socket.php line 451:
         switch ($this->_params['secure']) {
         case 'ssl':
             $conn = 'ssl://';
             $this->_isSecure = true;
             break;

         case 'tls':
         default:
             $conn = 'tcp://';
             break;
         }
For some reason unknown to me (I'm no PHP programmer), secure==true 
doesn't invoke the "default" case - I have to either set "$conn = 
'tcp://' explicitly (instead of the switch block) here or change to 
"secure => 'tls'" above to get a connection to our TLS Kolab server.

Saved Queries