Summary | Gollem Auth thorws warning and pollutes Errorlog - fix available |
Queue | Gollem |
Queue Version | Git master |
Type | Bug |
State | Not Reproducible |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | torben (at) dannhauer (dot) info |
Created | 02/16/2017 (3060 days ago) |
Due | |
Updated | 04/03/2017 (3014 days ago) |
Assigned | 02/24/2017 (3052 days ago) |
Resolved | 04/03/2017 (3014 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
using the current set of stable pear packages of Horde, I'm also not
able to reproduce it.
I recommend to close the bug. Thanks for your help.
When it did break for me, it was an unencrypted binary string when
the original $password array contained a single entry in element
(int)0. If the entry was "moved" to element '1', it worked but I
can't get it to break again. It's always returned as an array now.
this issue on Tuesday or Wednesday.
When it did break for me, it was an unencrypted binary string when the
original $password array contained a single entry in element (int)0.
If the entry was "moved" to element '1', it worked but I can't get it
to break again. It's always returned as an array now.
numeric keys. I've been able to reproduce it on one machine using
PHP 5.6, but not on my dev machine running php 7.
Still investigating.
numeric keys. I've been able to reproduce it on one machine using
PHP 5.6, but not on my dev machine running php 7.
Still investigating.
Taken from
numeric keys. I've been able to reproduce it on one machine using PHP
5.6, but not on my dev machine running php 7.
Still investigating.
Assigned to Michael Rubinsky
State ⇒ Assigned
$session->get when the TYPE_ARRAY mask is passed? Perhaps it's an
issue in Horde_Session when a value is saved with the ENCRYPT mask but
retrieved with the TYPE_ARRAY mask.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Gollem Auth thorws warning and pollutes Errorlog - fix available
Queue ⇒ Gollem
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
ERROR: Invalid argument supplied for foreach()"
Since the causing function _getBackends() is invoked several times, it
pollutes the logfile.
In the mentioned function, the passwords are retrieved and iterated
via foreach. However, if only a singlr password is returned, PHP
complains that it is no array.
I propose to insert an cast into array to have a defined type
presented to foreach() to correct the problem.
The fixed function should be like this:
gollem/lib/Auth.php:
/**
* Return stored backend list.
*
* @return array Backend configuration list.
*/
protected static function _getBackends()
{
global $session;
if (($backends = $session->get('gollem', 'backends',
$session::TYPE_ARRAY)) &&
($passwords = $session->get('gollem',
'backends_password', $session::TYPE_ARRAY))) {
foreach ( (array) $passwords as $key => $val) {
$backends[$key]['params']['password'] = $val;
}
}
return $backends;
}
Thanks,
Torben