diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 52b1d585b9..a6e906cb0e 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -116,6 +116,14 @@ async fn handle_request(req: Request, mut root: PathBuf) -> Result d, + Err(_) => return Ok(not_found()), + }; + // Ensure we are only looking for things in our public folder if !root.starts_with(original_root) { return Ok(not_found());