Reject unknown config keys
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user