Session remnants on logout
Posted: Mon Feb 01, 2021 12:37 am
In both v4.5 and v4 of nuBuilder, after logout, there is still the following remnants of the $_SESSION variable:
This can be seen by
1. logging into a nuBuilder install,
2. logging out and
3. keeping the browser open and
4. altering the index.php as below and then visiting the login page again before actually logging in again.
Temporary code change before point 4 above: It is hence essential for the function logout() defined in nudata.php to have the following at the end inside the said function:
In v4, this should be considered with it's ramifications for WordPress plugin as well in lines 11 and 53 (JQ_PATH availability) in index.php.
The actual values of the session variable is as follows - before and after login:
Code: Select all
Array
(
[nubuilder_session_data] => Array
(
[GLOBEADMIN] =>
[GLOBEADMIN_NAME] => globeadmin
[GLOBEADMIN_PASS] => nu
[USER_LOGIN] =>
[USER_PASS] =>
[USER_EMAIL] =>
[USER_DISPLAY_NAME] =>
[USER_ROLES] =>
[DB_NAME] => nubuilder45
[DB_USER] => root
[DB_PASSWORD] =>
[DB_HOST] => 127.0.0.1
[DB_CHARSET] => utf8
[NU_SITE_URL] =>
[IS_DEMO] =>
[SESSION_ID] => s16121346474973
[SESSION_TIMESTAMP] => 1612134649
[IsDemo] =>
[translation] => Array
(
)
[isGlobeadmin] => 1
)
)
1. logging into a nuBuilder install,
2. logging out and
3. keeping the browser open and
4. altering the index.php as below and then visiting the login page again before actually logging in again.
Temporary code change before point 4 above: It is hence essential for the function logout() defined in nudata.php to have the following at the end inside the said function:
Code: Select all
unset($_SESSION['nubuilder_session_data']);
The actual values of the session variable is as follows - before and after login: