Skip to content

ext/openssl: Use zend_string_equals_literal() for argon2 algorithm validation#22436

Open
arshidkv12 wants to merge 1 commit into
php:masterfrom
arshidkv12:openssl-2
Open

ext/openssl: Use zend_string_equals_literal() for argon2 algorithm validation#22436
arshidkv12 wants to merge 1 commit into
php:masterfrom
arshidkv12:openssl-2

Conversation

@arshidkv12

Copy link
Copy Markdown
Contributor

No description provided.

ZEND_PARSE_PARAMETERS_END();

if (strcmp(ZSTR_VAL(algo), "argon2i") && strcmp(ZSTR_VAL(algo), "argon2id")) {
if (!zend_string_equals_literal(algo, "argon2i") && !zend_string_equals_literal(algo, "argon2id")) {

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.

it would be useful to add tests with algorithms values containing nul bytes for ex.

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.

2 participants