You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Michael Stillwell <mi...@yoyo.cc.monash.edu.au> on 1997/04/21 02:20:01 UTC

general/433: cgi script specified with ErrorDocument handling other user's 404 errors

>Number:         433
>Category:       general
>Synopsis:       cgi script specified with ErrorDocument handling other user's 404 errors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Apr 20 17:20:01 1997
>Originator:     mist@yoyo.cc.monash.edu.au
>Organization:
apache
>Release:        1.2b7
>Environment:
OSF1 yoyo.cc.monash.edu.au V3.2 148 alpha
gcc
>Description:
I'm using 

ErrorDocument 404 /cgi-bin/nph-cgiwrap/mist/error/nph-404.cgi

in my .htaccess to provide custom 404 error handling.  This was
working fine until we upgraded to 1.2b7.  Now it appears to be handling
other users' 404 errors, but only some of them, and intermittently.

The nph-404.cgi script in question is a simple /bin/sh script which
outputs some html that incorporates the $SERVER_NAME, etc. environment
variables.  It also logs the error to a file with:

log='/home/mist/scratch/logs/error_log'
/usr/local/bin/lockfile "$log.lock"
echo "${REMOTE_HOST:-$REMOTE_ADDR} [`date`] $REDIRECT_URL $HTTP_REFERER" >> $log
rm -f $log.lock

The log file now contains lines like:

ww-td27.proxy.aol.com [Wed Apr 16 11:54:57 EST 1997] /~mist/Humour/:Pizza.html 
nyc-ny16-05.ix.netcom.com [Wed Apr 16 23:23:11 EST 1997] /~dominanc/graphics/m3.
gif http://www.geocities.com/Hollywood/9177/index.html
proxy.aha.ru [Wed Apr 16 23:24:14 EST 1997] /~frestylz/mj/news.html http://yoyo.
cc.monash.edu.au/~frestylz/mj/main.html
www-afb.proxy.aol.com [Thu Apr 17 00:00:39 EST 1997] /~adem/QCODE.html http://ww
w.dumblond.demon.co.uk/index2.html
193.121.147.13 [Thu Apr 17 01:45:38 EST 1997] /~mattyw/wwwboard/backgrnd.gif htt
p://yoyo.cc.monash.edu.au/~mattyw/wwwboard/wwwboard.html
index1-gui.server.virgin.net [Thu Apr 17 11:36:04 EST 1997] /~fungiman 
aurora.cc.monash.edu.au [Thu Apr 17 11:56:14 EST 1997] /~mist/asdfasfd 
j13.inktomi.com [Thu Apr 17 15:28:19 EST 1997] /~mist/Smackerels/SantaClaus.ht^M

The URLs beginning with /~mist/ are mine, and should generate
404 errors.  The others should also generate 404 errors, but I don't
see why my ErrorDocument is handling them.

Unfortunately I have not been able to reproduce this fault.  Our server
handles almost 25,000 404 errors a week, and my script would seem to be
handling about 100 of those.  It does seem to be handling all of my 404
errors.

The problem may be something to do with cgiwrap but this has not been 
changed recently.  Maybe some weird interaction between the two?
>How-To-Repeat:
Problem occurs intermittently.

The ErrorDocument script can be activated correctly with a URL like

http://yoyo.cc.monash.edu.au/~mist/asdf
>Fix:
No
>Audit-Trail:
>Unformatted: