Skip to content

Commit

Permalink
remove the directory privacy check
Browse files Browse the repository at this point in the history
it's too easy to trigger that warning
  • Loading branch information
glehmann committed Feb 4, 2024
1 parent 59dafa1 commit 79e47d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
19 changes: 0 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ clap_complete = "4.4.10"
fs-mistrust = "0.7.6"
log = "0.4.20"
ocli = "0.1.1"
path-absolutize = "3.1.1"
serde_yaml = "0.9.31"
substring = "1.4.5"
tempfile = "3.9.0"
Expand Down
9 changes: 0 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use std::str::FromStr;

use age::x25519;
use base64::prelude::*;
use path_absolutize::Absolutize;
use serde_yaml as sy;
use substring::Substring;

Expand All @@ -47,14 +46,6 @@ pub fn stdout_or_private_file(path: &Path) -> Result<Box<dyn Write>> {
Ok(if path == Path::new("-") {
Box::new(stdout())
} else {
// make sure the directory is private
let real_path = path.absolutize().path_ctx(path)?;
let dir = real_path.parent().ok_or(YageError::InvalidFileName {
path: path.to_owned(),
})?;
if let Err(e) = fs_mistrust::Mistrust::new().check_directory(dir) {
warn!("directory {dir:?} is not private: {e}");
}
Box::new(create_private_file(path)?)
})
}
Expand Down

0 comments on commit 79e47d5

Please sign in to comment.