5 define(
'IL_CERT_SSO',
true);
6 define(
'IL_COOKIE_PATH',
$_REQUEST[
'cookie_path']);
8 define(
'ILIAS_HTTP_PATH',
$_REQUEST[
'ilias_path']);
10 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
16 require_once
"include/inc.header.php";
20 $path = ILIAS_DATA_DIR .
'/' . CLIENT_ID .
'/apache_auth_allowed_domains.txt';
21 if (file_exists(
$path) && is_readable(
$path)) {
22 foreach(file(
$path) as $line) {
24 $validDomains[$line] = 1;
30 $validDomains = array();
33 $validDomains[] = $_SERVER[
'HTTP_HOST'];
36 $pos = strrpos(substr(
$P[
"host"],0,strrpos(
$P[
"host"],
'.')),
'.' );
44 $domain = substr(
$P[
"host"],
$pos);
46 if($validDomains[$domain] !== 1) {
47 die(
'The redirect target "'.
$redirect.
'" is not in the list of allowed domains.');
55 if ((defined(
'APACHE_ERRORCODE') && APACHE_ERRORCODE) || (!$ilUser || $ilUser->getId() == ANONYMOUS_USER_ID || !$ilUser->getId()))