Skip to content

Commit

Permalink
Allow anonymous LDAP connections like the LDAP module allows by not m…
Browse files Browse the repository at this point in the history
…aking username a required string
  • Loading branch information
Craig Huckabee authored and tvdijen committed Sep 16, 2024
1 parent cbcef7e commit 72898e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Auth/Source/X509userCert.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ public function findUserByAttribute(string $attr, string $value): ?Entry
{
$searchBase = $this->ldapConfig->getArray('search.base');

$searchUsername = $this->ldapConfig->getString('search.username');
Assert::notWhitespaceOnly($searchUsername);
$searchUsername = $this->ldapConfig->getOptionalString('search.username', null);
Assert::nullOrnotWhitespaceOnly($searchUsername);

$searchPassword = $this->ldapConfig->getOptionalString('search.password', null);
Assert::nullOrnotWhitespaceOnly($searchPassword);
Expand Down

0 comments on commit 72898e4

Please sign in to comment.