PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser » Bug #566

LiveUser::getAuthAdminObjectByName skips matching

Details

Submitted2004-01-13 19:08 UTC
Fromjmikola at burgiss dot com
Assignedlsmith
StatusClosed
PackageLiveUser
PHP VersionIrrelevant
OSANY
Roadmaps(Not assigned)

Comments

[2004-01-13 19:08 UTC] jmikola at burgiss dot com

Description:
------------
i posted this to the mailing list towards the end of december; however, it was never resolved:

LiveUser::getAuthAdminObjectByName, line 447

as we iterate over all available auth containers to check for that which matches our desired name, the condition for breaking the loop on a match-condition fails to check if the names are actually equal. currently, it appears that without that condition, this loop would just match the last auth container in the list, regardless of the name.

foreach ($this->authContainers as $container) {
if (isset($container['name']) &&
$container['name']) {
$con = $container['name'];
break; // exit foreach loop
}
}

i would think the following additional condition, if added to the if-statement, would clear up the issue:

$container['name'] == $name