diff --git a/CHANGELOG.md b/CHANGELOG.md index 8586931f6..196b6fc85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ## v0.6.1 (Courageous Carniadactylus) ### Fixed * Fixes a bug preventing the use of services that have no variables attached to them. +* Fixes 'Remember Me' checkbox being ignored when using 2FA on an account. + +### Changed +* Renamed session cookies from `laravel_session` to `pterodactyl_session`. +* Sessions are now encrypted before being stored as an additional layer of security. ## v0.6.0 (Courageous Carniadactylus) ### Fixed diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index cca632647..e4ca0d2ca 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -134,7 +134,9 @@ class LoginController extends Controller ])), ], 5); - return redirect()->route('auth.totp')->with('authentication_token', $token); + return redirect()->route('auth.totp') + ->with('authentication_token', $token) + ->with('remember', $request->has('remember')); } $attempt = Auth::attempt([ @@ -167,7 +169,7 @@ class LoginController extends Controller return view('auth.totp', [ 'verify_key' => $token, - 'remember' => $request->has('remember'), + 'remember' => $request->session()->get('remember'), ]); } diff --git a/config/session.php b/config/session.php index 246fc9347..97b622fce 100644 --- a/config/session.php +++ b/config/session.php @@ -44,7 +44,7 @@ return [ | */ - 'encrypt' => false, + 'encrypt' => true, /* |-------------------------------------------------------------------------- @@ -122,7 +122,7 @@ return [ | */ - 'cookie' => 'laravel_session', + 'cookie' => 'pterodactyl_session', /* |-------------------------------------------------------------------------- diff --git a/resources/themes/pterodactyl/auth/totp.blade.php b/resources/themes/pterodactyl/auth/totp.blade.php index 4a021603d..ebf62aa26 100644 --- a/resources/themes/pterodactyl/auth/totp.blade.php +++ b/resources/themes/pterodactyl/auth/totp.blade.php @@ -23,20 +23,29 @@ 2FA Checkpoint @endsection +@section('scripts') + @parent + +@endsection + @section('content')
-

@lang('auth.2fa_required')

-
- - +
+ +
{!! csrf_field() !!} @if($remember) - + @endif