6.0.0-alpha14
7/2/25

[#7881] Driver.php,v 1.46 - realm and conf.php
Summary Driver.php,v 1.46 - realm and conf.php
Queue Vacation
Queue Version 3.1-RC1
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester horde (at) smartsector (dot) hu
Created 01/23/2009 (6004 days ago)
Due
Updated 01/29/2009 (5998 days ago)
Assigned 01/24/2009 (6003 days ago)
Resolved 01/29/2009 (5998 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/29/2009 09:07:40 PM Jan Schneider State ⇒ Resolved
 
01/29/2009 08:04:36 PM horde (at) smartsector (dot) hu Comment #10 Reply to this comment
looks perfect!
Try now?
01/29/2009 04:00:07 PM Jan Schneider Comment #9 Reply to this comment
Try now?
01/29/2009 03:58:36 PM CVS Commit Comment #8 Reply to this comment
01/29/2009 03:57:59 PM CVS Commit Comment #7 Reply to this comment
01/29/2009 03:26:29 PM horde (at) smartsector (dot) hu Comment #6 Reply to this comment
We tried out the new version, but recived the following notices:



Notice: Undefined variable: realm in 
/usr/share/horde/vacation/lib/Driver.php on line 441



Notice: Undefined variable: realm in 
/usr/share/horde/vacation/lib/Driver/customsql.php on line 41



versions:

$Horde: vacation/lib/Driver.php,v 1.47 2009-01-29 11:16:15 jan Exp $

$Horde: vacation/lib/Driver/customsql.php,v 1.4 2009-01-29 11:16:16 jan Exp $
01/29/2009 11:18:09 AM Jan Schneider Comment #4
Taken from Chuck Hagenbuch
Reply to this comment
Realm handling has been moved to the constructor and before retrieving 
the 'hordeauth' parameter, can you test if that fixes things for you.



@Chuck: realms can be set manually in conf.php. It's a cruft from 
pre-conf.xml times.
01/24/2009 04:22:15 AM Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
Assigned to Jan Schneider
State ⇒ Feedback
Reply to this comment
I don't think that will do the right thing either, though. The 
handling of $realm looks really wonky to me - Jan, any thoughts here? 
I think we should move it entirely into the driver. And I also don't 
see where $params['realm'] would ever be set.
01/23/2009 05:24:45 PM horde (at) smartsector (dot) hu Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Vacation
Summary ⇒ Driver.php,v 1.46 - realm and conf.php
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
There si a little bug when you do not set up any realm and use full 
user names like:

info@example.com



you must set up the $params correctly before you check the hordeauth.

here is a patch, just need change the lines:



The original one:

  function Vacation_Driver($user, $realm, $params = array())

     {

         $this->_params = $params;



         // Check if hordeauth is set to 'full'

         $hordeauth = $this->getParam('hordeauth');

         if ($hordeauth !== 'full') {

             @list($user,) = explode('@', $user, 2);

         }

         $this->_user = $user;



         if (!isset($params[$realm])) {

             $realm = 'default';

         }

         $this->_realm = $realm;

     }



The fixed one:

  function Vacation_Driver($user, $realm, $params = array())

     {

         $this->_params = $params;



         if (!isset($params[$realm])) {

             $realm = 'default';

         }

         $this->_realm = $realm;



         // Check if hordeauth is set to 'full'

         $hordeauth = $this->getParam('hordeauth');

         if ($hordeauth !== 'full') {

             @list($user,) = explode('@', $user, 2);

         }

         $this->_user = $user;

      }

Saved Queries