Home » Authentication » LiveUser » Bug #776
Authentification bug with two files
Details
| Submitted | 2004-02-17 05:09 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-02-17 05:09 UTC] alain_d99 at freesurf dot ch
Description:
------------
LiveUser class: v1.74
PHP: 4.2.1
I try the LiveUser class in the following schema:
Login.php
Administration.php
I have declared the class LiveUser in both files, constructed with factory().
When the login is made into Login.php and authentification is ok, I redirect to Administration.php. In this file, the authentification always fail.
The problem comes from the LiveUser::unfreeze() in the following lines:
if
(isset($_SESSION[$this->_options['session']['varname']]['auth'])
&&
is_array($_SESSION[$this->_options['session']['varname']]['auth'])
&&
isset($_SESSION[$this->_options['session']['varname']]['auth']['auth_name'])
&&
strlen($_SESSION[$this->_options['session']['varname']]['auth']['auth_name'])
> 0) {
The last two lines are incorrects:
isset($_SESSION[$this->_options['session']['varname']]['auth']['auth_name'])
would be:
isset($_SESSION[$this->_options['session']['varname']]['auth_name'])
And
strlen($_SESSION[$this->_options['session']['varname']]['auth']['auth_name'])
would be:
strlen($_SESSION[$this->_options['session']['varname']]['auth_name'])
Now, the LiveUser class with two or more files (pages) works perfectly well (see #738 too).
Greetings,
Alain
Expected result:
----------------
Authentification into my second file Administration.php would work
Actual result:
--------------
Authentification into my second file Administration.php fails