Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Small change to web basic auth

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
ripienaar



Joined: 24 Oct 2003
Posts: 7

PostPosted: Mon Mar 17, 2008 2:05 pm    Post subject: Small change to web basic auth Reply with quote

Hello,

I want to manage my authentication using a single singon system, unfortunately from Apache this means AuthType cannot be Basic.

PHP unfortunately only sets $_SERVER[PHP_AUTH_USER] if AuthType = Basic, which is often not the case for custom auth types. This is unfortunately a stupid assumption by PHP developers that only type Basic would have usernames!

The simple work around for this is to check for $_SERVER[PHP_AUTH_USER] and for $_SERVER[REMOTE_USER] in the auth module:

Currently auth_login.php:
Code:

if (isset($_SERVER["PHP_AUTH_USER"])) {
        $username = str_replace("\\", "\\\\", $_SERVER["PHP_AUTH_USER"]);
}


If this code can also check if $_SERVER[REMOTE_USER] is present and use that in the event that PHP_AUTH_USER isnt there that will help people with some other auth methods
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Mon Mar 17, 2008 10:44 pm    Post subject: Reply with quote

Noted...

Please submit a bug per http://www.cacti.net/bugs.php
Back to top
ripienaar



Joined: 24 Oct 2003
Posts: 7

PostPosted: Tue Mar 18, 2008 4:10 pm    Post subject: Reply with quote

rony wrote:
Noted...

Please submit a bug per http://www.cacti.net/bugs.php


Done, bug number 1211
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group