jorton Thu Mar 10 06:23:58 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/sapi/apache2handler sapi_apache2.c
Log:
MFH: - Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used.
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.40.2.6&r2=1.40.2.7&ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.6
php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.7
--- php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.6 Mon Jan 17 07:35:28 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c Thu Mar 10 06:23:57 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.40.2.6 2005/01/17 12:35:28 jorton Exp $ */
+/* $Id: sapi_apache2.c,v 1.40.2.7 2005/03/10 11:23:57 jorton Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -466,6 +466,16 @@
}
}
+ /* Give a 404 if PATH_INFO is used but is explicitly disabled in
+ * the configuration; default behaviour is to accept. */
+ if (r->used_path_info == AP_REQ_REJECT_PATH_INFO
+ && r->path_info && r->path_info[0]) {
+ zend_try {
+ zend_ini_deactivate(TSRMLS_C);
+ } zend_end_try();
+ return HTTP_NOT_FOUND;
+ }
+
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
zend_try {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php