aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2021-09-04 20:27:15 +0000
committerAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2021-09-04 20:29:20 +0000
commitf8326e510adf906014df7def67237812bec5930d (patch)
treebab979172194e3dc6e672d1843dd444f40e2a377
parentAdress review comments (diff)
downloadminiserve-f8326e510adf906014df7def67237812bec5930d.tar.gz
miniserve-f8326e510adf906014df7def67237812bec5930d.zip
Better name and docs for symlink test
-rw-r--r--tests/upload_files.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/upload_files.rs b/tests/upload_files.rs
index 331db1c..5e764ba 100644
--- a/tests/upload_files.rs
+++ b/tests/upload_files.rs
@@ -127,10 +127,16 @@ fn prevent_path_traversal_attacks(
Ok(())
}
+/// Test uploading to symlink directories that point outside the server root.
+/// See https://github.com/svenstaro/miniserve/issues/466
#[rstest]
#[case(server(&["-u"]), true)]
#[case(server_no_stderr(&["-u", "--no-symlinks"]), false)]
-fn symlink(#[case] server: TestServer, #[case] ok: bool, tmpdir: TempDir) -> Result<(), Error> {
+fn upload_to_symlink_directory(
+ #[case] server: TestServer,
+ #[case] ok: bool,
+ tmpdir: TempDir,
+) -> Result<(), Error> {
#[cfg(unix)]
use std::os::unix::fs::symlink as symlink_dir;
#[cfg(windows)]