34
34
$ ilCtrl ->initBaseClass ("ilStartUpGUI " );
35
35
$ ilCtrl ->setCmd ('doApacheAuthentication ' );
36
36
$ ilCtrl ->setTargetScript ("ilias.php " );
37
- $ ilCtrl ->callBaseClass ();
38
-
39
-
40
-
41
- /*
42
-
43
- include_once './Services/Authentication/classes/class.ilAuthUtils.php';
44
-
45
- $_POST['auth_mode'] = AUTH_APACHE;
46
-
47
- ilAuthFactory::setContext(ilAuthFactory::CONTEXT_APACHE);
48
-
49
- require_once "include/inc.header.php";
50
-
51
- $redirect = $_GET['r'];
52
-
53
- $validDomains = array();
54
-
55
- $path = ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt';
56
- if(file_exists($path) && is_readable($path))
57
- {
58
- foreach(file($path) as $line)
59
- {
60
- if(trim($line))
61
- {
62
- $validDomains[] = trim($line);
63
- }
64
- }
65
- }
66
-
67
- $P = parse_url($redirect);
68
- $redirectDomain = $P["host"];
69
-
70
- $validRedirect = false;
71
-
72
- foreach($validDomains as $validDomain)
73
- {
74
- if( $redirectDomain === $validDomain )
75
- {
76
- $validRedirect = true;
77
- break;
78
- }
79
-
80
- if( strlen($redirectDomain) > (strlen($validDomain) + 1) )
81
- {
82
- if( substr($redirectDomain, (0 - strlen($validDomain) - 1)) === '.'. $validDomain)
83
- {
84
- $validRedirect = true;
85
- break;
86
- }
87
- }
88
- }
89
-
90
- if( !$validRedirect )
91
- {
92
- die('The redirect target "'.$redirect.'" is not in the list of allowed domains.');
93
- }
94
-
95
- if (strpos($redirect, '?') === false)
96
- $redirect .= '?passed_sso=1';
97
- else
98
- $redirect .= '&passed_sso=1';
99
-
100
- if ((defined('APACHE_ERRORCODE') && APACHE_ERRORCODE) || (!$ilUser || $ilUser->getId() == ANONYMOUS_USER_ID || !$ilUser->getId()))
101
- $redirect .= '&auth_stat='. AUTH_APACHE_FAILED;
102
-
103
-
104
-
105
- header('Location: ' . $redirect);
106
- */
37
+ $ ilCtrl ->callBaseClass ();
0 commit comments