* Fix for sso login from zdoo.

This commit is contained in:
王怡栋
2024-04-25 17:04:19 +08:00
committed by caoyanyi
parent be4a55f361
commit a0e8ef330d
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class sso extends control
$this->app->loadConfig('sso');
if(!$this->config->sso->turnon) return print($this->locate($locate));
if($type != 'return') return $this->ssoZen->locateNotifyLink($locate, $referer);
if($type != 'return') return $this->ssoZen->locateNotifyLink($this->config->sso->addr, $referer);
$this->ssoZen->idenfyFromSSO($locate);
return $this->locate($this->createLink('user', 'login', empty($referer) ? '' : "referer=$referer"));
+3 -3
View File
@@ -104,8 +104,9 @@ class ssoZen extends sso
{
if($this->get->status != 'success' || md5($this->get->data) != $this->get->md5) return false;
$last = $this->server->request_time;
$data = json_decode(base64_decode($this->get->data));
$userIP = helper::getRemoteIp();
$last = $this->server->request_time;
$data = json_decode(base64_decode($this->get->data));
if($data->auth != $this->computeAuth($data->token)) return false;
@@ -224,4 +225,3 @@ class ssoZen extends sso
return md5($code . $userIP . $token . $key);
}
}