=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -p -r1.88 -r1.89 --- mandoc/cgi.c 2014/07/25 18:20:39 1.88 +++ mandoc/cgi.c 2014/07/25 19:37:34 1.89 @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.88 2014/07/25 18:20:39 schwarze Exp $ */ +/* $Id: cgi.c,v 1.89 2014/07/25 19:37:34 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -1086,7 +1086,8 @@ main(void) if (NULL != (querystring = getenv("QUERY_STRING"))) http_parse(&req, querystring); - if ( ! validate_manpath(&req, req.q.manpath)) { + if ( ! (NULL == req.q.manpath || + validate_manpath(&req, req.q.manpath))) { pg_error_badrequest( "You specified an invalid manpath."); return(EXIT_FAILURE);