diff options
author | 2019-01-31 23:00:18 +0000 | |
---|---|---|
committer | 2019-01-31 23:00:18 +0000 | |
commit | 955967fc604c74a6da0c4d71fd0b5d21de38a2fd (patch) | |
tree | 07b43d72a764690d63d24efad4151bd6106ed796 /usr.bin/mandoc/cgi.c | |
parent | Map SHT_LLVM_LINKER_OPTIONS to string (diff) | |
download | wireguard-openbsd-955967fc604c74a6da0c4d71fd0b5d21de38a2fd.tar.xz wireguard-openbsd-955967fc604c74a6da0c4d71fd0b5d21de38a2fd.zip |
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/cgi.c')
-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); |