diff options
author | Martin Blapp <mbr@FreeBSD.org> | 2002-01-23 19:18:40 +0000 |
---|---|---|
committer | Martin Blapp <mbr@FreeBSD.org> | 2002-01-23 19:18:40 +0000 |
commit | 79b8f028047f81174a2db4f72957c434db5b681b (patch) | |
tree | 5050fe0e0f7f1c420c1dfcd3bf8d8e3973b93db2 /www/mod_frontpage | |
parent | 02b3446facc576c23a4b99dccbba90b7d241d81e (diff) | |
download | ports-79b8f028047f81174a2db4f72957c434db5b681b.tar.gz ports-79b8f028047f81174a2db4f72957c434db5b681b.zip |
Stop segfaulting on commandline, if the calling user has UID of httpd.
Check if the HTTP environment is existent.
Notes
Notes:
svn path=/head/; revision=53651
Diffstat (limited to 'www/mod_frontpage')
-rw-r--r-- | www/mod_frontpage/files/patch-fpexec.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/www/mod_frontpage/files/patch-fpexec.c b/www/mod_frontpage/files/patch-fpexec.c new file mode 100644 index 000000000000..a026fb84cfab --- /dev/null +++ b/www/mod_frontpage/files/patch-fpexec.c @@ -0,0 +1,26 @@ +--- fpexec.c.orig Sun Dec 9 23:35:39 2001 ++++ fpexec.c Wed Jan 23 20:10:14 2002 +@@ -247,6 +247,11 @@ + cidx++; + + for (ep = environ; *ep && cidx < AP_ENVBUF-1; ep++) { ++ if (*ep == NULL) { ++ log_err("HTTP header mismatch, stop\n"); ++ exit(120); ++ } ++ + if (!strncmp(*ep, "HTTP_", 5) || !strncmp(*ep,"HTTPS",5) + || !strncmp(*ep,"SSL_",4)) { + cleanenv[cidx] = *ep; +@@ -327,6 +332,11 @@ + exit(103); + } + #endif /*_OSD_POSIX*/ ++ ++ if (target_uname == NULL) { ++ log_err("invalid target user name: (NULL)\n"); ++ exit(105); ++ } + + if (!strncmp("~", target_uname, 1)) { + target_uname++; |