1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/session: remove session_adapt_url() function

This is unused and only exist for the deprecated (and dangerous) GET/POST session ID feature
This commit is contained in:
Gina Peter Banyard
2026-02-06 17:29:20 +00:00
parent 1041a47ed3
commit f6088f574c
3 changed files with 1 additions and 13 deletions

View File

@@ -99,6 +99,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
- ext/session:
. php_session_flush() now returns a bool rather than a zend_result.
. Removed session_adapt_url().
- ext/standard:
. _php_error_log() now has a formal return type of zend_result.

View File

@@ -248,8 +248,6 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS);
PHPAPI zend_result php_session_validate_sid(PS_VALIDATE_SID_ARGS);
PHPAPI zend_result php_session_update_timestamp(PS_UPDATE_TIMESTAMP_ARGS);
PHPAPI void session_adapt_url(const char *url, size_t url_len, char **new_url, size_t *new_len);
PHPAPI zend_result php_session_destroy(void);
PHPAPI void php_add_session_var(zend_string *name);
PHPAPI zval *php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash);

View File

@@ -1756,17 +1756,6 @@ static bool php_session_reset(void)
return false;
}
/* This API is not used by any PHP modules including session currently.
session_adapt_url() may be used to set Session ID to target url without
starting "URL-Rewriter" output handler. */
PHPAPI void session_adapt_url(const char *url, size_t url_len, char **new_url, size_t *new_len)
{
if (APPLY_TRANS_SID && (PS(session_status) == php_session_active)) {
*new_url = php_url_scanner_adapt_single_url(url, url_len, ZSTR_VAL(PS(session_name)), ZSTR_VAL(PS(id)), new_len, true);
}
}
/* ********************************
* Userspace exported functions *
******************************** */