From: Joe Orton Date: Thu, 10 Mar 2005 11:23:57 +0000 (+0000) Subject: MFH: - Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used. X-Git-Tag: php-5.0.4RC1~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bcc8aad1784617accdc0667c0d4afcb0064f7180;p=php MFH: - Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used. --- diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index c689c30735..874a5380dc 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -466,6 +466,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 {