summaryrefslogtreecommitdiff
path: root/sapi/apache2filter/sapi_apache2.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2008-12-17 11:34:50 +0000
committerStanislav Malyshev <stas@php.net>2008-12-17 11:34:50 +0000
commit40cd1d49b3ab8daa0d839a0aae2664f22b14e77c (patch)
tree3cae8fab7a963998c0502d389d434db1f2d950eb /sapi/apache2filter/sapi_apache2.c
parent5856a68c8d1d4caa4bbd78333ea658c98771f3f3 (diff)
downloadphp-git-40cd1d49b3ab8daa0d839a0aae2664f22b14e77c.tar.gz
MFH fix #46005
Diffstat (limited to 'sapi/apache2filter/sapi_apache2.c')
-rw-r--r--sapi/apache2filter/sapi_apache2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index ecd1eb624d..4e3efffdc4 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -427,6 +427,10 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
if (!PG(safe_mode) || (PG(safe_mode) && !ap_auth_type(f->r))) {
auth = apr_table_get(f->r->headers_in, "Authorization");
php_handle_auth_data(auth TSRMLS_CC);
+ if (SG(request_info).auth_user == NULL && f->r->user) {
+ SG(request_info).auth_user = estrdup(f->r->user);
+ }
+ ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user);
} else {
SG(request_info).auth_user = NULL;
SG(request_info).auth_password = NULL;