Commit 3da9835a17

3da9835a17742ed5080d446096682c86a96b0655

parent: 64891ec68f

Unregistered key

Ulyssa <git@ulyssa.dev> · 2023-07-08 03:34 UTC

Profile session token should only be readable by the user (#130)

Layout: unified · split

Cargo.lock +1
@@ -1527,6 +1527,7 @@ dependencies = [
15271527 "html5ever",
15281528 "image",
15291529 "lazy_static 1.4.0",
1530 "libc",
15301531 "mandown",
15311532 "markup5ever_rcdom",
15321533 "matrix-sdk",
Cargo.toml +1
@@ -35,6 +35,7 @@ futures = "0.3"
3535gethostname = "0.4.1"
3636html5ever = "0.26.0"
3737image = "0.24.5"
38libc = "0.2"
3839markup5ever_rcdom = "0.2.0"
3940mime = "^0.3.16"
4041mime_guess = "^2.0.4"
src/main.rs +6
@@ -694,6 +694,12 @@ fn main() -> IambResult<()> {
694694 // Load configuration and set up the Matrix SDK.
695695 let settings = ApplicationSettings::load(iamb).unwrap_or_else(print_exit);
696696
697 // Set umask on Unix platforms so that tokens, keys, etc. are only readable by the user.
698 #[cfg(unix)]
699 unsafe {
700 libc::umask(0o077);
701 };
702
697703 // Set up the tracing subscriber so we can log client messages.
698704 let log_prefix = format!("iamb-log-{}", settings.profile_name);
699705 let log_dir = settings.dirs.logs.as_path();