cvs: phpdoc /en/features http-auth.xml
| From: | Richard Quadling | Date: | Wed, 08 Jul 2009 08:20:50 +0000 |
| Subject: | cvs: phpdoc /en/features http-auth.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4364@lists.php.net to get a copy of this message | ||
rquadling Wed Jul 8 08:20:50 2009 UTC
Modified files:
/phpdoc/en/features http-auth.xml
Log:
Fix regex for bug#48836
http://cvs.php.net/viewvc.cgi/phpdoc/en/features/http-auth.xml?r1=1.53&r2=1.54&diff_format=u
Index: phpdoc/en/features/http-auth.xml
diff -u phpdoc/en/features/http-auth.xml:1.53 phpdoc/en/features/http-auth.xml:1.54
--- phpdoc/en/features/http-auth.xml:1.53 Sat May 2 22:27:55 2009
+++ phpdoc/en/features/http-auth.xml Wed Jul 8 08:20:50 2009
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.53 $ -->
+<!-- $Revision: 1.54 $ -->
<chapter xml:id="features.http-auth" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>HTTP authentication with PHP</title>
@@ -105,8 +105,9 @@
// protect against missing data
$needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1,
'qop'=>1, 'username'=>1, 'uri'=>1,
'response'=>1);
$data = array();
+ $keys = implode('|', array_keys($needed_parts));
- preg_match_all('@(\w+)=(?:([\'"])([^\2]+)\2|([^\s,]+))@', $txt, $matches,
PREG_SET_ORDER);
+ preg_match_all('@(' . $keys .
')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER);
foreach ($matches as $m) {
$data[$m[1]] = $m[3] ? $m[3] : $m[4];