bernd commited on 2009-12-05 16:26:51
Zeige 1 geänderte Dateien mit 11 Einfügungen und 9 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1526 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -35,16 +35,18 @@ function get_logins_by_cert($cert) |
35 | 35 |
} |
36 | 36 |
} |
37 | 37 |
|
38 |
-DEBUG($_ENV); |
|
38 |
+DEBUG('$_SERVER:'); |
|
39 |
+DEBUG($_SERVER); |
|
40 |
+ |
|
39 | 41 |
|
40 | 42 |
if ($_SESSION['role'] != ROLE_ANONYMOUS && isset($_REQUEST['record']) && isset($_REQUEST['backto']) && check_path($_REQUEST['backto'])) |
41 | 43 |
{ |
42 | 44 |
DEBUG('recording client-cert'); |
43 |
- if (isset($_ENV['REDIRECT_SSL_CLIENT_CERT']) && $_ENV['REDIRECT_SSL_CLIENT_S_DN'] != '' && $_ENV['REDIRECT_SSL_CLIENT_I_DN'] != '') |
|
45 |
+ if (isset($_SERVER['REDIRECT_SSL_CLIENT_CERT']) && $_SERVER['REDIRECT_SSL_CLIENT_S_DN'] != '' && $_SERVER['REDIRECT_SSL_CLIENT_I_DN'] != '') |
|
44 | 46 |
{ |
45 |
- $_SESSION['clientcert_cert'] = prepare_cert($_ENV['REDIRECT_SSL_CLIENT_CERT']); |
|
46 |
- $_SESSION['clientcert_dn'] = $_ENV['REDIRECT_SSL_CLIENT_S_DN']; |
|
47 |
- $_SESSION['clientcert_issuer'] = $_ENV['REDIRECT_SSL_CLIENT_I_DN']; |
|
47 |
+ $_SESSION['clientcert_cert'] = prepare_cert($_SERVER['REDIRECT_SSL_CLIENT_CERT']); |
|
48 |
+ $_SESSION['clientcert_dn'] = $_SERVER['REDIRECT_SSL_CLIENT_S_DN']; |
|
49 |
+ $_SESSION['clientcert_issuer'] = $_SERVER['REDIRECT_SSL_CLIENT_I_DN']; |
|
48 | 50 |
header('Location: '.$prefix.$_REQUEST['backto'].encode_querystring('')); |
49 | 51 |
die(); |
50 | 52 |
} |
... | ... |
@@ -54,10 +56,10 @@ if ($_SESSION['role'] != ROLE_ANONYMOUS && isset($_REQUEST['record']) && isset($ |
54 | 56 |
} |
55 | 57 |
} |
56 | 58 |
elseif (isset($_REQUEST['type']) && isset($_REQUEST['username'])) { |
57 |
- if (!isset($_ENV['REDIRECT_SSL_CLIENT_CERT'])) |
|
59 |
+ if (!isset($_SERVER['REDIRECT_SSL_CLIENT_CERT'])) |
|
58 | 60 |
system_failure('Ihr Browser hat kein Client-Zertifikat gesendet'); |
59 | 61 |
|
60 |
- $ret = get_logins_by_cert($_ENV['REDIRECT_SSL_CLIENT_CERT']); |
|
62 |
+ $ret = get_logins_by_cert($_SERVER['REDIRECT_SSL_CLIENT_CERT']); |
|
61 | 63 |
foreach ($ret as $account) { |
62 | 64 |
if (($account['type'] == $_REQUEST['type']) && ($account['username'] == $_REQUEST['username'])) { |
63 | 65 |
$uid = $account['username']; |
... | ... |
@@ -76,8 +78,8 @@ elseif (isset($_REQUEST['type']) && isset($_REQUEST['username'])) { |
76 | 78 |
} |
77 | 79 |
else |
78 | 80 |
{ |
79 |
- if (isset($_ENV['REDIRECT_SSL_CLIENT_CERT']) && $_ENV['REDIRECT_SSL_CLIENT_S_DN'] != '' && $_ENV['REDIRECT_SSL_CLIENT_I_DN'] != '') { |
|
80 |
- $ret = get_logins_by_cert($_ENV['REDIRECT_SSL_CLIENT_CERT']); |
|
81 |
+ if (isset($_SERVER['REDIRECT_SSL_CLIENT_CERT']) && $_SERVER['REDIRECT_SSL_CLIENT_S_DN'] != '' && $_SERVER['REDIRECT_SSL_CLIENT_I_DN'] != '') { |
|
82 |
+ $ret = get_logins_by_cert($_SERVER['REDIRECT_SSL_CLIENT_CERT']); |
|
81 | 83 |
if ($ret === NULL) { |
82 | 84 |
system_failure('Ihr Browser hat ein Client-Zertifikat gesendet, dieses ist aber noch nicht für den Zugang hinterlegt. Gehen Sie bitte zurück und melden Sie sich bitte per Benutzername und Passwort an.'); |
83 | 85 |
} |
84 | 86 |