diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-31 23:00:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-01-31 23:00:23 +0000 |
commit | a0f03465ebb77a4dc5d647d7b5d4f721d1127873 (patch) | |
tree | 1e8e0a01ccbe1724c8afea8a8e7490b47da50f8d | |
parent | 1fb324c74addc6d44298e987ea42e5d66981c0a3 (diff) | |
download | mandoc-a0f03465ebb77a4dc5d647d7b5d4f721d1127873.tar.gz mandoc-a0f03465ebb77a4dc5d647d7b5d4f721d1127873.tar.zst mandoc-a0f03465ebb77a4dc5d647d7b5d4f721d1127873.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@.
-rw-r--r-- | cgi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.164 2018/12/30 00:49:54 schwarze Exp $ */ +/* $Id: cgi.c,v 1.165 2019/01/31 23:00:23 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016, 2017, 2018 Ingo Schwarze <schwarze@usta.de> @@ -1178,7 +1178,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); |