8000 minor #38030 [Ldap] Add comment about bind with empty password (jderu… · symfony/symfony@f0c4d31 · GitHub
[go: up one dir, main page]

Skip to content

Commit f0c4d31

Browse files
committed
minor #38030 [Ldap] Add comment about bind with empty password (jderusse)
This PR was merged into the 4.4 branch. Discussion ---------- [Ldap] Add comment about bind with empty password | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | / | License | MIT | Doc PR | / When LDAP server allows unauthenticated binds, calling the method `bind` with a blank password will return a positive response. This is not an issue when using High Level classes of Symfony, because this case is handled in `LdapBindAuthenticationProvider` and `CheckLdapCredentialsListener`. And passing a blank password could be a valid use case for the low level class `Connection`. This PR adds a comment on the parameter `$password` to let people Know about this Commits ------- 63a8570 Add a warning comment on ldap empty password
2 parents 27c131c + 63a8570 commit f0c4d31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/Ldap/Adapter/ExtLdap/Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public function isBound()
5050

5151
/**
5252
* {@inheritdoc}
53+
*
54+
* @param string $password WARNING: When the LDAP server allows unauthenticated binds, a blank $password will always be valid.
5355
*/
5456
public function bind($dn = null, $password = null)
5557
{

0 commit comments

Comments
 (0)
0