mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Fixed bug #25084 (Make refer check not dependant on register_globals)
This commit is contained in:
parent
5eb23bf01e
commit
b9b75991e3
@ -1113,8 +1113,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))) &&
|
||||
@ -1131,7 +1131,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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user