Reject unknown config keys

This commit is contained in:
2026-04-01 23:51:47 +02:00
parent c7c4c673cb
commit db60fb9ddb
3 changed files with 69 additions and 4 deletions
+2
View File
@@ -22,6 +22,7 @@ pub enum SandboxError {
},
ProfileNotFound(String),
ConflictingMode,
UnknownConfigKey(String),
ConfigPathNotAbsolute(PathBuf),
}
@@ -60,6 +61,7 @@ impl std::fmt::Display for SandboxError {
f,
"config section sets both blacklist and whitelist to true"
),
Self::UnknownConfigKey(key) => write!(f, "unknown config key: {key}"),
Self::ConfigPathNotAbsolute(p) => {
write!(f, "config path is not absolute: {}", p.display())
}