From 90cfdbf37c44f3e8f4f445ac264ada933e5c0009 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sat, 10 Feb 2024 23:28:17 +0800 Subject: [PATCH] Security: skip writing print_host and apikey in gcode (#4030) --- src/libslic3r/GCode.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 76bde9b019..8096bc7a88 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4270,7 +4270,10 @@ void GCode::append_full_config(const Print &print, std::string &str) // Sorted list of config keys, which shall not be stored into the G-code. Initializer list. static constexpr auto banned_keys = { "compatible_printers"sv, - "compatible_prints"sv + "compatible_prints"sv, + "print_host"sv, + "printhost_apikey"sv, + "printhost_cafile"sv }; assert(std::is_sorted(banned_keys.begin(), banned_keys.end())); auto is_banned = [](const std::string &key) {