mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix RC violation of session SID constant deprecation attribute
Don't use persistent string/attribute for the global SID constant, which is created at runtime and destroyed at the end of the request. Requires CFLAGS="-DZEND_RC_DEBUG=1" to reproduce. Closes GH-19595
This commit is contained in:
2
NEWS
2
NEWS
@@ -2,6 +2,8 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.5.0beta3
|
||||
|
||||
- Session:
|
||||
. Fix RC violation of session SID constant deprecation attribute. (ilutov)
|
||||
|
||||
28 Aug 2025, PHP 8.5.0beta2
|
||||
|
||||
|
||||
@@ -1529,8 +1529,8 @@ PHPAPI zend_result php_session_reset_id(void)
|
||||
}
|
||||
}
|
||||
if (new_sid_constant != NULL) {
|
||||
zend_string *deprecation_reason = zend_string_init("as GET/POST sessions were deprecated", strlen("as GET/POST sessions were deprecated"), 1);
|
||||
zend_attribute *deprecation_attrib = zend_add_global_constant_attribute(new_sid_constant, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2);
|
||||
zend_string *deprecation_reason = zend_string_init("as GET/POST sessions were deprecated", strlen("as GET/POST sessions were deprecated"), 0);
|
||||
zend_attribute *deprecation_attrib = zend_add_attribute(&new_sid_constant->attributes, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2, 0, 0, 0);
|
||||
ZVAL_STR(&deprecation_attrib->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4));
|
||||
deprecation_attrib->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE);
|
||||
ZVAL_STR(&deprecation_attrib->args[1].value, deprecation_reason);
|
||||
|
||||
Reference in New Issue
Block a user