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 #979

Bug in processLogout()

Details

Submitted2004-03-09 12:43 UTC
Fromalain_d99 at freesurf dot ch
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version4.2.1
OSWindows
Roadmaps(Not assigned)

Comments

[2004-03-09 12:43 UTC] alain_d99 at freesurf dot ch

Description:
------------
Hello,

LiveUser.php v1.80

The logout process doesn't work as expected.

The problem comes from the LiveUser::processLogout() that doesn't take the logout value from GET or POST method into account.

Line: ~1021

if (empty($handle)) {
$httpvar = (strtolower($this->_options['login']['method']) == 'post') ? $_POST : $_GET;
if (isset($httpvar[$this->_options['login']['username']]) &&
$httpvar[$this->_options['login']['username']] &&
isset($httpvar[$this->_options['login']['password']]) &&
$httpvar[$this->_options['login']['password']]
) {
$logout = true;
}
} else if($handle && $passwd) {
$logout = true;
}

would be:
if (empty($handle)) {
$httpvar = (strtolower($this->_options['login']['method']) == 'post') ? $_POST : $_GET;
if (isset($httpvar[$this->_options['login']['username']]) &&
$httpvar[$this->_options['login']['username']] &&
isset($httpvar[$this->_options['login']['password']]) &&
$httpvar[$this->_options['login']['password']]
) {
$logout = true;
} else if(isset($_GET[$this->_options['logout']['trigger']]) || // ADDED, NECESSARY
isset($_POST[$this->_options['logout']['trigger']])) { // ADDED
$logout = true;
}
} else if($handle && $passwd) {
$logout = true;
}

Now, LiveUser::processLogout() works perfectly well.

Thank for your work,
Alain

Expected result:
----------------
The logout process must work as expected.

Actual result:
--------------
The logout process doesn't work as expected: never log out.