Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit b7eb816

Browse files
committed
Validate that the password isn't null.
1 parent a01cd00 commit b7eb816

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AdldapAuthUserProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ public function retrieveByCredentials(array $credentials)
6767
$username = Arr::get($username, 0);
6868
}
6969

70-
// Get the password input array key.
71-
$key = $this->getPasswordKey();
70+
// Retrieve the password from the submitted credentials.
71+
$password = Arr::get($credentials, $this->getPasswordKey());
7272

7373
// Try to log the user in.
74-
if ($this->authenticate($username, $credentials[$key])) {
74+
if (! is_null($password) && $this->authenticate($username, $password)) {
7575
// Login was successful, we'll create a new
7676
// Laravel model with the Adldap user.
77-
return $this->getModelFromAdldap($user, $credentials[$key]);
77+
return $this->getModelFromAdldap($user, $password);
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)