[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: CookieSessionHandler.php
<?php namespace Illuminate\Session; use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; use Illuminate\Support\InteractsWithTime; use SessionHandlerInterface; use Symfony\Component\HttpFoundation\Request; class CookieSessionHandler implements SessionHandlerInterface { use InteractsWithTime; /** * The cookie jar instance. * * @var \Illuminate\Contracts\Cookie\Factory */ protected $cookie; /** * The request instance. * * @var \Symfony\Component\HttpFoundation\Request */ protected $request; /** * The number of minutes the session should be valid. * * @var int */ protected $minutes; /** * Indicates whether the session should be expired when the browser closes. * * @var bool */ protected $expireOnClose; /** * Create a new cookie driven handler instance. * * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie * @param int $minutes * @param bool $expireOnClose * @return void */ public function __construct(CookieJar $cookie, $minutes, $expireOnClose = false) { $this->cookie = $cookie; $this->minutes = $minutes; $this->expireOnClose = $expireOnClose; } /** * {@inheritdoc} * * @return bool */ public function open($savePath, $sessionName): bool { return true; } /** * {@inheritdoc} * * @return bool */ public function close(): bool { return true; } /** * {@inheritdoc} * * @return string|false */ public function read($sessionId): string|false { $value = $this->request->cookies->get($sessionId) ?: ''; if (! is_null($decoded = json_decode($value, true)) && is_array($decoded) && isset($decoded['expires']) && $this->currentTime() <= $decoded['expires']) { return $decoded['data']; } return ''; } /** * {@inheritdoc} * * @return bool */ public function write($sessionId, $data): bool { $this->cookie->queue($sessionId, json_encode([ 'data' => $data, 'expires' => $this->availableAt($this->minutes * 60), ]), $this->expireOnClose ? 0 : $this->minutes); return true; } /** * {@inheritdoc} * * @return bool */ public function destroy($sessionId): bool { $this->cookie->queue($this->cookie->forget($sessionId)); return true; } /** * {@inheritdoc} * * @return int */ public function gc($lifetime): int { return 0; } /** * Set the request instance. * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function setRequest(Request $request) { $this->request = $request; } }
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.6 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