[Tickets #7972] Re: SQL SSL support

bugs at horde.org bugs at horde.org
Sat Feb 14 05:33:01 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7972
------------------------------------------------------------------------------
  Ticket             | 7972
  Updated By         | BryanRJ at gmail.com
  Summary            | SQL SSL support
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_3
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          | 3.3.4
  Patch              |
  Owners             | Chuck Hagenbuch
------------------------------------------------------------------------------


BryanRJ at gmail.com (2009-02-14 00:33) wrote:

>> Perhaps this is a topic for another bug, but the handling of split
>> reads appears to be broken in all of these places - array_merge is
>> called to merge the original parameters with the read-only DB ones.
>> However, both the persistent connections option and this new SSL one
>> check !empty, so in the case where an SSL connection is desired for
>> the original database but not for the new one you will get incorrect
>> behavior.
>
> This would be a separate issue. But why? A false key in the new array
> should override a true key in the original one just fine.
>

This function, I do not think it does what you think it does ;-P.

Example code:

<?php

         $foo = array('foo'=>true, 'bar'=>'baz');

         $bazza = array('bar'=>'yar');

         var_dump(array_merge($foo,$bazza));

?>

This code prints:

array(2) {
   ["foo"]=>
   bool(true)
   ["bar"]=>
   string(3) "yar"
}

Note that "foo" is still set to true.  The analogy to the current  
situation is thus: if a user wants to use a persistent connection for  
the RW database and NOT use one for the RO database, they set the  
"persistent" flag in the RW options and set no such option in the RO.   
So you call array_merge($rwopts,$roopts) and get an array which has  
"persistent" nonempty, because it was nonempty in $rwopts...  Get it?

>> Also, the references to "$this->_params" inside the splitreads block
>> should be just "$params".
>
> That was from your patch - can you provide an updated one for just
> that issue?
>

Will do, give me a day or two.  But like I said it's not a big deal  
since the $params array is not correct anyhow and so using it won't  
change anything.

>> How do I go about getting this same change made to
>> Imp/Turba/Kronolith/etc?  Pretty much every application also needs it.
>
> Patches would be great, or at least tickets to remind us.
>
> Thanks!

OK, I'll add a few more tickets.







More information about the bugs mailing list