mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
fix: resolve high-severity dependency and code scanning alerts
Upgrade SQLite to 1.1.5 so tar resolves safely without an override. Update vulnerable dependencies while retaining scoped compatibility overrides and the CommonJS decoder patch required by Umi's query-string consumers. Limit sensitive endpoints, constrain script file operations to checked paths, and serialize Python environment values safely. Add compatibility regressions and include the decoder patch in Docker and npm installation inputs.
This commit is contained in:
1 parent
0902bc074d
commit
b6bdba9a8d
13 files changed
+1064
-746
No files matched your search
@@ -264,7 +264,7 @@ export default class EnvService {
|
||||
const groups = groupBy(envs, 'name');
|
||||
let env_string = '';
|
||||
let js_env_string = '';
|
||||
let py_env_string = 'import os\n';
|
||||
let py_env_string = 'import os, json\n';
|
||||
for (const key in groups) {
|
||||
if (Object.prototype.hasOwnProperty.call(groups, key)) {
|
||||
const group = groups[key];
|
||||
@@ -277,17 +277,13 @@ export default class EnvService {
|
||||
.replace(/'/g, "'\\''")
|
||||
.trim();
|
||||
env_string += `export ${key}='${value}'\n`;
|
||||
const _env_value = `${group
|
||||
.map((x) => x.value)
|
||||
.join('&')
|
||||
.replace(/\\/g, '\\\\')}`;
|
||||
js_env_string += `process.env[${JSON.stringify(key)}]=${JSON.stringify(
|
||||
group.map((x) => x.value).join('&'),
|
||||
)};\n`;
|
||||
py_env_string += `os.environ['${key}']='''${_env_value.replace(
|
||||
/\'/g,
|
||||
"\\'",
|
||||
)}'''\n`;
|
||||
// Serialize data instead of constructing an escaped Python literal.
|
||||
py_env_string += `os.environ['${key}']=json.loads(${JSON.stringify(
|
||||
JSON.stringify(group.map((x) => x.value).join('&')),
|
||||
)})\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user