From: Fabian Keil <fk@fabiankeil.de>
Date: Wed, 12 Aug 2015 10:33:13 +0000 (+0000)
Subject: get_actions(): Detect and reject parameters for parameter-less actions
X-Git-Tag: v_3_0_24~95
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@edit-actions-add-url-form?a=commitdiff_plain;h=c7da782c447e25210ca3a98a71e079b21fce7340;p=privoxy.git

get_actions(): Detect and reject parameters for parameter-less actions

Previously they were silently ignored.
---

diff --git a/actions.c b/actions.c
index b276abbe..a6854356 100644
--- a/actions.c
+++ b/actions.c
@@ -1,4 +1,4 @@
-const char actions_rcs[] = "$Id: actions.c,v 1.91 2013/12/24 13:35:07 fabiankeil Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 1.92 2013/12/24 13:35:23 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/actions.c,v $
@@ -518,7 +518,13 @@ jb_err get_actions(char *line,
             switch (action->value_type)
             {
             case AV_NONE:
-               /* ignore any option. */
+               if (value != NULL)
+               {
+                  log_error(LOG_LEVEL_ERROR,
+                     "Action %s does not take parameters but %s was given.",
+                     action->name, value);
+                  return JB_ERR_PARSE;
+               }
                break;
             case AV_ADD_STRING:
                {