Show the 404 CGI page if cgi_send_user_manual() is called while local user manual...
authorFabian Keil <fk@fabiankeil.de>
Sun, 7 Mar 2010 12:07:51 +0000 (12:07 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 7 Mar 2010 12:07:51 +0000 (12:07 +0000)
cgisimple.c

index a60de9b..c01ae09 100644 (file)
@@ -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) */