permissions: auto mode refuses dangerous calls (rules + cheap-model judge)
This commit is contained in:
1 parent
63b286efaf
commit
02144d4176
11 files changed
+791
-30
No files matched your search
@@ -190,7 +190,7 @@ fn expand(home: &Path, s: &str) -> PathBuf {
|
||||
}
|
||||
|
||||
/// Canonical path of `p`, or of its nearest existing ancestor plus the rest (for new files).
|
||||
fn canon(p: &Path) -> PathBuf {
|
||||
pub(crate) fn canon(p: &Path) -> PathBuf {
|
||||
// lexical `..`/`.` removal first, so a non-existent prefix cannot hide an escape
|
||||
let mut norm = PathBuf::new();
|
||||
for c in p.components() {
|
||||
|
||||
Reference in new issue
Block a user