mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
fix #46005: User not consistently logged under Apache2
This commit is contained in:
parent
5c5a284f54
commit
4cd34ac3d3
2 changed files with 7 additions and 0 deletions
|
@ -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");
|
apr_table_unset(f->r->headers_out, "ETag");
|
||||||
auth = apr_table_get(f->r->headers_in, "Authorization");
|
auth = apr_table_get(f->r->headers_in, "Authorization");
|
||||||
php_handle_auth_data(auth TSRMLS_CC);
|
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);
|
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");
|
apr_table_unset(r->headers_out, "ETag");
|
||||||
auth = apr_table_get(r->headers_in, "Authorization");
|
auth = apr_table_get(r->headers_in, "Authorization");
|
||||||
php_handle_auth_data(auth TSRMLS_CC);
|
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);
|
ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user);
|
||||||
return php_request_startup(TSRMLS_C);
|
return php_request_startup(TSRMLS_C);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue