From cc55c2dde7b27b3d1dc7dcb17a9acd276a974da4 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 e68ff0a8ed..b307a6c170 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4371,7 +4371,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) {