add --models-allow-extra-args for security

This commit is contained in:
Xuan Son Nguyen
2025-11-24 12:01:16 +01:00
parent 5ef3f990b9
commit 6ed192b4dd
5 changed files with 22 additions and 4 deletions

View File

@@ -383,8 +383,10 @@ void server_models::load(const std::string & name, const std::vector<std::string
child_args.push_back(std::to_string(inst.meta.port));
// append extra args
for (const auto & arg : extra_args) {
child_args.push_back(arg);
if (base_params.models_allow_extra_args) {
for (const auto & arg : extra_args) {
child_args.push_back(arg);
}
}
}