From ce173bd3d1c66f937a958419a2c82786404e0d2e Mon Sep 17 00:00:00 2001 From: cflip Date: Tue, 20 Sep 2022 11:08:11 -0600 Subject: Validate CGI script paths before starting up the server This still doesn't throw up an error when attepting to run scripts without the leading './', but it's a start --- src/CGIScript.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/CGIScript.h') diff --git a/src/CGIScript.h b/src/CGIScript.h index a3e40fd..3ac00d9 100644 --- a/src/CGIScript.h +++ b/src/CGIScript.h @@ -14,6 +14,8 @@ public: std::string read_output(); + static void validate_path(const std::string& path); + private: FILE* m_pipe {}; const std::string& m_script_path; -- cgit v1.2.3