CVE: RUSTSEC-2018-0017: use tempfile instead of tempdir

This commit is contained in:
Matteo Settenvini 2023-07-12 17:19:26 +02:00
parent 161f4f1b1d
commit ad43eb9a13
8 changed files with 447 additions and 174 deletions

View file

@ -63,7 +63,7 @@ lazy_static! {
static ref FILEVIEW_TEMPLATE: &'static str = std::include_str!("../templates/index.html.tera");
// Workaround for https://github.com/SergioBenitez/Rocket/issues/1792
static ref EMPTY_DIR: tempdir::TempDir = tempdir::TempDir::new("serves3")
static ref EMPTY_DIR: tempfile::TempDir = tempfile::tempdir()
.expect("Unable to create an empty temporary folder, is the whole FS read-only?");
}