Skip to content

Commit d622457

Browse files
committed
Fix cookie session timestamp validation
In certain scenarios localhost could be blocked or take a long time to resolve, hence the cookie session validation now uses the loopback address directly instead of localhost
1 parent b897ad3 commit d622457

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
1.9.45
2+
* FIX: Fix not working cookie session timestamps validation introduced with 1.9.43 in
3+
when localhost is blocked or takes a long time to resolve
24

35
1.9.44
46
* FIX: Fix not working cookie session timestamps validation introduced with 1.9.43 in

share/server/core/classes/CoreLogonMultisite.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ private function checkAuthCookie($cookieName) {
138138
// Check session periods validity
139139
$site = getenv('OMD_SITE');
140140
$port = $_SERVER['SERVER_PORT'];
141-
$url = "http://localhost:$port/$site/check_mk/api/1.0/version";
141+
$host = $_SERVER['SERVER_HOST'];
142+
$url = "http://$host:$port/$site/check_mk/api/1.0/version";
142143

143144
$headers = [
144145
'Content-type: application/json',

0 commit comments

Comments
 (0)