fix: handle empty string in match_regex_list to prevent IndexError by wahajahmed010 · Pull Request #6509 · getsentry/sentry-python
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: getsentry#6504 Signed-off-by: Wahaj Ahmed <wahaj.ahmed010@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters