Skip to content

SAPI: clear current_user and content_type_dup after releasing them - #22974

Open
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/sapi-clear-released-request-info
Open

SAPI: clear current_user and content_type_dup after releasing them#22974
iliaal wants to merge 1 commit into
php:masterfrom
iliaal:fix/sapi-clear-released-request-info

Conversation

@iliaal

@iliaal iliaal commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

sapi_deactivate_module() releases current_user and content_type_dup but leaves both pointers set, unlike the auth_user, auth_password and auth_digest fields right above them. Nothing reads either between the release and the next sapi_activate(), so this is consistency rather than a live bug.

@iliaal
iliaal requested a review from bukka as a code owner July 31, 2026 14:43
iliaal added a commit to iliaal/php-src that referenced this pull request Jul 31, 2026
sapi_deactivate_module() frees both without resetting the pointer, unlike
the auth_user, auth_password and auth_digest fields next to them. Nothing
reads them between the free and the next sapi_activate() today, so this is
consistency rather than a live bug.

Closes phpGH-22974
@iliaal
iliaal force-pushed the fix/sapi-clear-released-request-info branch from f8ff8f2 to 063c6b7 Compare July 31, 2026 14:44
@devnexen

devnexen commented Aug 1, 2026

Copy link
Copy Markdown
Member

Hmmm the change is not wrong, but to qualify it as bug fix worthy of release branches is really stretching it.

@iliaal

iliaal commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

I figured it would be ok as it purely defensive change with no risk of regression

@devnexen

devnexen commented Aug 1, 2026

Copy link
Copy Markdown
Member

in my side not a clear big no, but would need a little bit more convincing ; because it s not fixing an actual bug.

@bukka

bukka commented Aug 2, 2026

Copy link
Copy Markdown
Member

This should go to master only

@iliaal
iliaal changed the base branch from PHP-8.4 to master August 3, 2026 23:37
@iliaal
iliaal force-pushed the fix/sapi-clear-released-request-info branch from 063c6b7 to 95ddd01 Compare August 3, 2026 23:37
iliaal added a commit to iliaal/php-src that referenced this pull request Aug 3, 2026
sapi_deactivate_module() releases both without resetting the pointer,
unlike the auth_user, auth_password and auth_digest fields next to them.
Nothing reads them between the release and the next sapi_activate()
today, so this is consistency rather than a live bug.

Closes phpGH-22974
@iliaal

iliaal commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Retargeted to master.

sapi_deactivate_module() releases both without resetting the pointer,
unlike the auth_user, auth_password and auth_digest fields next to them.
Nothing reads them between the release and the next sapi_activate()
today, so this is consistency rather than a live bug.

Closes phpGH-22974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants