diff options
author | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-09-04 20:27:15 +0000 |
---|---|---|
committer | Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | 2021-09-04 20:29:20 +0000 |
commit | f8326e510adf906014df7def67237812bec5930d (patch) | |
tree | bab979172194e3dc6e672d1843dd444f40e2a377 /tests/upload_files.rs | |
parent | Adress review comments (diff) | |
download | miniserve-f8326e510adf906014df7def67237812bec5930d.tar.gz miniserve-f8326e510adf906014df7def67237812bec5930d.zip |
Better name and docs for symlink test
Diffstat (limited to 'tests/upload_files.rs')
-rw-r--r-- | tests/upload_files.rs | 8 |
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)] |