Jump to content

Disable PHP_AUTH_PW ?


syntax53

Recommended Posts

Hello, first time poster here.

 

I have a security concern that the interwebs can't seem to solve for me.  I use PHP_AUTH_USER for a ton of applications here at work.  This is an IIS box with PHP running as CGI.  PHP_AUTH_USER is the best way to consistently retrieve an authenticated user name via NTLM.  There are 2-3 other employees starting to design applications and I'd like to restrict them from pulling out other employee's passwords with PHP_AUTH_PW which shows any authenticated user's password in plain text.

 

I read that turning on safe mode disables PHP_AUTH completely which I don't want to do because I need PHP_AUTH_USER.  If I recall, the REMOTE_USER variable wasn't consistent when I started developing my applications.  The directives under safe mode for 'disable_functions' and 'disable_classes' don't appear to be much help.  I've also read that you could disable all or part of php_auth in the source code and recompile.  However, I'm not sure how i would go about that route being in a windows environment.

 

Seems like this would be a pretty common issue with a normal security concern.  Since I can't find anything concrete on the web I'm assuming I'm missing something obvious?

 

Thanks

Link to comment
Share on other sites

off the top of my head...you could set an auto_prepend_file in the php.ini that gets run before every script. this file could unset() the value of PHP_AUTH_PW

 

http://us3.php.net/manual/en/ini.core.php#ini.auto-prepend-file

 

edit: just had another idea. you could give each application a separate php.ini file that makes them run in safe_mode...therefore disabling PHP_AUTH_* for applications

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.