Mark crypt()'s $string parameter as #[\SensitiveParameter]

This commit is contained in:
Tim Düsterhus 2022-08-30 20:02:28 +02:00
parent 9f303cf7d3
commit c77bbf6fe5
No known key found for this signature in database
GPG Key ID: 8FF75566094168AF
3 changed files with 6 additions and 2 deletions

2
NEWS
View File

@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.2.0RC2
- Standard:
. Marked crypt()'s $string parameter as #[\SensitiveParameter]. (timwolla)
01 Sep 2022, PHP 8.2.0RC1

View File

@ -911,7 +911,7 @@ function crc32(string $string): int {}
/* crypt.c */
/** @refcount 1 */
function crypt(string $string, string $salt): string {}
function crypt(#[\SensitiveParameter] string $string, string $salt): string {}
/* datetime.c */

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4df5576b4e03b18896abf58e6c70d9fd6ae76687 */
* Stub hash: d0941f025c602b46179675026eb198d7425c717a */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@ -3567,6 +3567,8 @@ static void register_basic_functions_symbols(int module_number)
REGISTER_LONG_CONSTANT("PHP_ROUND_HALF_ODD", PHP_ROUND_HALF_ODD, CONST_PERSISTENT);
zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "crypt", sizeof("crypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "password_hash", sizeof("password_hash") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "password_verify", sizeof("password_verify") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);