* Fix bug #19311.
This commit is contained in:
@@ -2660,7 +2660,7 @@ EOD;
|
||||
if($isFreepasswd) return print(js::locate($this->config->webRoot));
|
||||
|
||||
$this->session->set('ENTRY_CODE', $this->get->code);
|
||||
$this->session->set('VALID_ENTRY', md5(md5($this->get->code) . $this->server->remote_addr));
|
||||
$this->session->set('VALID_ENTRY', md5(md5($this->get->code) . helper::getRemoteIp()));
|
||||
$this->loadModel('entry')->saveLog($entry->id, $this->server->request_uri);
|
||||
|
||||
/* Add for task #5384. */
|
||||
@@ -2827,7 +2827,7 @@ EOD;
|
||||
commonModel::$requestErrors = array();
|
||||
|
||||
if(!is_array($headers)) $headers = (array)$headers;
|
||||
$headers[] = "API-RemoteIP: " . zget($_SERVER, 'REMOTE_ADDR', '');
|
||||
$headers[] = "API-RemoteIP: " . helper::getRemoteIp();
|
||||
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
|
||||
@@ -2914,7 +2914,7 @@ EOD;
|
||||
commonModel::$requestErrors = array();
|
||||
|
||||
if(!is_array($headers)) $headers = (array)$headers;
|
||||
$headers[] = "API-RemoteIP: " . zget($_SERVER, 'REMOTE_ADDR', '');
|
||||
$headers[] = "API-RemoteIP: " . helper::getRemoteIp();
|
||||
if($dataType == 'json')
|
||||
{
|
||||
$headers[] = 'Content-Type: application/json;charset=utf-8';
|
||||
|
||||
@@ -26,7 +26,7 @@ class sso extends control
|
||||
$this->app->loadConfig('sso');
|
||||
if(!$this->config->sso->turnon) return print($this->locate($locate));
|
||||
|
||||
$userIP = $this->server->remote_addr;
|
||||
$userIP = helper::getRemoteIp();
|
||||
$code = $this->config->sso->code;
|
||||
$key = $this->config->sso->key;
|
||||
if($type != 'return')
|
||||
@@ -135,7 +135,7 @@ class sso extends control
|
||||
if($type != 'return')
|
||||
{
|
||||
$code = $this->config->sso->code;
|
||||
$userIP = $this->server->remote_addr;
|
||||
$userIP = helper::getRemoteIp();
|
||||
$token = $this->get->token;
|
||||
$key = $this->config->sso->key;
|
||||
$auth = md5($code . $userIP . $token . $key);
|
||||
@@ -199,7 +199,7 @@ class sso extends control
|
||||
if(!$this->session->ssoData) return;
|
||||
|
||||
$ssoData = $this->session->ssoData;
|
||||
$userIP = $this->server->remote_addr;
|
||||
$userIP = helper::getRemoteIp();
|
||||
$code = $this->config->sso->code;
|
||||
$key = $this->config->sso->key;
|
||||
if($ssoData->auth != md5($code . $userIP . $ssoData->token . $key)) return;
|
||||
|
||||
@@ -888,7 +888,7 @@ class userModel extends model
|
||||
|
||||
if($user)
|
||||
{
|
||||
$ip = $this->server->remote_addr;
|
||||
$ip = helper::getRemoteIp();
|
||||
$last = $this->server->request_time;
|
||||
|
||||
$user->lastTime = $user->last;
|
||||
|
||||
Reference in New Issue
Block a user