diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-01-31 23:00:19 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-01-31 23:00:19 +0000 |
commit | 8b8064473f5bf1402a016105841a145edab13d2c (patch) | |
tree | 3a7fd26f748e6301fe49c8607ed3294476e7deef /usr.bin/mandoc | |
parent | 5e964288f9518e68a9b19a32e8eb9aab495aa3ba (diff) |
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@.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/cgi.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017, 2018 Ingo Schwarze <schwarze@usta.de> @@ -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); |