mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 09:58:03 +02:00
General: removes general.preRun due to security concerns
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user