Skip to content

Commit 082dcd8

Browse files
committed
Mark parameter in ext/ldap as sensitive
1 parent 0b61bd6 commit 082dcd8

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

ext/ldap/ldap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "php.h"
3030
#include "php_ini.h"
31+
#include "Zend/zend_attributes.h"
3132

3233
#include <stddef.h>
3334

ext/ldap/ldap.stub.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,9 @@
610610
#endif
611611

612612
#ifdef HAVE_ORALDAP
613+
/**
614+
* @sensitive-param $password
615+
*/
613616
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 {}
614617
#else
615618
function ldap_connect(?string $uri = null, int $port = 389): LDAP\Connection|false {}
@@ -620,11 +623,20 @@ function ldap_unbind(LDAP\Connection $ldap): bool {}
620623
/** @alias ldap_unbind */
621624
function ldap_close(LDAP\Connection $ldap): bool {}
622625

626+
/**
627+
* @sensitive-param $password
628+
*/
623629
function ldap_bind(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null): bool {}
624630

631+
/**
632+
* @sensitive-param $password
633+
*/
625634
function ldap_bind_ext(LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?array $controls = null): LDAP\Result|false {}
626635

627636
#ifdef HAVE_LDAP_SASL
637+
/**
638+
* @sensitive-param $password
639+
*/
628640
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 {}
629641
#endif
630642

@@ -779,6 +791,8 @@ function ldap_exop(LDAP\Connection $ldap, string $request_oid, ?string $request_
779791
#ifdef HAVE_LDAP_PASSWD
780792
/**
781793
* @param array $controls
794+
* @sensitive-param $old_password
795+
* @sensitive-param $new_password
782796
*/
783797
function ldap_exop_passwd(LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", &$controls = null): string|bool {}
784798
#endif

ext/ldap/ldap_arginfo.h

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)