summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-04-16 23:31:23 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-04-16 23:31:23 +0000
commitf7d72d178d9fc7a5774030924238cb881ac31948 (patch)
tree3f57b8d54a8ea7afa66d45635b7fe9c9f90ebb25
parent0c5548e636ba3e9831f482ce236d05844e3a0a85 (diff)
downloadphp-git-f7d72d178d9fc7a5774030924238cb881ac31948.tar.gz
Fixed bug #23232 (safe_mode does not honor PHP_AUTH_* in apache2)
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 86e3b68737..5188569640 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -396,7 +396,7 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
apr_table_unset(f->r->headers_out, "Expires");
apr_table_unset(f->r->headers_out, "ETag");
apr_table_unset(f->r->headers_in, "Connection");
- if (!PG(safe_mode)) {
+ if (!PG(safe_mode) || (PG(safe_mode) && !ap_auth_type(r))) {
auth = apr_table_get(f->r->headers_in, "Authorization");
php_handle_auth_data(auth TSRMLS_CC);
} else {
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index f6697ba6ac..08f5a84d9d 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -424,7 +424,7 @@ static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
apr_table_unset(r->headers_out, "Expires");
apr_table_unset(r->headers_out, "ETag");
apr_table_unset(r->headers_in, "Connection");
- if (!PG(safe_mode)) {
+ if (!PG(safe_mode) || (PG(safe_mode) && !ap_auth_type(r))) {
auth = apr_table_get(r->headers_in, "Authorization");
php_handle_auth_data(auth TSRMLS_CC);
ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user);