Compare commits

..

No commits in common. "787334972e70d5523a5eeb9044ada938d3970d7e" and "879554d5a81a82ab612df48f67d1f19710faf730" have entirely different histories.

7 changed files with 9 additions and 13 deletions

View File

@ -18,8 +18,8 @@ if (!function_exists('build_select')) {
*/ */
function build_select($name, $options, $selected = [], $attr = []) function build_select($name, $options, $selected = [], $attr = [])
{ {
$options = is_array($options) ? $options : explode(',', $options ?? ''); $options = is_array($options) ? $options : explode(',', $options);
$selected = is_array($selected) ? $selected : explode(',', $selected ?? ''); $selected = is_array($selected) ? $selected : explode(',', $selected);
return Form::select($name, $options, $selected, $attr); return Form::select($name, $options, $selected, $attr);
} }
} }

View File

@ -319,8 +319,9 @@ class Addon extends Backend
{ {
$offset = (int)$this->request->get("offset"); $offset = (int)$this->request->get("offset");
$limit = (int)$this->request->get("limit"); $limit = (int)$this->request->get("limit");
$filter = $this->request->get("filter", ''); $filter = $this->request->get("filter");
$search = $this->request->get("search", '', 'strip_tags,htmlspecialchars'); $search = $this->request->get("search");
$search = htmlspecialchars(strip_tags($search));
$onlineaddons = $this->getAddonList(); $onlineaddons = $this->getAddonList();
$filter = (array)json_decode($filter, true); $filter = (array)json_decode($filter, true);
$addons = get_addon_list(); $addons = get_addon_list();

View File

@ -10,7 +10,7 @@ if (!function_exists('__')) {
/** /**
* 获取语言变量值 * 获取语言变量值
* @param string $name 语言变量名 * @param string $name 语言变量名
* @param string | array $vars 动态变量值 * @param array $vars 动态变量值
* @param string $lang 语言 * @param string $lang 语言
* @return mixed * @return mixed
*/ */

View File

@ -63,7 +63,7 @@ class Common
} }
// 切换多语言 // 切换多语言
if (Config::get('lang_switch_on')) { if (Config::get('lang_switch_on')) {
$lang = $request->get('lang', ''); $lang = $request->get('lang');
if (preg_match("/^([a-zA-Z\-_]{2,10})\$/i", $lang)) { if (preg_match("/^([a-zA-Z\-_]{2,10})\$/i", $lang)) {
\think\Cookie::set('think_var', $lang); \think\Cookie::set('think_var', $lang);
} }

View File

@ -76,7 +76,6 @@ abstract class Driver
protected function getEncryptedToken($token) protected function getEncryptedToken($token)
{ {
$config = \think\Config::get('token'); $config = \think\Config::get('token');
$token = $token ?? ''; // 为兼容 php8
return hash_hmac($config['hashalgo'], $token, $config['key']); return hash_hmac($config['hashalgo'], $token, $config['key']);
} }

View File

@ -60,7 +60,6 @@ class Redis extends Driver
protected function getEncryptedToken($token) protected function getEncryptedToken($token)
{ {
$config = \think\Config::get('token'); $config = \think\Config::get('token');
$token = $token ?? ''; // 为兼容 php8
return $this->options['tokenprefix'] . hash_hmac($config['hashalgo'], $token, $config['key']); return $this->options['tokenprefix'] . hash_hmac($config['hashalgo'], $token, $config['key']);
} }

View File

@ -17,7 +17,7 @@
"require": { "require": {
"php": ">=7.2.0", "php": ">=7.2.0",
"topthink/framework": "dev-master", "topthink/framework": "dev-master",
"topthink/think-captcha": "^1.0.9", "topthink/think-captcha": "^1.0",
"topthink/think-installer": "^1.0.14", "topthink/think-installer": "^1.0.14",
"topthink/think-queue": "1.1.6", "topthink/think-queue": "1.1.6",
"topthink/think-helper": "^1.0.7", "topthink/think-helper": "^1.0.7",
@ -25,6 +25,7 @@
"overtrue/pinyin": "^3.0", "overtrue/pinyin": "^3.0",
"phpoffice/phpspreadsheet": "1.19", "phpoffice/phpspreadsheet": "1.19",
"overtrue/wechat": "^4.6", "overtrue/wechat": "^4.6",
"nelexa/zip": "^3.3",
"ext-json": "*", "ext-json": "*",
"ext-curl": "*", "ext-curl": "*",
"ext-pdo": "*", "ext-pdo": "*",
@ -38,10 +39,6 @@
{ {
"type": "git", "type": "git",
"url": "https://gitee.com/fastadminnet/framework.git" "url": "https://gitee.com/fastadminnet/framework.git"
},
{
"type": "git",
"url": "https://gitee.com/fastadminnet/think-captcha.git"
} }
] ]
} }