]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #25084 (Make refer check not dependant on register_globals)
authorIlia Alshanetsky <iliaa@php.net>
Thu, 14 Aug 2003 01:32:02 +0000 (01:32 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 14 Aug 2003 01:32:02 +0000 (01:32 +0000)
NEWS
ext/session/session.c

diff --git a/NEWS b/NEWS
index e22d88addc3927705cc789de41708fa86ee43a4b..7fb9112983f98c91b98ea7542f76026ca81415bf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Aug 2003, Version 4.3.3RC4
+- Fixed bug #25084 (Make refer check not dependant on register_globals). (Ilia)
 - Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)
 - Fixed bug #25037 (Possible infinite loop inside SendText()). (Ilia)
 - Fixed bug #25007 (rand() & mt_rand() seed RNG every call). (Jani)
index 429c127e319ebc5483fef8cf79352d9d2c063ad9..bd301104ea3c02f773e41b4e203f478d775dee3e 100644 (file)
@@ -1014,8 +1014,8 @@ PHPAPI void php_session_start(TSRMLS_D)
           '<session-name>=<session-id>' to allow URLs of the form
           http://yoursite/<session-name>=<session-id>/script.php */
 
-       if (!PS(use_only_cookies) && !PS(id) &&
-                       zend_hash_find(&EG(symbol_table), "REQUEST_URI",
+       if (!PS(use_only_cookies) && !PS(id) && PG(http_globals)[TRACK_VARS_SERVER] &&
+                       zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "REQUEST_URI",
                                sizeof("REQUEST_URI"), (void **) &data) == SUCCESS &&
                        Z_TYPE_PP(data) == IS_STRING &&
                        (p = strstr(Z_STRVAL_PP(data), PS(session_name))) &&
@@ -1032,7 +1032,8 @@ PHPAPI void php_session_start(TSRMLS_D)
        
        if (PS(id) &&
                        PS(extern_referer_chk)[0] != '\0' &&
-                       zend_hash_find(&EG(symbol_table), "HTTP_REFERER",
+                       PG(http_globals)[TRACK_VARS_SERVER] &&
+                       zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_REFERER",
                                sizeof("HTTP_REFERER"), (void **) &data) == SUCCESS &&
                        Z_TYPE_PP(data) == IS_STRING &&
                        Z_STRLEN_PP(data) != 0 &&