]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
authorDavid Soria Parra <dsp@php.net>
Fri, 9 Jan 2009 22:14:20 +0000 (22:14 +0000)
committerDavid Soria Parra <dsp@php.net>
Fri, 9 Jan 2009 22:14:20 +0000 (22:14 +0000)
NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index ef17e76256fcab315b7e50bc68d58f44fdbdbfdd..5cee3fbea773a849da559745969de6182616dc8f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ PHP                                                                        NEWS
   APA Laboratory (Fixes CVE-2008-5498). (Scott)
 - Fixed a segfault when malformed string is passed to json_decode(). (Scott)
 
+- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
+  (Sriram Natarajan)
 - Fixed bug #47037 (No error when using fopen with empty string). 
   (Cristian Rodriguez R., Felipe)
 - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT 
index 4dbb3ccdf95872e7561fbcc1dfea0932ceacb7c2..d0a26891865618f056bcb9dbc93462b5d0b8ca40 100644 (file)
@@ -960,7 +960,9 @@ static void init_request_info(TSRMLS_D)
                                TRANSLATE_SLASHES(env_document_root);
                        }
 
-                       if (env_path_translated != NULL && env_redirect_url != NULL) {
+                       if (env_path_translated != NULL && env_redirect_url != NULL &&
+                           orig_script_filename != NULL && script_path_translated != NULL &&
+                           strcmp(orig_script_filename, script_path_translated) != 0) {
                                /* 
                                   pretty much apache specific.  If we have a redirect_url
                                   then our script_filename and script_name point to the