diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-10-18 23:15:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-10-18 23:15:28 +0000 |
commit | 24046edbbb472103ba561d7589f4786d0fe8067e (patch) | |
tree | bcbf5745146deadfeb1d985936236da2b6ca1f36 /sapi/apache/mod_php5.c | |
parent | cbb928b8eb757dc4a433b097f12b3d45733f2b46 (diff) | |
download | php-git-24046edbbb472103ba561d7589f4786d0fe8067e.tar.gz |
MFH: Fixed bug #34905 (Digest authentication does not work with Apache 1).
Diffstat (limited to 'sapi/apache/mod_php5.c')
-rw-r--r-- | sapi/apache/mod_php5.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 7d1078a20d..b112d7162a 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -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); } } } |