Skip to content

Commit

Permalink
Merge pull request #94 from thedevdojo/Fix-login-vulnerabilities
Browse files Browse the repository at this point in the history
Fix login vulnerabilities
  • Loading branch information
tnylea authored Jul 12, 2024
2 parents 4846892 + ea968c7 commit 7c3c85f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/views/pages/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ public function authenticate()
event(new Login(auth()->guard('web'), $this->userModel->where('email', $this->email)->first(), true));
if(session()->get('url.intended') != route('logout.get')){
session()->regenerate();
redirect()->intended(config('devdojo.auth.settings.redirect_after_auth'));
} else {
session()->regenerate();
return redirect(config('devdojo.auth.settings.redirect_after_auth'));
}
}
Expand Down
2 changes: 2 additions & 0 deletions resources/views/pages/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ public function register()
}
if (session()->get('url.intended') != route('logout.get')) {
session()->regenerate();
redirect()->intended(config('devdojo.auth.settings.redirect_after_auth'));
} else {
session()->regenerate();
return redirect(config('devdojo.auth.settings.redirect_after_auth'));
}
}
Expand Down

0 comments on commit 7c3c85f

Please sign in to comment.