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 = [ |
| 1527 | 1527 | "html5ever", |
| 1528 | 1528 | "image", |
| 1529 | 1529 | "lazy_static 1.4.0", |
| 1530 | "libc", |
| 1530 | 1531 | "mandown", |
| 1531 | 1532 | "markup5ever_rcdom", |
| 1532 | 1533 | "matrix-sdk", |
Cargo.toml
+1
| @@ -35,6 +35,7 @@ futures = "0.3" |
| 35 | 35 | gethostname = "0.4.1" |
| 36 | 36 | html5ever = "0.26.0" |
| 37 | 37 | image = "0.24.5" |
| 38 | libc = "0.2" |
| 38 | 39 | markup5ever_rcdom = "0.2.0" |
| 39 | 40 | mime = "^0.3.16" |
| 40 | 41 | mime_guess = "^2.0.4" |
src/main.rs
+6
| @@ -694,6 +694,12 @@ fn main() -> IambResult<()> { |
| 694 | 694 | // Load configuration and set up the Matrix SDK. |
| 695 | 695 | let settings = ApplicationSettings::load(iamb).unwrap_or_else(print_exit); |
| 696 | 696 | |
| 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 | |
| 697 | 703 | // Set up the tracing subscriber so we can log client messages. |
| 698 | 704 | let log_prefix = format!("iamb-log-{}", settings.profile_name); |
| 699 | 705 | let log_dir = settings.dirs.logs.as_path(); |