From 6b42878b8cea7a3d3ea8ad261a0e51f480d051e4 Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 20 Jan 2015 17:31:17 +0100 Subject: [PATCH] better recognition of embedded-recursive substitution to repeat interpolation --- fail2ban/server/action.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fail2ban/server/action.py b/fail2ban/server/action.py index bfd2adc2..70b3eb7e 100644 --- a/fail2ban/server/action.py +++ b/fail2ban/server/action.py @@ -407,9 +407,11 @@ class CommandAction(ActionBase): done.append(found_tag) m = t.search(value, m.start()) #logSys.log(5, 'TAG: %s, newvalue: %s' % (tag, value)) - # if was substituted, check again later: + # was substituted? if tags[tag] != value: - repFlag = True + # check again later if embedded-recursive substitution: + if value.startswith('<') and value.endswith('>'): + repFlag = True tags[tag] = value if not repFlag: break