mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-11 14:20:52 +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));
|
return Err(format!("Empty key at line: {}", self.line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => {
|
/*'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => {
|
||||||
key.push(ch);
|
key.push(ch);
|
||||||
}
|
}*/
|
||||||
'\"' => {
|
'\"' => {
|
||||||
let mut last_ch = char::from(0);
|
let mut last_ch = char::from(0);
|
||||||
while let Some(ch) = self.iter.next() {
|
while let Some(ch) = self.iter.next() {
|
||||||
|
|
@ -243,10 +243,7 @@ impl<'x, 'y> TomlParser<'x, 'y> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Err(format!(
|
key.push(ch);
|
||||||
"Unexpected character {:?} found in key at line {}.",
|
|
||||||
ch, self.line
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue