From 9b2f2deb06018523a80c238ed7cdfe05b5ad3c7c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 21 Aug 2006 11:55:32 +0000 Subject: [PATCH] bug #1542875 Cookie auth on IIS --- ChangeLog | 4 ++++ libraries/auth/cookie.auth.lib.php | 1 + libraries/common.lib.php | 9 +++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e49d3188c..531f88a0e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-08-21 Marc Delisle + * libraries/common.lib.php, libraries/auth/cookie.auth.lib.php: + bug #1542875, Cookie auth on IIS + 2006-08-20 Marc Delisle * lang/bulgarian: Update, thanks to Stanislav Yordanov - stanprog. diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 6342f08cb..9a8b840b6 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -483,6 +483,7 @@ function PMA_auth_set_user() $url_params['target'] = $GLOBALS['target']; } + define('PMA_COMING_FROM_COOKIE_LOGIN',1); PMA_sendHeaderLocation( $redirect_url . PMA_generate_common_url( $url_params, '&' ) ); exit(); } // end if diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 03a05bcd8..ad78925e8 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1136,11 +1136,12 @@ if (!defined('PMA_MINIMUM_COMMON')) { session_write_close(); // bug #1523784: IE6 does not like 'Refresh: 0', it // results in a blank page - //if (PMA_IS_IIS) { - // header('Refresh: 0; ' . $uri); - //} else { + // (but we need it when coming from the cookie login panel) + if (PMA_IS_IIS && defined('PMA_COMING_FROM_COOKIE_LOGIN')) { + header('Refresh: 0; ' . $uri); + } else { header('Location: ' . $uri); - //} + } } } }