Commit 729ffa4
committed
fix: skip empty patterns in match_regex_list to prevent IndexError
match_regex_list indexes item_matcher[-1] to check for '$' suffix.
An empty string pattern causes IndexError: string index out of range.
This is reachable from CeleryIntegration.exclude_beat_tasks when
user configures an empty string in the pattern list.
Guard with if not item_matcher: continue before the index check.
Fixes #65041 parent 9996734 commit 729ffa4
2 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1736 | 1736 | | |
1737 | 1737 | | |
1738 | 1738 | | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
1739 | 1742 | | |
1740 | 1743 | | |
1741 | 1744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| |||
0 commit comments