summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-06-25 23:09:29 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-06-25 23:09:29 +0200
commit1ec50243108e9544bb45b178c846d689fe4c090a (patch)
tree9ccdeed4547f067e93d39135dd5da9417d30cbc8
parent0f4f4adfcb496009aa1913a09e2300a455f7b866 (diff)
downloadrpg-1ec50243108e9544bb45b178c846d689fe4c090a.tar.gz
rpg-1ec50243108e9544bb45b178c846d689fe4c090a.tar.bz2
fix for recent auth change
darcs-hash:20070625210929-7ad00-034c5839bbca3e697d360f72dffcf9d927fea755.gz
-rw-r--r--inc/auth.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/inc/auth.php b/inc/auth.php
index c30aabe82..364346930 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -53,22 +53,24 @@
}
// do the login either by cookie or provided credentials
- if($conf['useacl'] && $auth){
- if (!isset($_REQUEST['u'])) $_REQUEST['u'] = '';
- if (!isset($_REQUEST['p'])) $_REQUEST['p'] = '';
- if (!isset($_REQUEST['r'])) $_REQUEST['r'] = '';
-
- // if no credentials were given try to use HTTP auth (for SSO)
- if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){
- $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER'];
- $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW'];
- }
+ if($conf['useacl']){
+ if($auth){
+ if (!isset($_REQUEST['u'])) $_REQUEST['u'] = '';
+ if (!isset($_REQUEST['p'])) $_REQUEST['p'] = '';
+ if (!isset($_REQUEST['r'])) $_REQUEST['r'] = '';
+
+ // if no credentials were given try to use HTTP auth (for SSO)
+ if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){
+ $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER'];
+ $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW'];
+ }
- // external trust mechanism in place?
- if(!is_null($auth) && $auth->canDo('external')){
- $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
- }else{
- auth_login($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
+ // external trust mechanism in place?
+ if(!is_null($auth) && $auth->canDo('external')){
+ $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
+ }else{
+ auth_login($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']);
+ }
}
//load ACL into a global array