iliaa Tue Mar 7 14:43:16 2006 UTC
Modified files:
/php-src/sapi/apache mod_php5.c php_apache.c
/php-src/sapi/apache2filter sapi_apache2.c
/php-src/sapi/apache2handler sapi_apache2.c
/php-src/sapi/apache_hooks php_apache.c
/php-src/sapi/nsapi nsapi.c
Log:
Nuke safe_mode from sapi/*
# only main/ remains at this point, this is the next step
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache/mod_php5.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.29 php-src/sapi/apache/mod_php5.c:1.30
--- php-src/sapi/apache/mod_php5.c:1.29 Tue Mar 7 00:20:54 2006
+++ php-src/sapi/apache/mod_php5.c Tue Mar 7 14:43:16 2006
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.29 2006/03/07 00:20:54 pajoye Exp $ */
+/* $Id: mod_php5.c,v 1.30 2006/03/07 14:43:16 iliaa Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
@@ -514,7 +514,7 @@
SG(request_info).auth_password = NULL;
SG(request_info).auth_digest = NULL;
- if (authorization && (!PG(safe_mode) || (PG(safe_mode) &&
!auth_type(r)))) {
+ if (authorization) {
char *p = getword(r->pool, &authorization, ' ');
if (!strcasecmp(p, "Basic")) {
tmp = uudecode(r->pool, authorization);
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache/php_apache.c?r1=1.92&r2=1.93&diff_format=u
Index: php-src/sapi/apache/php_apache.c
diff -u php-src/sapi/apache/php_apache.c:1.92
php-src/sapi/apache/php_apache.c:1.93
--- php-src/sapi/apache/php_apache.c:1.92 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache/php_apache.c Tue Mar 7 14:43:16 2006
@@ -17,7 +17,7 @@
| David Sklar <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.92 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: php_apache.c,v 1.93 2006/03/07 14:43:16 iliaa Exp $ */
#include "php_apache_http.h"
@@ -275,7 +275,7 @@
env_arr = table_elts(r->headers_in);
env = (table_entry *)env_arr->elts;
for (i = 0; i < env_arr->nelts; ++i) {
- if (env[i].key && (!PG(safe_mode) || (PG(safe_mode) &&
strncasecmp(env[i].key, "authorization", 13)))) {
+ if (env[i].key) {
php_info_print_table_row(2, env[i].key,
env[i].val);
}
}
@@ -353,9 +353,7 @@
env_arr = table_elts(((request_rec *) SG(server_context))->headers_in);
tenv = (table_entry *)env_arr->elts;
for (i = 0; i < env_arr->nelts; ++i) {
- if (!tenv[i].key ||
- (PG(safe_mode) &&
- !strncasecmp(tenv[i].key, "authorization", 13))) {
+ if (!tenv[i].key) {
continue;
}
if (add_assoc_string(return_value, tenv[i].key,
(tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
@@ -541,11 +539,6 @@
Reset the Apache write timer */
PHP_FUNCTION(apache_reset_timeout)
{
- if (PG(safe_mode)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot reset the
Apache timeout in safe mode");
- RETURN_FALSE;
- }
-
ap_reset_timeout((request_rec *)SG(server_context));
RETURN_TRUE;
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.137&r2=1.138&diff_format=u
Index: php-src/sapi/apache2filter/sapi_apache2.c
diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.137
php-src/sapi/apache2filter/sapi_apache2.c:1.138
--- php-src/sapi/apache2filter/sapi_apache2.c:1.137 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache2filter/sapi_apache2.c Tue Mar 7 14:43:16 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.137 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.138 2006/03/07 14:43:16 iliaa Exp $ */
#include <fcntl.h>
@@ -406,13 +406,8 @@
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);
- } 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);
php_request_startup(TSRMLS_C);
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.66&r2=1.67&diff_format=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.66
php-src/sapi/apache2handler/sapi_apache2.c:1.67
--- php-src/sapi/apache2handler/sapi_apache2.c:1.66 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache2handler/sapi_apache2.c Tue Mar 7 14:43:16 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.66 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.67 2006/03/07 14:43:16 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -427,14 +427,9 @@
apr_table_unset(r->headers_out, "Last-Modified");
apr_table_unset(r->headers_out, "Expires");
apr_table_unset(r->headers_out, "ETag");
- 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);
- } else {
- SG(request_info).auth_user = NULL;
- SG(request_info).auth_password = NULL;
- }
+ 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);
return php_request_startup(TSRMLS_C);
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.23&r2=1.24&diff_format=u
Index: php-src/sapi/apache_hooks/php_apache.c
diff -u php-src/sapi/apache_hooks/php_apache.c:1.23
php-src/sapi/apache_hooks/php_apache.c:1.24
--- php-src/sapi/apache_hooks/php_apache.c:1.23 Wed Mar 1 16:27:47 2006
+++ php-src/sapi/apache_hooks/php_apache.c Tue Mar 7 14:43:16 2006
@@ -17,7 +17,7 @@
| David Sklar <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.23 2006/03/01 16:27:47 dmitry Exp $ */
+/* $Id: php_apache.c,v 1.24 2006/03/07 14:43:16 iliaa Exp $ */
#include "php_apache_http.h"
@@ -44,7 +44,7 @@
static int le_apachereq;
static zend_class_entry *apacherequest_class_entry;
-static void apache_table_to_zval(table *, int safe_mode, zval *return_value);
+static void apache_table_to_zval(table *, zval *return_value);
PHP_FUNCTION(virtual);
PHP_FUNCTION(apache_request_headers);
@@ -1682,7 +1682,7 @@
env_arr = table_elts(r->headers_in);
env = (table_entry *)env_arr->elts;
for (i = 0; i < env_arr->nelts; ++i) {
- if (env[i].key && (!PG(safe_mode) || (PG(safe_mode) &&
strncasecmp(env[i].key, "authorization", 13)))) {
+ if (env[i].key) {
php_info_print_table_row(2, env[i].key,
env[i].val);
}
}
@@ -1746,9 +1746,9 @@
/* }}} */
-/* {{{ apache_table_to_zval(table *, int safe_mode, zval *return_value)
+/* {{{ apache_table_to_zval(table *, zval *return_value)
Fetch all HTTP request headers */
-static void apache_table_to_zval(table *t, int safe_mode, zval *return_value)
+static void apache_table_to_zval(table *t, zval *return_value)
{
array_header *env_arr;
table_entry *tenv;
@@ -1758,8 +1758,7 @@
env_arr = table_elts(t);
tenv = (table_entry *)env_arr->elts;
for (i = 0; i < env_arr->nelts; ++i) {
- if (!tenv[i].key ||
- (safe_mode && !strncasecmp(tenv[i].key,
"authorization", 13))) {
+ if (tenv[i].key) {
continue;
}
if (add_assoc_string(return_value, tenv[i].key,
(tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
@@ -1780,7 +1779,7 @@
Fetch all HTTP request headers */
PHP_FUNCTION(apache_request_headers)
{
- apache_table_to_zval(((request_rec *)SG(server_context))->headers_in,
PG(safe_mode), return_value);
+ apache_table_to_zval(((request_rec *)SG(server_context))->headers_in,
return_value);
}
/* }}} */
http://cvs.php.net/viewcvs.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.72&r2=1.73&diff_format=u
Index: php-src/sapi/nsapi/nsapi.c
diff -u php-src/sapi/nsapi/nsapi.c:1.72 php-src/sapi/nsapi/nsapi.c:1.73
--- php-src/sapi/nsapi/nsapi.c:1.72 Sun Jan 1 13:09:58 2006
+++ php-src/sapi/nsapi/nsapi.c Tue Mar 7 14:43:16 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nsapi.c,v 1.72 2006/01/01 13:09:58 sniper Exp $ */
+/* $Id: nsapi.c,v 1.73 2006/03/07 14:43:16 iliaa Exp $ */
/*
* PHP includes
@@ -310,7 +310,7 @@
PHP_MINFO_FUNCTION(nsapi)
{
php_info_print_table_start();
- php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.72
$");
+ php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.73
$");
php_info_print_table_row(2, "Server Software", system_version());
php_info_print_table_row(2, "Sub-requests with nsapi_virtual()",
(nsapi_servact_service)?((zend_ini_long("zlib.output_compression",
sizeof("zlib.output_compression"), 0))?"not supported with
zlib.output_compression":"enabled"):"not supported on this platform" );
@@ -410,7 +410,7 @@
for (i=0; i < rc->rq->headers->hsize; i++) {
entry=rc->rq->headers->ht[i];
while (entry) {
- if (!PG(safe_mode) || strncasecmp(entry->param->name,
"authorization", 13)) {
+ if (strncasecmp(entry->param->name, "authorization",
13)) {
add_assoc_string(return_value,
entry->param->name, entry->param->value, 1);
}
entry=entry->next;
@@ -602,7 +602,7 @@
for (i=0; i < rc->rq->headers->hsize; i++) {
entry=rc->rq->headers->ht[i];
while (entry) {
- if (!PG(safe_mode) || strncasecmp(entry->param->name,
"authorization", 13)) {
+ if (strncasecmp(entry->param->name, "authorization",
13)) {
if (strcasecmp(entry->param->name,
"content-length")==0 || strcasecmp(entry->param->name, "content-type")==0) {
strlcpy(buf, entry->param->name,
NS_BUF_SIZE);
pos = 0;
@@ -941,7 +941,7 @@
nsapi_php_ini_entries(NSLS_C TSRMLS_CC);
- if (!PG(safe_mode))
php_handle_auth_data(pblock_findval("authorization", rq->headers) TSRMLS_CC);
+ php_handle_auth_data(pblock_findval("authorization", rq->headers)
TSRMLS_CC);
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = SG(request_info).path_translated;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php