mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
[L6] Update cache methods to use defined times and not ints
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\Auth;
|
||||
|
||||
use Cake\Chronos\Chronos;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Auth\AuthManager;
|
||||
@@ -100,7 +101,7 @@ class LoginController extends AbstractLoginController
|
||||
|
||||
if ($user->use_totp) {
|
||||
$token = Str::random(64);
|
||||
$this->cache->put($token, $user->id, 5);
|
||||
$this->cache->put($token, $user->id, Chronos::now()->addMinutes(5));
|
||||
|
||||
return JsonResponse::create([
|
||||
'data' => [
|
||||
|
||||
Reference in New Issue
Block a user