mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 09:34:31 +08:00
修复文件越权访问
This commit is contained in:
+3
-2
@@ -313,8 +313,9 @@ export function getCommandScript(
|
||||
['.js', '.ts', '.sh', '.py'].some((y) => x.endsWith(y)),
|
||||
);
|
||||
if (!scriptsPart) return;
|
||||
if (scriptsPart.startsWith('/ql/data/scripts')) {
|
||||
scriptsPart = scriptsPart.replace('/ql/data/scripts/', '');
|
||||
const scriptDir = `${window.__ENV__QL_DIR}/data/scripts`;
|
||||
if (scriptsPart.startsWith(scriptDir)) {
|
||||
scriptsPart = scriptsPart.replace(scriptDir, '');
|
||||
}
|
||||
|
||||
let p: string, s: string;
|
||||
|
||||
Reference in New Issue
Block a user