Support the actual #[\SensitiveParameter] attribute in stubs (#8836)

This commit is contained in:
Tim Düsterhus 2022-07-12 12:43:44 +02:00 committed by GitHub
parent f22e0df033
commit 342e18f105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 752 additions and 502 deletions

View file

@ -610,10 +610,7 @@ namespace {
#endif
#ifdef HAVE_ORALDAP
/**
* @sensitive-param $password
*/
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
function ldap_connect(?string $uri = null, int $port = 389, string $wallet = UNKNOWN, #[\SensitiveParameter] string $password = UNKNOWN, int $auth_mode = GSLC_SSL_NO_AUTH): LDAP\Connection|false {}
#else
function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {}
#endif
@ -623,21 +620,12 @@ namespace {
/** @alias ldap_unbind */
function ldap_close(LDAP\Connection $ldap): bool {}
/**
* @sensitive-param $password
*/
function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null): bool {}
function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null): bool {}
/**
* @sensitive-param $password
*/
function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?array $controls = null): LDAP\Result|false {}
function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null, ?array $controls = null): LDAP\Result|false {}
#ifdef HAVE_LDAP_SASL
/**
* @sensitive-param $password
*/
function ldap_sasl_bind(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {}
function ldap_sasl_bind(LDAP\Connection $ldap, ?string $dn = null, #[\SensitiveParameter] ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): bool {}
#endif
/** @param LDAP\Connection|array $ldap */
@ -791,10 +779,8 @@ namespace {
#ifdef HAVE_LDAP_PASSWD
/**
* @param array $controls
* @sensitive-param $old_password
* @sensitive-param $new_password
*/
function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {}
function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", #[\SensitiveParameter] string $old_password = "", #[\SensitiveParameter] string $new_password = "", &$controls = null): string|bool {}
#endif