mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Security: skip writing print_host and apikey in gcode (#4030)
This commit is contained in:
@@ -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.
|
// Sorted list of config keys, which shall not be stored into the G-code. Initializer list.
|
||||||
static constexpr auto banned_keys = {
|
static constexpr auto banned_keys = {
|
||||||
"compatible_printers"sv,
|
"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()));
|
assert(std::is_sorted(banned_keys.begin(), banned_keys.end()));
|
||||||
auto is_banned = [](const std::string &key) {
|
auto is_banned = [](const std::string &key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user