mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
fix #46005: User not consistently logged under Apache2
This commit is contained in:
parent
5c5a284f54
commit
4cd34ac3d3
@ -434,6 +434,10 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
|
||||
apr_table_unset(f->r->headers_out, "ETag");
|
||||
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);
|
||||
php_request_startup(TSRMLS_C);
|
||||
}
|
||||
|
||||
|
@ -471,6 +471,9 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
|
||||
apr_table_unset(r->headers_out, "ETag");
|
||||
auth = apr_table_get(r->headers_in, "Authorization");
|
||||
php_handle_auth_data(auth TSRMLS_CC);
|
||||
if (SG(request_info).auth_user == NULL && r->user) {
|
||||
SG(request_info).auth_user = estrdup(r->user);
|
||||
}
|
||||
ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user);
|
||||
return php_request_startup(TSRMLS_C);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user