fix a bug

This commit is contained in:
Wisp X
2022-03-14 10:40:34 +08:00
parent bf26cb6699
commit 86cc72f27a
+2 -2
View File
@@ -18,13 +18,13 @@ class StrategyRequest extends FormRequest
{
$checkUrl = function ($attribute, $value, $fail) {
if ($this->input('key') == StrategyKey::Local) {
$folders = ['fonts', 'css', 'js'];
$folders = [env('THUMBNAIL_PATH', 'thumbnails'), 'fonts', 'css', 'js'];
$symlink = Strategy::getRootPath($value);
if (! $symlink) {
return $fail('访问域名缺少根路径');
}
if (in_array($symlink, $folders)) {
return $fail('系统保留路径');
return $fail('系统保留路径'. $symlink);
}
if (false !== strpbrk($symlink, "\\/?%*:|\"<>")) {
return $fail('根路径名称不符合规则');