X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/c0fb3f2307fc80d2d85cc1ab16c3fd262bba49a6..5325cd99ac197268bd26af0ee01d0539cb78cb61:/cgi.c?ds=sidebyside diff --git a/cgi.c b/cgi.c index da638dcf..eeccd4ea 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.153 2017/03/18 16:48:24 schwarze Exp $ */ +/* $Id: cgi.c,v 1.154 2017/04/19 01:00:03 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -1073,7 +1073,8 @@ main(void) if (*path != '\0') { parse_path_info(&req, path); - if (req.q.manpath == NULL || access(path, F_OK) == -1) + if (req.q.manpath == NULL || req.q.sec == NULL || + *req.q.query == '\0' || access(path, F_OK) == -1) path = ""; } else if ((querystring = getenv("QUERY_STRING")) != NULL) parse_query_string(&req, querystring);