From 61d706f921a7c5bfd14d0be376bdb4810ca8807e Mon Sep 17 00:00:00 2001 From: mdecimus Date: Wed, 16 Jul 2025 16:53:15 +0200 Subject: [PATCH] Allow invalid TOML when parsing database settings (closes #1822) --- crates/utils/src/config/parser.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/utils/src/config/parser.rs b/crates/utils/src/config/parser.rs index e5348b43..071779a4 100644 --- a/crates/utils/src/config/parser.rs +++ b/crates/utils/src/config/parser.rs @@ -207,9 +207,9 @@ impl<'x, 'y> TomlParser<'x, 'y> { return Err(format!("Empty key at line: {}", self.line)); } } - 'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => { + /*'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => { key.push(ch); - } + }*/ '\"' => { let mut last_ch = char::from(0); while let Some(ch) = self.iter.next() { @@ -243,10 +243,7 @@ impl<'x, 'y> TomlParser<'x, 'y> { } } _ => { - return Err(format!( - "Unexpected character {:?} found in key at line {}.", - ch, self.line - )); + key.push(ch); } } }