From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 04b315cc for ; Thu, 31 Jan 2019 18:00:54 -0500 (EST) Date: Thu, 31 Jan 2019 18:00:54 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Relax overzealous PATH_INFO validation. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- Relax overzealous PATH_INFO validation. URIs like https://man.openbsd.org/OpenBSD-2.2/cat1/cat.0 are still required to work because they result from apropos searches for old releases (up to 5.0) which used to install preformatted manual pages. Regression reported by jj@. Modified Files: -------------- mandoc: cgi.c Revision Data ------------- Index: cgi.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/cgi.c,v retrieving revision 1.164 retrieving revision 1.165 diff -Lcgi.c -Lcgi.c -u -p -r1.164 -r1.165 --- cgi.c +++ cgi.c @@ -1178,7 +1178,7 @@ parse_path_info(struct req *req, const c } /* Optional section. */ - if (strncmp(path, "man", 3) == 0) { + if (strncmp(path, "man", 3) == 0 || strncmp(path, "cat", 3) == 0) { path += 3; end = strchr(path, '/'); free(req->q.sec); -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv