Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sentry_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,6 +1740,8 @@ def match_regex_list(
return False

for item_matcher in regex_list:
if not item_matcher:
continue
if not substring_matching and item_matcher[-1] != "$":
item_matcher += "$"

Expand Down
2 changes: 2 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ def test_include_source_context_when_serializing_frame(include_source_context):
["some-string", ["some.*"], True],
["some-string", ["Some"], False], # we do case sensitive matching
["some-string", [".*string$"], True],
["some-string", [""], False], # empty string in list should not crash
["", [""], False], # both empty should not crash
],
)
def test_match_regex_list(item, regex_list, expected_result):
Expand Down