Skip to content

Commit

Permalink
filter expert: treat filter_regex false as False
Browse files Browse the repository at this point in the history
if the parameter
filter_regex: false
was set, the bot treated this as true
with this patch, false is treated as false
  • Loading branch information
sebix committed Jul 9, 2024
1 parent 4855ef9 commit bd6129f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#### Experts
- `intelmq.bots.experts.sieve.expert`:
- For `:contains`, `=~` and `!~`, convert the value to string before matching avoiding an exception. If the value is a dict, convert the value to JSON (PR#2500 by Sebastian Wagner).
- `intelmq.bots.experts.filter.expert`:
- Treat value `false` for parameter `filter_regex` as false (PR#2499 by Sebastian Wagner).

#### Outputs
- `intelmq.bots.outputs.misp.output_feed`: Handle failures if saved current event wasn't saved or is incorrect (PR by Kamil Mankowski).
Expand Down
2 changes: 1 addition & 1 deletion intelmq/bots/experts/filter/expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def init(self):
self.filter = False

self.regex = False
if self.filter_regex is not None:
if self.filter_regex and self.filter_regex:
self.regex = re.compile(self.filter_value)

self.time_filter = self.not_after is not None or self.not_before is not None
Expand Down

0 comments on commit bd6129f

Please sign in to comment.