mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-06 20:14:43 +08:00
Allow invalid TOML when parsing database settings (closes #1822)
This commit is contained in:
parent
7ae6ed12fb
commit
61d706f921
1 changed files with 3 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue