Skip to content

Commit

Permalink
# [MEDIUM] PHP error trying to log in with a username that doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas K. Dionysopoulos <[email protected]>
  • Loading branch information
nikosdion committed Nov 9, 2024
1 parent d639e4d commit e36176f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php die(); ?>
Akeeba Panopticon 1.3.1
================================================================================
# [MEDIUM] PHP error trying to log in with a username that doesn't exist

Akeeba Panopticon 1.3.0
================================================================================
+ Domain registration and expiration warnings
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function canUserLoginWithPassword(?string $username): bool
$user = $this->getContainer()->userManager->getUserByUsername($username);

// If the user was not found we return a fake "true" so that the regular login process records a fail.
if (!$user->getId())
if (empty($user) || !$user->getId())
{
return true;
}
Expand Down Expand Up @@ -69,7 +69,7 @@ public function resetPasswordResetRequests(): void
$userManager = $this->getContainer()->userManager;
$user = $userManager->getUser();

if (!$user->getId())
if (empty($user) || !$user->getId())
{
return;
}
Expand Down

0 comments on commit e36176f

Please sign in to comment.