note 72973 deleted from features.http-auth by cmb

From: Date: Sun, 06 Oct 2019 08:30:16 +0000
Subject: note 72973 deleted from features.http-auth by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212530@lists.php.net to get a copy of this message
Note Submitter: mg at evolution515 dot net ---- Example for digest doesn't work (at least for me): use this fix: -------------- preg_match_all('@(\w+)=(?:(([\'"])(.+?)\3|([A-Za-z0-9/]+)))@', $txt, $matches, PREG_SET_ORDER); foreach ($matches as $m) { $data[$m[1]] = $m[4] ? $m[4] : $m[5]; unset($needed_parts[$m[1]]); } It's also better to but to put the Auth-Digest-Header in a function and call it on unsuccessful authentification again. Otherwise users only have the chance to submit their username/password just one time.

« previous php.notes (#212530) next »