diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index fce8549f0..2c72175e7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; } /** @@ -377,11 +377,11 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; + $search = $subPath.'\\'; if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { + $length = $this->prefixLengthsPsr4[$first][$search]; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2f4cfd2b2..02070bcde 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -394,56 +394,6 @@ "Ip2Region" ] }, - { - "name": "zoujingli/think-library", - "version": "v5.1.x-dev", - "version_normalized": "5.1.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "133208dd758a04629de74e740878fa94a71bf4ec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/133208dd758a04629de74e740878fa94a71bf4ec", - "reference": "133208dd758a04629de74e740878fa94a71bf4ec", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "aliyuncs/oss-sdk-php": "^2.3", - "ext-curl": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-json": "*", - "ext-openssl": "*", - "php": ">=5.4", - "qiniu/php-sdk": "^7.2", - "topthink/framework": "5.1.*" - }, - "time": "2019-11-29T02:10:05+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/common.php" - ], - "psr-4": { - "library\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "ThinkPHP Basic Development Library", - "homepage": "http://framework.thinkadmin.top" - }, { "name": "zoujingli/wechat-developer", "version": "v1.2.15", @@ -566,5 +516,55 @@ "WeChatOpenDeveloper", "wechat" ] + }, + { + "name": "zoujingli/think-library", + "version": "v5.1.x-dev", + "version_normalized": "5.1.9999999.9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/zoujingli/ThinkLibrary.git", + "reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/378899fdcddb3d7217783ba3ea8f2eca1767df12", + "reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "aliyuncs/oss-sdk-php": "^2.3", + "ext-curl": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-openssl": "*", + "php": ">=5.4", + "qiniu/php-sdk": "^7.2", + "topthink/framework": "5.1.*" + }, + "time": "2019-11-30T05:43:13+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/common.php" + ], + "psr-4": { + "library\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "ThinkPHP Basic Development Library", + "homepage": "http://framework.thinkadmin.top" } ] diff --git a/vendor/zoujingli/think-library/src/common.php b/vendor/zoujingli/think-library/src/common.php index 02c40d52d..62d187ee3 100644 --- a/vendor/zoujingli/think-library/src/common.php +++ b/vendor/zoujingli/think-library/src/common.php @@ -13,6 +13,7 @@ // | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary // +---------------------------------------------------------------------- +use library\service\TokenService; use library\tools\Crypt; use library\tools\Csrf; use library\tools\Data; @@ -105,7 +106,7 @@ if (!function_exists('systoken')) { */ function systoken($node = null) { - $csrf = Csrf::buildFormToken(Node::get($node)); + $csrf = TokenService::instance()->buildFormToken($node); return $csrf['token']; } } diff --git a/vendor/zoujingli/think-library/src/service/TokenService.php b/vendor/zoujingli/think-library/src/service/TokenService.php index bff07a845..a5ec2799a 100644 --- a/vendor/zoujingli/think-library/src/service/TokenService.php +++ b/vendor/zoujingli/think-library/src/service/TokenService.php @@ -30,7 +30,7 @@ class TokenService extends Service */ public function getInputToken() { - return $this->app->request->header('User-Token-Csrf', input('_token_', '')); + return $this->app->request->header('user-token-csrf', input('_token_', '')); } /**