From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 9 Sep 2023 06:55:33 +0000 (+0200)
Subject: Add missing client-body-tagger data to the action_type_info[] struct
X-Git-Tag: v_4_0_0~146
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/static/developer-manual/faq/@default-cgi@show-url-info?a=commitdiff_plain;h=e32d03e0;p=privoxy.git

Add missing client-body-tagger data to the action_type_info[] struct

... so lookups based on the action index work correctly again.

Prevents assertion failures or segfaults when trying to edit
an action file with the CGI editor.

The type of failure depended on whether or not assertions
were enabled and on whether or not Privoxy had been compiled
with FEATURE_EXTERNAL_FILTERS.

Regression introduced in Privoxy 3.0.34.

Patch submitted by Aaron Li in #940.
---

diff --git a/cgiedit.c b/cgiedit.c
index ff14dbbc..ab05d79b 100644
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -252,6 +252,12 @@ static const struct action_type_info action_type_info[] =
       "client-body-filter-all", "client_body_filter_all",
       "P", "CLIENT-BODY-FILTER"
    },
+   {
+      ACTION_MULTI_CLIENT_BODY_TAGGER,
+      "client-body-tagger-params", "client-body-tagger",
+      "client-body-tagger-all", "client_body_tagger_all",
+      "Q", "CLIENT-BODY-TAGGER"
+   },
    {
       ACTION_MULTI_ADD_HEADER,
       "add-header-params", "add-header",