Skip to content

Commit

Permalink
fix(p): 修复后缀为网站根目录已存在的文件的文件名但未成功reject的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckBurnIncense committed Jan 13, 2023
1 parent 856982b commit 9338a6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected static function verify_suffix($suffix) :bool {
$len = mb_strlen($suffix);
if ($len < 1 or $len > self::$SUFFIX_MAX_LETTERS) self::reject('后缀过长, 缩短一点吧~', 400);
// 是否为已存在的文件
if (file_exists(__DIR__ . "/..\/" . $suffix)) self::reject('这没有bug, 赶紧给爷爬doge', 400);
if (file_exists(__DIR__ . "/../" . $suffix)) self::reject('这没有bug, 赶紧给爷爬doge', 400);
return true;
}

Expand Down

0 comments on commit 9338a6c

Please sign in to comment.