PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #5242

PEARAuth container illegal call to login()

Details

Submitted2005-08-30 14:28 UTC
Fromjeroen at terena dot nl
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version5.0.4
OSDebian Linux
Roadmaps(Not assigned)

Comments

[2005-08-30 14:28 UTC] jeroen at terena dot nl

Description:
------------
When trying to login to my radius server I got a message saying "no valid response from RADIUS server".

After some investigation it appeared the request was sent to the radius twice. Once yielding a proper response and then a second time throwing an error.

Seems that the readUserData() method of LiveUser_Auth_PEARAuth
explicitly calls the login() method of PEAR::Auth, which is marked as private!

Test script:
---------------
Test script would be too long. Create a liveuser object uses PEAR::Auth_Radius and the bug will becomes appearant. Login code gets executed twice, even if the first attempt is successful.

Simply removing the call to login() should fix things:

function readUserData()
{
// callinng start will implicitly call login() from the auth container if the user is not yet authenticated
$this->pearAuth->start();
// removed call to private method login()
// $this->pearAuth->login();

...

Expected result:
----------------
Login code executed only once.

Actual result:
--------------
Login code executed twice - can cause errors from the Auth backend.