From d038119a3bd7bd0b021b74caca71dc61095a891d Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 5 Feb 2025 11:41:02 +0100 Subject: [PATCH] adapt infoterminal page so that login can be forced --- cis/infoterminal/index.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cis/infoterminal/index.php b/cis/infoterminal/index.php index 852526108..1b4c7d637 100644 --- a/cis/infoterminal/index.php +++ b/cis/infoterminal/index.php @@ -38,6 +38,14 @@ require_once('../../include/authentication.class.php'); require_once('../../include/addon.class.php'); require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php'); +// 2025-02-05 ma0080 add query parameter to force login e.g. when used in iframe in CIS4.0 begin +if( isset($_GET['forcelogin']) && !isset($_SERVER['PHP_AUTH_USER']) ) { + header('WWW-Authenticate: Basic Realm="' . AUTH_NAME . '"'); + http_response_code(401); + die(); +} +// 2025-02-05 ma0080 add query parameter to force login e.g. when used in iframe in CIS4.0 end + if (!$db = new basis_db()) $db=false;