Skip to content

Commit e1dd829

Browse files
committed
[BUGFIX] Do not try to authorize user which were not fetched by the service
1 parent d9ebb3d commit e1dd829

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Classes/Authenticator.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class Authenticator extends AbstractAuthenticationService
3434
*/
3535
protected $userRepository = null;
3636

37+
protected $shouldAuth = false;
38+
3739
/**
3840
* Authenticator constructor.
3941
*/
@@ -65,7 +67,7 @@ public function getUser()
6567
} catch (ClientException $e) {
6668
return false;
6769
}
68-
70+
$this->shouldAuth = true;
6971
return $this->userRepository->processInfo($info);
7072
} elseif ('deleted' === $state) {
7173
$this->userRepository->removeUser($username);
@@ -80,6 +82,9 @@ public function getUser()
8082
*/
8183
public function authUser(array $user)
8284
{
85+
if (!$this->shouldAuth) {
86+
return 100;
87+
}
8388
if (!isset($this->login['uident_text'])) {
8489
$rsaEncryptionDecoder = GeneralUtility::makeInstance(RsaEncryptionDecoder::class);
8590
$this->login['uident_text'] = $rsaEncryptionDecoder->decrypt($this->login['uident']);

0 commit comments

Comments
 (0)