Skip to content

Commit

Permalink
Bail if diagnostic message is null
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Nov 1, 2023
1 parent bd1cb18 commit d44a629
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Auth/ListensForLdapBindFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ protected function ldapBindFailed(string $errorMessage, string $diagnosticMessag
$this->handleLdapBindError($errorMessage);

return;

case is_null($diagnosticMessage):
// If there is no diagnostic message to work with, we
// cannot make any further attempts to determine
// the error. We will bail here in such case.
return;

case $this->causedByInvalidCredentials($errorMessage, $diagnosticMessage):
// We'll bypass any invalid LDAP credential errors and let
// the login controller handle it. This is so proper
Expand Down

0 comments on commit d44a629

Please sign in to comment.