diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-09 19:58:36 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-09 19:58:36 +0000 |
commit | 83eb0bf972913c3f32bb3c29ab718b5af3a96e39 (patch) | |
tree | 366b748b38a0ce9c16335bedbfcb5158961260bd | |
parent | b6a822a4dc76589a8b7fd22e49ed0514c5c971e4 (diff) | |
download | mandoc-83eb0bf972913c3f32bb3c29ab718b5af3a96e39.tar.gz |
Do not treat PATH_INFO as a complete path if it doesn't contain
a manpath. For example, this makes http://man.openbsd.org/mandoc
work as expected.
Bug reported by tb@, reminded by Svyatoslav Mishyn.
-rw-r--r-- | cgi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1026,7 +1026,7 @@ main(void) if (*path != '\0') { parse_path_info(&req, path); - if (access(path, F_OK) == -1) + if (req.q.manpath == NULL || access(path, F_OK) == -1) path = ""; } else if ((querystring = getenv("QUERY_STRING")) != NULL) parse_query_string(&req, querystring); |