From b653ef730d3183976e4388f6d7c0794c8d7f9d49 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Tue, 28 Jul 2026 15:11:46 +0800 Subject: [PATCH] General: removes `general.preRun` due to security concerns --- doc/json_schema.json | 5 ----- src/options/general.c | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/doc/json_schema.json b/doc/json_schema.json index e9271b2ff..4197c241b 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -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", diff --git a/src/options/general.c b/src/options/general.c index d1ee8e781..ee7204218 100644 --- a/src/options/general.c +++ b/src/options/general.c @@ -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")) {