summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorJoe Orton <jorton@php.net>2005-03-10 11:09:32 +0000
committerJoe Orton <jorton@php.net>2005-03-10 11:09:32 +0000
commitbef3202d9eb5e873dcabc83596159cb12208cadb (patch)
treef5d4ab086fb848f28c17e0cfabc3c97a1f2ce72f /sapi
parente65d57535f798c1ebf82afff2185cbc6508f7b70 (diff)
downloadphp-git-bef3202d9eb5e873dcabc83596159cb12208cadb.tar.gz
- Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache2handler/sapi_apache2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 5afca21fa7..39c17bc111 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -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 {