Home » Authentication » LiveUser » Bug #979
Bug in processLogout()
Details
| Submitted | 2004-03-09 12:43 UTC |
|---|---|
| From | alain_d99 at freesurf dot ch |
| Assigned | lsmith |
| Status | Closed |
| Package | LiveUser |
| PHP Version | 4.2.1 |
| OS | Windows |
| 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.