Skip to content

Commit

Permalink
fix: [customauth] missing Class init fixes #9425
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed Dec 1, 2023
1 parent 8840c75 commit 0934ab6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ private function __customAuthentication($server)
$this->Session->write(AuthComponent::$sessionKey, $user['User']);
if (Configure::read('MISP.log_auth')) {
$this->Log = ClassRegistry::init('Log');
$this->UserLoginProfile = ClassRegistry::init('UserLoginProfile');
$change = $this->UserLoginProfile->_getUserProfile();
$change['http_method'] = $_SERVER['REQUEST_METHOD'];
$change['target'] = $this->request->here;
Expand All @@ -1165,6 +1166,7 @@ private function __customAuthentication($server)
// User not authenticated correctly
// reset the session information
$this->Log = ClassRegistry::init('Log');
$this->UserLoginProfile = ClassRegistry::init('UserLoginProfile');
$change = $this->UserLoginProfile->_getUserProfile();
$this->Log->createLogEntry(
'SYSTEM',
Expand Down

0 comments on commit 0934ab6

Please sign in to comment.