Skip to content

Commit d5de6ed

Browse files
committed
Replaced invalid OnUpdateString
1 parent 6660a1c commit d5de6ed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ext/session/session.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,11 @@ static PHP_INI_MH(OnUpdateRefererCheck)
947947
if (ZSTR_LEN(new_value) != 0) {
948948
php_error_docref("session.configuration", E_DEPRECATED, "Usage of session.referer_check INI setting is deprecated");
949949
}
950-
return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
950+
951+
zend_string **p = (zend_string **) ZEND_INI_GET_ADDR();
952+
*p = new_value ? new_value : NULL;
953+
return SUCCESS;
954+
951955
}
952956

953957
/* {{{ PHP_INI */
@@ -1720,7 +1724,9 @@ PHPAPI zend_result php_session_start(void) /* {{{ */
17201724
}
17211725
/* Check whether the current request was referred to by
17221726
* an external site which invalidates the previously found id. */
1723-
if (PS(id) && PS(extern_referer_chk) && ZSTR_LEN(PS(extern_referer_chk)) != 0 &&
1727+
if (PS(id) &&
1728+
PS(extern_referer_chk) &&
1729+
ZSTR_LEN(PS(extern_referer_chk)) != 0 &&
17241730
!Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER]) &&
17251731
(data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_REFERER", sizeof("HTTP_REFERER") - 1)) &&
17261732
Z_TYPE_P(data) == IS_STRING &&

0 commit comments

Comments
 (0)