fix: use the content directory for temp files to prevent cross-device linking (will not result in a bug or vulnerability because the server never looks in the root for content files)

This commit is contained in:
2025-10-16 22:16:00 -04:00
parent cf16f594e1
commit 47450156da

View File

@@ -110,7 +110,7 @@ async fn main() -> Result<(), MainError> {
let mut compressor =
BrotliEncoder::with_quality(for_compressor, async_compression::Level::Best);
let (temp_file, temp_path) = NamedTempFile::new()
let (temp_file, temp_path) = NamedTempFile::new_in(content_directory)
.context(TempFileCreationSnafu)?
.into_parts();