bernd commited on 2009-03-31 10:49:47
Zeige 3 geänderte Dateien mit 10 Einfügungen und 4 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1318 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -46,7 +46,7 @@ if ($_SESSION['role'] != ROLE_ANONYMOUS && isset($_REQUEST['record']) && isset($ |
46 | 46 |
$_SESSION['clientcert_cert'] = prepare_cert($_ENV['REDIRECT_SSL_CLIENT_CERT']); |
47 | 47 |
$_SESSION['clientcert_dn'] = $_ENV['REDIRECT_SSL_CLIENT_S_DN']; |
48 | 48 |
$_SESSION['clientcert_issuer'] = $_ENV['REDIRECT_SSL_CLIENT_I_DN']; |
49 |
- header('Location: '.$_REQUEST['backto']); |
|
49 |
+ header('Location: '.$prefix.$_REQUEST['backto'].encode_querystring('')); |
|
50 | 50 |
die(); |
51 | 51 |
} |
52 | 52 |
else |
... | ... |
@@ -148,18 +148,24 @@ function encode_querystring($querystring) |
148 | 148 |
global $debugmode; |
149 | 149 |
if ($debugmode) |
150 | 150 |
$querystring = 'debug&'.$querystring; |
151 |
+ DEBUG($querystring); |
|
151 | 152 |
$query = explode('&', $querystring); |
153 |
+ DEBUG($query); |
|
152 | 154 |
$new_query = array(); |
153 | 155 |
foreach ($query AS $item) |
154 | 156 |
if ($item != '') |
155 | 157 |
{ |
156 | 158 |
list($key, $val) = explode('=', $item, 2); |
157 |
- $new_query[] = $key.'='.($val); |
|
159 |
+ if ($val == '') |
|
160 |
+ $new_query[] = $key; |
|
161 |
+ else |
|
162 |
+ $new_query[] = $key.'='.urlencode($val); |
|
158 | 163 |
} |
164 |
+ DEBUG($new_query); |
|
159 | 165 |
$querystring = implode('&', $new_query); |
160 | 166 |
if ($querystring) |
161 | 167 |
$querystring = '?'.$querystring; |
162 |
- |
|
168 |
+ DEBUG($querystring); |
|
163 | 169 |
return $querystring; |
164 | 170 |
} |
165 | 171 |
|
... | ... |
@@ -52,7 +52,7 @@ else |
52 | 52 |
output('<p><em>Bisher sind keine Zertifikate für Ihren Zugang eingerichtet</em>'); |
53 | 53 |
} |
54 | 54 |
|
55 |
-$backurl = str_replace('?clear', '', $_SERVER['REQUEST_URI']); |
|
55 |
+$backurl = 'go/index/cert'; |
|
56 | 56 |
|
57 | 57 |
output('<p>'.internal_link('../../certlogin/index.php', 'Neues Client-Zertifikat hinzufügen', 'record&backto='.$backurl).'</p>'); |
58 | 58 |
|
59 | 59 |