From 47450156da2c3f66cb044863ab9ba3609d8b5bbc Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 16 Oct 2025 22:16:00 -0400 Subject: [PATCH] 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) --- src/bin/upload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/upload.rs b/src/bin/upload.rs index 2fc9c13..8c27be9 100644 --- a/src/bin/upload.rs +++ b/src/bin/upload.rs @@ -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();