note 73642 added to features.http-auth
| From: | (at) | Date: | Mon, 05 Mar 2007 17:37:02 +0000 |
| Subject: | note 73642 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124113@lists.php.net to get a copy of this message | ||
Be careful using http digest authentication (see above, example 34.2) if you have to use the
'setlocale' function *before* validating response with the 'http_digest_parse'
function, because there's a conflict with \w in the pattern of 'preg_match_all'
function :
In fact, as \w is supposed to be any letter or digit or the underscore character, you must not
forgot that this may vary depending on your locale configuration (eg. it accepts accented letters in
french)...
Due to this different pattern interpretation by the 'preg_match_all' function, the
'http_digest_parse' function will always return a false result if you have modified your
locale (I mean if your locale accepts some extended characters, see http://fr.php.net/manual/en/reference.pcre.pattern.syntax.php
for further information).
IMHO, I suggest you not to use setlocale before having your authentication completed...
PS : Here's a non-compatible setlocale declaration...
setlocale ( LC_ALL, 'fr_FR', 'fr', 'FR', 'french',
'fra', 'france', 'French', 'fr_FR.ISO8859-1' ) ;
----
Server IP: 69.147.83.197
Probable Submitter: 193.55.175.20
----
Manual Page -- http://www.php.net/manual/en/features.http-auth.php
Edit -- https://master.php.net/note/edit/73642
Del: integrated -- https://master.php.net/note/delete/73642/integrated
Del: useless -- https://master.php.net/note/delete/73642/useless
Del: bad code -- https://master.php.net/note/delete/73642/bad+code
Del: spam -- https://master.php.net/note/delete/73642/spam
Del: non-english -- https://master.php.net/note/delete/73642/non-english
Del: in docs -- https://master.php.net/note/delete/73642/in+docs
Del: other reasons-- https://master.php.net/note/delete/73642
Reject -- https://master.php.net/note/reject/73642
Search -- https://master.php.net/manage/user-notes.php