]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #34905 (Digest authentication does not work with Apache 1).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 18 Oct 2005 23:15:28 +0000 (23:15 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 18 Oct 2005 23:15:28 +0000 (23:15 +0000)
NEWS
sapi/apache/mod_php5.c

diff --git a/NEWS b/NEWS
index b2ef6b70e0cc768d0f01cbe8148806abe395d48d..0c76d4722e03d4bc87866a49708f35cc19ad6956 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Oct 2005, PHP 5.1 Release Candidate 4
+- Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia)
 - Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony)
 - Fixed bug #34899 (Fixed sqlite extension compile failure). ?(Ilia)
 - Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip files). (Derick)
index 7d1078a20d09e58b07fe23a19eb8f619ec61367b..b112d7162a542b35a5546aa978852b9d87404e21 100644 (file)
@@ -501,9 +501,9 @@ static void init_request_info(TSRMLS_D)
        SG(request_info).auth_user = NULL;
        SG(request_info).auth_password = NULL;
 
-       if (authorization
-               && (!PG(safe_mode) || (PG(safe_mode) && !auth_type(r)))) {
-               if (!strcasecmp(getword(r->pool, &authorization, ' '), "Basic")) {
+       if (authorization && (!PG(safe_mode) || (PG(safe_mode) && !auth_type(r)))) {
+               char *p = getword(r->pool, &authorization, ' ');
+               if (!strcasecmp(p, "Basic")) {
                        tmp = uudecode(r->pool, authorization);
                        tmp_user = getword_nulls_nc(r->pool, &tmp, ':');
                        if (tmp_user) {
@@ -514,9 +514,9 @@ static void init_request_info(TSRMLS_D)
                        if (tmp) {
                                SG(request_info).auth_password = estrdup(tmp);
                        }
-               } else if  (!strcasecmp(getword(r->pool, &authorization, ' '), "Digest")) {
-            r->connection->ap_auth_type = "Digest";
-            SG(request_info).auth_digest = estrdup(authorization);
+               } else if (!strcasecmp(p, "Digest")) {
+                       r->connection->ap_auth_type = "Digest";
+                       SG(request_info).auth_digest = estrdup(authorization);
                }
        }
 }