zarafa/www-apps/zarafa-webapp/files/zarafa-webapp-phpautologin-...

20 lines
1.2 KiB
Diff

diff -rupN zarafa-webapp-1.4-42633/usr/share/zarafa-webapp/index.php zarafa-webapp-1.4-42633.patched/usr/share/zarafa-webapp/index.php
--- zarafa-webapp-1.4-42633/usr/share/zarafa-webapp/index.php 2013-10-01 19:35:05.000000000 +0200
+++ zarafa-webapp-1.4-42633.patched/usr/share/zarafa-webapp/index.php 2013-10-14 20:02:48.644604785 +0200
@@ -122,12 +122,12 @@
// REMOTE_USER is set when apache has authenticated the user
// Don't perform single-signon when $_POST is set, as that implies
// the user was sending us data from a form.
- if (!$_POST && $_SERVER && array_key_exists('REMOTE_USER', $_SERVER)) {
- $_SESSION['username'] = $_SERVER['REMOTE_USER'];
+ if (!$_POST && $_SERVER && array_key_exists('PHP_AUTH_USER', $_SERVER)) {
+ $_SESSION['username'] = $_SERVER['PHP_AUTH_USER'];
if (LOGINNAME_STRIP_DOMAIN) {
$_SESSION['username'] = ereg_replace('@.*', '', $_SESSION['username']);
}
- $_SESSION['password'] = '';
+ $_SESSION['password'] = $_SERVER['PHP_AUTH_PW'];
}
}