From ec87f837d4ead511a94466661b8afff643e0d207 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 3 Jun 2014 10:33:17 +0000 Subject: [PATCH] Let +external-filter{} only filter "text" by default Given that this is what +filter{} does, it's probably the expected behaviour. --- filters.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/filters.c b/filters.c index 7b18e352..31f528e7 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.182 2014/06/02 06:22:20 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.183 2014/06/03 10:29:40 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -2252,7 +2252,9 @@ char *execute_content_filters(struct client_state *csp) content = (content_filter != NULL) ? (*content_filter)(csp) : NULL; #ifdef FEATURE_EXTERNAL_FILTERS - if (!list_is_empty(csp->action->multi[ACTION_MULTI_EXTERNAL_FILTER])) + if ((csp->content_type & CT_TEXT) && + (csp->rlist != NULL) && + !list_is_empty(csp->action->multi[ACTION_MULTI_EXTERNAL_FILTER])) { struct list_entry *filtername; size_t size = (size_t)csp->content_length; @@ -2654,7 +2656,8 @@ int content_requires_filtering(struct client_state *csp) */ if ((csp->content_type & CT_TEXT) && (csp->rlist != NULL) && - (!list_is_empty(csp->action->multi[ACTION_MULTI_FILTER]))) + (!list_is_empty(csp->action->multi[ACTION_MULTI_FILTER]) || + !list_is_empty(csp->action->multi[ACTION_MULTI_EXTERNAL_FILTER]))) { return TRUE; } @@ -2664,7 +2667,7 @@ int content_requires_filtering(struct client_state *csp) return TRUE; } - return (!list_is_empty(csp->action->multi[ACTION_MULTI_EXTERNAL_FILTER])); + return FALSE; } -- 2.39.2