Skip to content

Commit

Permalink
wsd: config: add missing defaults
Browse files Browse the repository at this point in the history
Change-Id: I7a599db94ebdcbd9605d39a67f110eaefd027482
Signed-off-by: Ashod Nakashian <[email protected]>
  • Loading branch information
Ashod committed Dec 14, 2024
1 parent 79686ad commit b2679c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions common/ConfigUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RuntimeConstant<bool> SslTermination;
// NOTE: This is sorted, please keep it sorted as it's friendlier to readers.
static const std::map<std::string, std::string> DefAppConfig = {
{ "accessibility.enable", "false" },
{ "admin_console.enable", "true" },
{ "admin_console.enable_pam", "false" },
{ "admin_console.logging.admin_action", "true" },
{ "admin_console.logging.admin_login", "true" },
Expand Down Expand Up @@ -195,9 +196,13 @@ static const std::map<std::string, std::string> DefAppConfig = {
#if ENABLE_FEATURE_RESTRICTION
{ "restricted_commands", "" },
#endif
{ "security.allow_external_scripting", "false" },
{ "security.capabilities", "true" },
{ "security.enable_macros_execution", "false" },
{ "security.enable_metrics_unauthenticated", "false" },
{ "security.enable_websocket_urp", "false" },
{ "security.jwt_expiry_secs", "1800" },
{ "security.macro_security_level", "1" },
{ "security.seccomp", "true" },
{ "security.server_signature", "false" },
{ "server_name", "" },
Expand Down Expand Up @@ -229,6 +234,8 @@ static const std::map<std::string, std::string> DefAppConfig = {
{ "storage.wopi.max_file_size", "0" },
{ "storage.wopi[@allow]", "true" },
{ "sys_template_path", "systemplate" },
{ "trace.filter.message", "" },
{ "trace.outgoing.record", "false" },
{ "trace.path[@compress]", "true" },
{ "trace.path[@snapshot]", "false" },
{ "trace[@enable]", "false" },
Expand All @@ -238,6 +245,8 @@ static const std::map<std::string, std::string> DefAppConfig = {
{ "user_interface.use_integration_theme", "true" },
{ "wasm.enable", "false" },
{ "wasm.force", "false" },
{ "watermark.opacity", "" },
{ "watermark.text", "" },
{ "welcome.enable", "false" },
{ "zotero.enable", "true" },
};
Expand Down Expand Up @@ -303,12 +312,17 @@ std::map<std::string, std::string> extractAll(const Poco::Util::AbstractConfigur
// their children concatenated, which is worse than useless.
// E.g. logging.file: /tmp/coolwsd.lognevertimestamptrue10 days10truefalse
map.erase("admin_console.logging");
map.erase("feature_lock.locked_hosts");
map.erase("logging.anonymize");
map.erase("logging.file");
map.erase("net.lok_allow");
map.erase("net.post_allow");
map.erase("per_document.cleanup");
map.erase("ssl.sts");
map.erase("storage.filesystem");
map.erase("storage.wopi");
map.erase("trace.filter");
map.erase("trace.outgoing");

// Redact sensitive entries.
for (auto& pair : map)
Expand Down

0 comments on commit b2679c5

Please sign in to comment.