@@ -846,6 +846,40 @@ static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */
846846 return SUCCESS ;
847847} /* }}} */
848848
849+ static PHP_INI_MH (OnUpdateUseOnlyCookies )
850+ {
851+ SESSION_CHECK_ACTIVE_STATE ;
852+ SESSION_CHECK_OUTPUT_STATE ;
853+ bool * p = (bool * ) ZEND_INI_GET_ADDR ();
854+ * p = zend_ini_parse_bool (new_value );
855+ if (!* p ) {
856+ php_error_docref ("session.configuration" , E_DEPRECATED , "Disabling session.use_only_cookies INI setting is deprecated" );
857+ }
858+ return SUCCESS ;
859+ }
860+
861+ static PHP_INI_MH (OnUpdateUseTransSid )
862+ {
863+ SESSION_CHECK_ACTIVE_STATE ;
864+ SESSION_CHECK_OUTPUT_STATE ;
865+ bool * p = (bool * ) ZEND_INI_GET_ADDR ();
866+ * p = zend_ini_parse_bool (new_value );
867+ if (* p ) {
868+ php_error_docref ("session.configuration" , E_DEPRECATED , "Enabling session.use_trans_sid INI setting is deprecated" );
869+ }
870+ return SUCCESS ;
871+ }
872+
873+ static PHP_INI_MH (OnUpdateRefererCheck )
874+ {
875+ SESSION_CHECK_ACTIVE_STATE ;
876+ SESSION_CHECK_OUTPUT_STATE ;
877+ if (ZSTR_LEN (new_value ) != 0 ) {
878+ php_error_docref ("session.configuration" , E_DEPRECATED , "Usage of session.referer_check INI setting is deprecated" );
879+ }
880+ return OnUpdateString (entry , new_value , mh_arg1 , mh_arg2 , mh_arg3 , stage );
881+ }
882+
849883/* {{{ PHP_INI */
850884PHP_INI_BEGIN ()
851885 STD_PHP_INI_ENTRY ("session.save_path" , "" , PHP_INI_ALL , OnUpdateSaveDir , save_path , php_ps_globals , ps_globals )
@@ -863,12 +897,12 @@ PHP_INI_BEGIN()
863897 STD_PHP_INI_BOOLEAN ("session.cookie_httponly" , "0" , PHP_INI_ALL , OnUpdateSessionBool , cookie_httponly , php_ps_globals , ps_globals )
864898 STD_PHP_INI_ENTRY ("session.cookie_samesite" , "" , PHP_INI_ALL , OnUpdateSessionString , cookie_samesite , php_ps_globals , ps_globals )
865899 STD_PHP_INI_BOOLEAN ("session.use_cookies" , "1" , PHP_INI_ALL , OnUpdateSessionBool , use_cookies , php_ps_globals , ps_globals )
866- STD_PHP_INI_BOOLEAN ("session.use_only_cookies" , "1" , PHP_INI_ALL , OnUpdateSessionBool , use_only_cookies , php_ps_globals , ps_globals )
900+ STD_PHP_INI_BOOLEAN ("session.use_only_cookies" , "1" , PHP_INI_ALL , OnUpdateUseOnlyCookies , use_only_cookies , php_ps_globals , ps_globals )
867901 STD_PHP_INI_BOOLEAN ("session.use_strict_mode" , "0" , PHP_INI_ALL , OnUpdateSessionBool , use_strict_mode , php_ps_globals , ps_globals )
868- STD_PHP_INI_ENTRY ("session.referer_check" , "" , PHP_INI_ALL , OnUpdateSessionString , extern_referer_chk , php_ps_globals , ps_globals )
902+ STD_PHP_INI_ENTRY ("session.referer_check" , "" , PHP_INI_ALL , OnUpdateRefererCheck , extern_referer_chk , php_ps_globals , ps_globals )
869903 STD_PHP_INI_ENTRY ("session.cache_limiter" , "nocache" , PHP_INI_ALL , OnUpdateSessionString , cache_limiter , php_ps_globals , ps_globals )
870904 STD_PHP_INI_ENTRY ("session.cache_expire" , "180" , PHP_INI_ALL , OnUpdateSessionLong , cache_expire , php_ps_globals , ps_globals )
871- STD_PHP_INI_BOOLEAN ("session.use_trans_sid" , "0" , PHP_INI_ALL , OnUpdateSessionBool , use_trans_sid , php_ps_globals , ps_globals )
905+ STD_PHP_INI_BOOLEAN ("session.use_trans_sid" , "0" , PHP_INI_ALL , OnUpdateUseTransSid , use_trans_sid , php_ps_globals , ps_globals )
872906 PHP_INI_ENTRY ("session.sid_length" , "32" , PHP_INI_ALL , OnUpdateSidLength )
873907 PHP_INI_ENTRY ("session.sid_bits_per_character" , "4" , PHP_INI_ALL , OnUpdateSidBits )
874908 STD_PHP_INI_BOOLEAN ("session.lazy_write" , "1" , PHP_INI_ALL , OnUpdateSessionBool , lazy_write , php_ps_globals , ps_globals )
@@ -1516,15 +1550,15 @@ PHPAPI zend_result php_session_reset_id(void) /* {{{ */
15161550 zval_ptr_dtor_str (sid );
15171551 ZVAL_STR (sid , smart_str_extract (& var ));
15181552 } else {
1519- REGISTER_STRINGL_CONSTANT ("SID" , ZSTR_VAL (var .s ), ZSTR_LEN (var .s ), 0 );
1553+ REGISTER_STRINGL_CONSTANT ("SID" , ZSTR_VAL (var .s ), ZSTR_LEN (var .s ), CONST_DEPRECATED );
15201554 smart_str_free (& var );
15211555 }
15221556 } else {
15231557 if (sid ) {
15241558 zval_ptr_dtor_str (sid );
15251559 ZVAL_EMPTY_STRING (sid );
15261560 } else {
1527- REGISTER_STRINGL_CONSTANT ("SID" , "" , 0 , 0 );
1561+ REGISTER_STRINGL_CONSTANT ("SID" , "" , 0 , CONST_DEPRECATED );
15281562 }
15291563 }
15301564
0 commit comments