Skip to content

Commit

Permalink
Fixing #5018 - Unexpected auto-logout
Browse files Browse the repository at this point in the history
It is possible in some rare cases to have 'remember me' enabled and still be logged out after a browser timeout
  • Loading branch information
TheWitness committed Nov 24, 2022
1 parent d9de71a commit 9bbb3e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Cacti CHANGELOG
-issue#5012: Fixed three error for PHP 8 when execute cli/upgrade_database.php
-issue#5013: Cacti Bulk Walk Size of 'Auto-detect at First Reindex' not working
-issue#5017: Undefined array key and Rounding causes errors
-issue#5018: It is possible in some rare cases to have 'remember me' enabled and still be logged out after a browser timeout
-feature#1100: Structured path not created when using remote poller and Update On-Demand
-feature#1392: AJAX handled errors do not notify Admins that page errors exist
-feature#2239: Allow Import and Export to be more controlled
Expand Down
4 changes: 3 additions & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4520,7 +4520,9 @@ function set_page_refresh($refresh) {
$_SESSION['refresh']['seconds'] = $refresh['seconds'];
}

if (isset($refresh['logout'])) {
if (read_config_option('auth_cache_enabled') == 'on' && isset($_SESSION['cacti_remembers']) && $_SESSION['cacti_remembers'] == true) {
$_SESSION['refresh']['logout'] = 'false';
} elseif (isset($refresh['logout'])) {
if ($refresh['logout'] == 'true' || $refresh['logout'] === true) {
$_SESSION['refresh']['logout'] = 'true';
} else {
Expand Down

0 comments on commit 9bbb3e3

Please sign in to comment.