diff --git a/composer.json b/composer.json index 4b79a1547..6fafebb38 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "ShowDoc is a tool greatly applicable for an IT team to share documents online", "keywords": ["showdoc","documents","Api"], "homepage": "https://github.com/star7th/showdoc", - "version":"v2.9.11", + "version":"v2.9.12", "license": "Apache-2.0", "authors": [ { diff --git a/server/Application/Api/Controller/ExtLoginController.class.php b/server/Application/Api/Controller/ExtLoginController.class.php index dbf217c9d..0f3127745 100644 --- a/server/Application/Api/Controller/ExtLoginController.class.php +++ b/server/Application/Api/Controller/ExtLoginController.class.php @@ -19,7 +19,7 @@ public function bySecretKey(){ $login_secret_key = D("Options")->get("login_secret_key") ; if(!$login_secret_key) return false ; $new_token = md5($username.$login_secret_key.$time); - if($token != $new_token){ + if( !($token === $new_token) ){ $this->sendError(10101,"token不正确"); return ; }