note 1161 rejected and deleted from HTTP authentication with PHP by andy

From: Date: Sun, 22 Jul 2001 19:15:28 +0000
Subject: note 1161 rejected and deleted from HTTP authentication with PHP by andy
Groups: php.notes 
Request: Send a blank email to php-notes+get-15671@lists.php.net to get a copy of this message
In order to make this authentication secure, you'll want to use encryption. PHP includes direct support for the crypt() function. Depending on your system configuration ( encryption algorithm support ) you can set a specific salt that will automatically select the encryption method if supported. Just a suggestion: use a specific salt, encyrpt the password with it, and either put it in a file, a database, or just throw it in the same .php3 file (note: not as secure) Use the same salt to encrypt the $PHP_AUTH_PW as it's being input by the user and match it against the previously stored entry, or entries for that matter. NOTE: check the manual erratta on the php crypt function as well as man crypt It's simple to add encryption to the authentication.

« previous php.notes (#15671) next »