"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Security/Authentication/AuthenticationSuccessHandler.php" between
contao-4.11.3.tar.gz and contao-4.11.4.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

AuthenticationSuccessHandler.php  (contao-4.11.3):AuthenticationSuccessHandler.php  (contao-4.11.4)
skipping to change at line 102 skipping to change at line 102
$this->user->loginAttempts = 0; $this->user->loginAttempts = 0;
$this->user->locked = 0; $this->user->locked = 0;
if ($token instanceof TwoFactorTokenInterface) { if ($token instanceof TwoFactorTokenInterface) {
$this->user->save(); $this->user->save();
$response = new RedirectResponse($request->getUri()); $response = new RedirectResponse($request->getUri());
// Used by the TwoFactorListener to redirect a user back to the auth entication page // Used by the TwoFactorListener to redirect a user back to the auth entication page
if ($request->hasSession() && $request->isMethodSafe() && !$request- >isXmlHttpRequest()) { if ($request->hasSession() && $request->isMethodSafe() && !$request- >isXmlHttpRequest()) {
$this->saveTargetPath($request->getSession(), $token->getProvide rKey(), $request->getUri()); $this->saveTargetPath($request->getSession(), $token->getFirewal lName(), $request->getUri());
} }
return $response; return $response;
} }
$this->user->lastLogin = $this->user->currentLogin; $this->user->lastLogin = $this->user->currentLogin;
$this->user->currentLogin = time(); $this->user->currentLogin = time();
$this->user->save(); $this->user->save();
if ($request->request->has('trusted')) { if ($request->request->has('trusted')) {
skipping to change at line 132 skipping to change at line 132
if (null !== $this->logger) { if (null !== $this->logger) {
$this->logger->info( $this->logger->info(
sprintf('User "%s" has logged in', $this->user->username), sprintf('User "%s" has logged in', $this->user->username),
['contao' => new ContaoContext(__METHOD__, ContaoContext::ACCESS , $this->user->username)] ['contao' => new ContaoContext(__METHOD__, ContaoContext::ACCESS , $this->user->username)]
); );
} }
$this->triggerPostLoginHook(); $this->triggerPostLoginHook();
if ($request->hasSession() && method_exists($token, 'getProviderKey')) { if ($request->hasSession()) {
$this->removeTargetPath($request->getSession(), $token->getProviderK // Backwards compatibility with symfony/security <5.2
ey()); if (method_exists($token, 'getFirewallName')) {
$this->removeTargetPath($request->getSession(), $token->getFirew
allName());
} elseif (method_exists($token, 'getProviderKey')) {
$this->removeTargetPath($request->getSession(), $token->getProvi
derKey());
}
} }
return $response; return $response;
} }
protected function determineTargetUrl(Request $request): string protected function determineTargetUrl(Request $request): string
{ {
if (!$this->user instanceof FrontendUser || $request->request->get('_alw ays_use_target_path')) { if (!$this->user instanceof FrontendUser || $request->request->get('_alw ays_use_target_path')) {
return $this->decodeTargetPath($request); return $this->decodeTargetPath($request);
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)