Add a patch that fixes a problem with some quoted chars and cgibins.

Patch provided by mrg -- thanks!
Bump PKGREVISION.
This commit is contained in:
wiz 2002-10-26 20:01:46 +00:00
parent f2417194ce
commit 0ba39c9fcf
3 changed files with 36 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.27 2002/09/13 09:30:06 mrg Exp $
# $NetBSD: Makefile,v 1.28 2002/10/26 20:01:46 wiz Exp $
#
DISTNAME= bozohttpd-5.15
PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tar.bz2

View file

@ -1,4 +1,5 @@
$NetBSD: distinfo,v 1.20 2002/09/13 09:30:06 mrg Exp $
$NetBSD: distinfo,v 1.21 2002/10/26 20:01:46 wiz Exp $
SHA1 (bozohttpd-5.15.tar.bz2) = bb3d549e7d07c38af514868fa08e0bd8cbb31c82
Size (bozohttpd-5.15.tar.bz2) = 21750 bytes
SHA1 (patch-aa) = e03b3e2ceae208298a8201e9e0aff40624828ad7

View file

@ -0,0 +1,32 @@
$NetBSD: patch-aa,v 1.6 2002/10/26 20:01:46 wiz Exp $
--- bozohttpd.c.orig Fri Sep 13 11:02:14 2002
+++ bozohttpd.c
@@ -1577,13 +1577,26 @@ fix_url_percent(request)
http_req *request;
{
char *s, *t, buf[3];
+ char *url, *end; /* if end is not-zero, we don't translate beyond that */
+
+ url = request->url;
+ if (strncmp(url + 1, CGIBIN_PREFIX, CGIBIN_PREFIX_LEN) == 0) {
+ end = strchr(request->url + CGIBIN_PREFIX_LEN, '?');
+ } else
+ end = 0;
/* fast forward to the first % */
- if ((s = strchr(request->url, '%')) == NULL)
+ if ((s = strchr(url, '%')) == NULL)
return;
t = s;
do {
+ if (end && s >= end) {
+ debug((DEBUG_OBESE, "fu_%%: past end, filling out.."));
+ while (*s)
+ *t++ = *s++;
+ break;
+ }
debug((DEBUG_OBESE, "fu_%%: got s == %%, s[1]s[2] == %c%c",
s[1], s[2]));
if (s[1] == '\0' || s[2] == '\0')