From 8b8064473f5bf1402a016105841a145edab13d2c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 31 Jan 2019 23:00:19 +0000 Subject: 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@. --- usr.bin/mandoc/cgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/mandoc') diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index 79766a0b5d4..d783e3c1fb5 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgi.c,v 1.102 2018/12/30 00:48:47 schwarze Exp $ */ +/* $OpenBSD: cgi.c,v 1.103 2019/01/31 23:00:18 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017, 2018 Ingo Schwarze @@ -1172,7 +1172,7 @@ parse_path_info(struct req *req, const char *path) } /* 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); -- cgit v1.2.3