#28670 [Csd->Opn]: PCRE + Safemode + WWW-authenticate header error
| From: | jg at b-one dot net | Date: | Tue, 08 Jun 2004 08:01:04 +0000 |
| Subject: | #28670 [Csd->Opn]: PCRE + Safemode + WWW-authenticate header error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60555@lists.php.net to get a copy of this message | ||
ID: 28670
User updated by: jg at b-one dot net
Reported By: jg at b-one dot net
-Status: Closed
+Status: Open
Bug Type: Unknown/Other Function
Operating System: Linux (Debian)
PHP Version: 4CVS-2004-06-07 (stable)
New Comment:
Only half of the bug report is fixed.
When php is build without pcre-regexp the realm is wrong.
Only uid is in realm, not realm name from header(...)
se "actual output".
Sorry for not beeing more specific about that.
Previous Comments:
------------------------------------------------------------------------
[2004-06-07 15:52:02] iliaa@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2004-06-07 14:19:11] jg at b-one dot net
Description:
------------
pcre-regexp + safemode affects output of
header("WWW-Authenticate: Basic realm=\"ABC\");
and causes internal server error with mod_fcgi.
The problem is in 4.3.7 and latest stable cvs 2004-06-07
In safemode without pcre-regexp php return
WWW-Authenticate: Basic realm="1000"
With pcre-regexp php returns
WWW-Authenticate: Basic realm="ABC-1000"
I suspect the extra space between key and value to cause mod_fcgi to
"internal server error".
Reproduce code:
---------------
<?
header("HTTP/1.1 401 Unauthorized");
header("WWW-Authenticate: Basic realm=\"ABC\"");
echo "I need your credentials";
?>
Expected result:
----------------
Status: 401
Content-type: text/html
X-Powered-By: PHP/4.3.7
WWW-Authenticate: Basic realm="ABC-1000"
Actual result:
--------------
without pcre-regexp:
Status: 401
Content-type: text/html
X-Powered-By: PHP/4.3.7
WWW-Authenticate: Basic realm="1000"
with pcre-regexp:
Status: 401
Content-type: text/html
X-Powered-By: PHP/4.3.7
WWW-Authenticate: Basic realm="ABC-1000"
(notice extra space)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28670&edit=1