Skip to content

Fix GH-20435: SensitiveParameter doesn't work for named argument passing to variadic parameter - #20436

Closed
ndossche wants to merge 2 commits into
php:PHP-8.3from
ndossche:fix-20435
Closed

ndossche wants to merge 2 commits into
php:PHP-8.3from
ndossche:fix-20435

Conversation

@ndossche

@ndossche ndossche commented Nov 9, 2025 •

Copy link
Copy Markdown
Member

Side-note: In a follow-up for master I'm going to factor out some of this code.

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side-note: In a follow-up for master I'm going to factor out some of this code.

Yeah, this can / should be object_init_with_constructor() at the very least. 👍

@ndossche

ndossche commented Nov 9, 2025

Copy link
Copy Markdown
Member Author

Yeah, this can / should be object_init_with_constructor() at the very least. 👍

Yeah and I planned on factoring out the attribute lookup for the is_sensitive boolean too.

@ndossche
ndossche marked this pull request as ready for review November 9, 2025 20:02
Comment thread Zend/zend_builtin_functions.c Outdated
zval *arg;

bool is_sensitive = false;
if (call->func->common.fn_flags & ZEND_ACC_VARIADIC) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think that's implied by ZEND_CALL_HAS_EXTRA_NAMED_PARAMS: We can't have extra named params on non-variadic functions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. zend_handle_named_arg even states this in a comment. I'll adjust to an assert.

@ndossche ndossche closed this in 33a2acb Nov 10, 2025
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.

SensitiveParameter doesn't work for named argument passing to variadic parameter

4 participants