Commit b710e13
Wahaj Ahmed
fix: handle empty string in match_regex_list to prevent IndexError
When match_regex_list receives a pattern list containing an empty string,
item_matcher[-1] raises IndexError because empty strings have no characters.
This is reachable from the Celery integration when CeleryIntegration.exclude_beat_tasks
contains an empty string.
Fix: skip empty strings in the iteration loop before the [-1] access.
Fixes: #6504
Signed-off-by: Wahaj Ahmed <wahaj.ahmed010@gmail.com>1 parent 5ce5d1a commit b710e13
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1740 | 1740 | | |
1741 | 1741 | | |
1742 | 1742 | | |
| 1743 | + | |
| 1744 | + | |
1743 | 1745 | | |
1744 | 1746 | | |
1745 | 1747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| 559 | + | |
| 560 | + | |
559 | 561 | | |
560 | 562 | | |
561 | 563 | | |
| |||
0 commit comments