mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fix: ws session extraction
This commit is contained in:
parent
6bdfe87bc0
commit
bb093482a7
@ -271,12 +271,20 @@ class WSManager extends WebSocketServer
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$php_session_id = \str_replace(
|
$match;
|
||||||
'PHPSESSID=',
|
$php_session_id = '';
|
||||||
'',
|
\preg_match(
|
||||||
$user->headers['cookie']
|
'/PHPSESSID=(.*)/',
|
||||||
|
$user->headers['cookie'],
|
||||||
|
$match
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (is_array($match) === true) {
|
||||||
|
$php_session_id = $match[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$php_session_id = \preg_replace('/;.*$/', '', $php_session_id);
|
||||||
|
|
||||||
// If being redirected from proxy.
|
// If being redirected from proxy.
|
||||||
if (isset($user->headers['x-forwarded-for']) === true) {
|
if (isset($user->headers['x-forwarded-for']) === true) {
|
||||||
$user->address = $user->headers['x-forwarded-for'];
|
$user->address = $user->headers['x-forwarded-for'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user