From: Fabian Keil Date: Sun, 7 Mar 2010 12:07:51 +0000 (+0000) Subject: Show the 404 CGI page if cgi_send_user_manual() is called while local user manual... X-Git-Tag: v_3_0_17~182 X-Git-Url: http://www.privoxy.org/gitweb/show-status?a=commitdiff_plain;h=fecef4ea125ac93e7a0bd832b5f270a2ab5dfdaf;p=privoxy.git Show the 404 CGI page if cgi_send_user_manual() is called while local user manual delivery is disabled. --- diff --git a/cgisimple.c b/cgisimple.c index a60de9b8..c01ae091 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.95 2009/09/06 14:18:35 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.96 2009/12/16 08:36:39 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -9,7 +9,7 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.95 2009/09/06 14:18:35 fabian * Functions declared include: * * - * Copyright : Written by and Copyright (C) 2001-2008 the SourceForge + * Copyright : Written by and Copyright (C) 2001-2010 the * Privoxy team. http://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -690,6 +690,13 @@ jb_err cgi_send_user_manual(struct client_state *csp, assert(rsp); assert(parameters); + if (0 == strncmpic(csp->config->usermanual, "http://", 7)) + { + log_error(LOG_LEVEL_CGI, "Request for local user-manual " + "received while user-manual delivery is disabled."); + return cgi_error_404(csp, rsp, parameters); + } + if (!parameters->first) { /* requested http://p.p/user-manual (without trailing slash) */