Skip to content

Commit

Permalink
fix(slack): ensure only one slash in tags (#5528)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Nov 22, 2024
1 parent 6df78fe commit 274aa0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dispatch/plugins/dispatch_slack/incident/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ def handle_tag_search_action(
}

if "/" in query_str:
# first check to make sure there's only one slash
if query_str.count("/") > 1:
ack()
return

tag_type, query_str = query_str.split("/")
filter_spec["and"].append(
{"model": "TagType", "op": "==", "field": "name", "value": tag_type}
Expand Down

0 comments on commit 274aa0f

Please sign in to comment.