diff --git a/actix-files/tests/encoding.rs b/actix-files/tests/encoding.rs index 941984c7b..d893b20c9 100644 --- a/actix-files/tests/encoding.rs +++ b/actix-files/tests/encoding.rs @@ -35,7 +35,10 @@ async fn test_utf8_file_contents() { res.headers().get(header::CONTENT_TYPE), Some(&HeaderValue::from_static("text/plain; charset=utf-8")), ); +} +#[actix_rt::test] +async fn test_directory_traversal_prevention() { // prevent directory traversal attack let srv = test::init_service(App::new().service(Files::new("/", "./tests"))).await;