jorton Thu Mar 10 06:39:04 2005 EDT
Modified files: (Branch: PHP_4_3)
/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.1.2.38&r2=1.1.2.39&ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.38
php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.39
--- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.38 Mon Jan 17 07:36:44 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c Thu Mar 10 06:39:04 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.1.2.38 2005/01/17 12:36:44 jorton Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.39 2005/03/10 11:39:04 jorton Exp $ */
#include <fcntl.h>
@@ -471,6 +471,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