General: removes general.preRun due to security concerns

This commit is contained in:
Carter Li
2026-07-28 15:11:46 +08:00
parent dc464d6efe
commit b653ef730d
2 changed files with 1 additions and 11 deletions
-5
View File
@@ -912,11 +912,6 @@
"description": "Set the timeout (ms) when waiting for child processes, `-1` for no timeout",
"default": 5000
},
"preRun": {
"type": "string",
"description": "Command to run before printing logos",
"default": ""
},
"detectVersion": {
"type": "boolean",
"description": "Whether to detect and display component versions. Mainly for benchmarking",
+1 -6
View File
@@ -24,12 +24,7 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
} else if (unsafe_yyjson_equals_str(key, "processingTimeout")) {
options->processingTimeout = (int32_t) yyjson_get_int(val);
} else if (unsafe_yyjson_equals_str(key, "preRun")) {
if (!yyjson_is_str(val)) {
return "general.preRun must be a string";
}
if (system(unsafe_yyjson_get_str(val)) < 0) {
return "Failed to execute preRun command";
}
return "general.preRun is removed due to security concerns.";
} else if (unsafe_yyjson_equals_str(key, "detectVersion")) {
options->detectVersion = yyjson_get_bool(val);
} else if (unsafe_yyjson_equals_str(key, "playerName")) {