From c5281935c6ff7d7b208e43794cbef21070acc090 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 15 Feb 2016 11:14:37 +0100 Subject: [PATCH] Regenerate a session ID only if the session exists refs #11151 --- library/Icinga/Web/Session/PhpSession.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Session/PhpSession.php b/library/Icinga/Web/Session/PhpSession.php index 06fd08b7c..0c10cdefa 100644 --- a/library/Icinga/Web/Session/PhpSession.php +++ b/library/Icinga/Web/Session/PhpSession.php @@ -213,7 +213,9 @@ class PhpSession extends Session public function refreshId() { $this->open(); - session_regenerate_id(); + if ($this->exists()) { + session_regenerate_id(); + } session_write_close(); $this->hasBeenTouched = true; }