mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix #1468 inconsistent use of REMOTE_ADDR vs. RX_CLIENT_IP
This commit is contained in:
parent
996ca166e8
commit
2d6a175b19
11 changed files with 24 additions and 32 deletions
|
|
@ -34,15 +34,7 @@ class sessionController extends session
|
|||
$output = executeQuery('session.getSession', $args);
|
||||
$session_info = $output->data;
|
||||
|
||||
//if ip has changed delete the session from db
|
||||
if($session_info->session_key == $session_key && $session_info->ipaddress != $_SERVER['REMOTE_ADDR'])
|
||||
{
|
||||
executeQuery('session.deleteSession', $args);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$args->expired = date("YmdHis", $_SERVER['REQUEST_TIME'] + $this->lifetime);
|
||||
$args->expired = date("YmdHis", time() + $this->lifetime);
|
||||
$args->val = $val;
|
||||
$args->cur_mid = Context::get('mid');
|
||||
|
||||
|
|
@ -61,8 +53,8 @@ class sessionController extends session
|
|||
{
|
||||
$args->member_srl = 0;
|
||||
}
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME']);
|
||||
$args->ipaddress = \RX_CLIENT_IP;
|
||||
$args->last_update = date('YmdHis');
|
||||
|
||||
//put session into db
|
||||
if($session_info->session_key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue