Skip to content

Commit ba04056

Browse files
committed
Fix undefined array key error
1 parent 9f6c0f6 commit ba04056

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Auth/Source/Negotiate.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ public function authenticate(array &$state): void
215215
}
216216

217217
if (($lookup = $this->lookupUserData($uid)) !== null) {
218-
if ($state['core:username'] !== null && strcasecmp($lookup['userPrincipalName'][0], $state['core:username']) !== 0) {
218+
if (
219+
array_key_exists('core:username', $state)
220+
&& $state['core:username'] !== null
221+
&& strcasecmp($lookup['userPrincipalName'][0], $state['core:username']) !== 0
222+
) {
219223
// The login-hint doesn't match the already authenticated user. Fall back.
220224
$this->fallBack($state);
221225
return;

0 commit comments

Comments
 (0)