summaryrefslogtreecommitdiff
path: root/sapi/apache2filter
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache2filter')
-rw-r--r--sapi/apache2filter/sapi_apache2.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index c9719b5ed7..2a7d5b7dd0 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -426,17 +426,16 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
apr_table_unset(f->r->headers_out, "Last-Modified");
apr_table_unset(f->r->headers_out, "Expires");
apr_table_unset(f->r->headers_out, "ETag");
- 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;
+
+ 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);
}