security: restrict secret files to owner-only (0600)

This commit is contained in:
zhom
2026-07-07 22:44:31 +04:00
parent 862831764d
commit 15a7647e74
5 changed files with 39 additions and 14 deletions
+1
View File
@@ -87,6 +87,7 @@ pub fn store_e2e_password(password: &str) -> Result<(), String> {
std::fs::write(&file_path, file_data)
.map_err(|e| format!("Failed to write e2e password file: {e}"))?;
crate::app_dirs::restrict_to_owner(std::path::Path::new(&file_path));
Ok(())
}