=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/cgi.c,v retrieving revision 1.91 retrieving revision 1.92 diff -c -r1.91 -r1.92 *** src/usr.bin/mandoc/cgi.c 2017/03/18 16:48:07 1.91 --- src/usr.bin/mandoc/cgi.c 2017/04/19 00:59:32 1.92 *************** *** 1,4 **** ! /* $OpenBSD: cgi.c,v 1.91 2017/03/18 16:48:07 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: cgi.c,v 1.92 2017/04/19 00:59:32 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze *************** *** 1067,1073 **** if (*path != '\0') { parse_path_info(&req, path); ! if (req.q.manpath == NULL || access(path, F_OK) == -1) path = ""; } else if ((querystring = getenv("QUERY_STRING")) != NULL) parse_query_string(&req, querystring); --- 1067,1074 ---- if (*path != '\0') { parse_path_info(&req, path); ! 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);