]> granicus.if.org Git - php/commitdiff
- Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used.
authorJoe Orton <jorton@php.net>
Thu, 10 Mar 2005 11:09:32 +0000 (11:09 +0000)
committerJoe Orton <jorton@php.net>
Thu, 10 Mar 2005 11:09:32 +0000 (11:09 +0000)
sapi/apache2handler/sapi_apache2.c

index 5afca21fa72817a3604b9eb04a678633a6baed6e..39c17bc111612e7d590ca8d7b387778fd9dbbc67 100644 (file)
@@ -472,6 +472,16 @@ static int php_handler(request_rec *r)
                }
        }
 
+       /* 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 {