Browse Source

fix(integrations): Invalid Incident ID (#20059)

Marcos Gaeta 4 years ago
parent
commit
dced446ed7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/sentry/api/bases/incident.py

+ 3 - 0
src/sentry/api/bases/incident.py

@@ -32,6 +32,9 @@ class IncidentEndpoint(OrganizationEndpoint):
         if not features.has("organizations:incidents", organization, actor=request.user):
             raise ResourceDoesNotExist
 
+        if not incident_identifier.isdigit():
+            raise ResourceDoesNotExist
+
         try:
             incident = kwargs["incident"] = Incident.objects.get(
                 organization=organization, identifier=incident_identifier