FIX: fix some security issue

This commit is contained in:
Michal Kváček
2016-01-22 12:46:18 +01:00
parent 39855bdbfd
commit 551e1af5fe
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -17,12 +17,12 @@ class Authenticate
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::check()) {
if (!Auth::check($guard)) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('login');
}
return redirect()->guest('login');
}
return $next($request);