1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php smeserver-php-3.0.0/root/usr/share/php/auth_translation.php |
2 |
|
|
--- smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php 2022-12-14 02:07:38.073000000 -0500 |
3 |
|
|
+++ smeserver-php-3.0.0/root/usr/share/php/auth_translation.php 2022-12-14 02:09:49.424000000 -0500 |
4 |
|
|
@@ -1,13 +1,22 @@ |
5 |
|
|
<?php |
6 |
|
|
+if (isset($_SERVER['REDIRECT_REMOTE_USER'])) { |
7 |
|
|
+ $_SERVER['REMOTE_USER']= $_SERVER['REDIRECT_REMOTE_USER']; |
8 |
|
|
+} |
9 |
|
|
if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { |
10 |
|
|
- $hash = str_replace('Basic ', '', $_SERVER['REDIRECT_HTTP_AUTHORIZATION']); |
11 |
|
|
- $hash = base64_decode($hash); |
12 |
|
|
$_SERVER['HTTP_AUTHORIZATION']=$_SERVER['REDIRECT_HTTP_AUTHORIZATION']; |
13 |
|
|
+ $hash = str_replace('Basic ', '', $_SERVER['HTTP_AUTHORIZATION']); |
14 |
|
|
+ $hash = base64_decode($hash);error_log($hash); |
15 |
|
|
if (strpos($hash, ':') !== false) { |
16 |
|
|
list( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', $hash, 2); |
17 |
|
|
} |
18 |
|
|
} |
19 |
|
|
-if (isset($_SERVER['REDIRECT_REMOTE_USER'])) { |
20 |
|
|
- $_SERVER['REMOTE_USER']= $_SERVER['REDIRECT_REMOTE_USER']; |
21 |
|
|
+ |
22 |
|
|
+if (isset($_SERVER['HTTP_AUTH_TKT'])) { |
23 |
|
|
+ $hash = base64_decode($_SERVER['HTTP_AUTH_TKT']); |
24 |
|
|
+ if (strpos($hash, '!') !== false) { |
25 |
|
|
+ list ( $auth, $timehost) = explode('!', $hash, 2); |
26 |
|
|
+ $_SERVER['TOKEN'] = substr($auth,0,72); |
27 |
|
|
+ $_SERVER['PHP_AUTH_USER']= $_SERVER['REMOTE_USER']; |
28 |
|
|
+ } |
29 |
|
|
} |
30 |
|
|
?> |