Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-3295

Behaviour mapping REST endpoint doesn't validate the input

    XMLWordPrintableJSON

    Details

    • Sprint:
      Sprint 48, Sprint 49, Sprint 50
    • Critical Points:
      0.8

      Description

      If a POST request is made to this REST endpoint

      /rest/scriptrunner/behaviours/latest/admin/mapping
      

      with the following JSON body

      { "behaviourId": "1", "type": "project", "projectIds": ["null"], "issueTypeIds": ["10003"], "serviceDesk": "", "requestTypes": []}
      

      the endpoint returns an HTTP error 500 and the behaviours page is no longer able to load existing behaviours.

      There seems to be a missing validation of the projectIds field, it's not checking if the string value is actually a number.

        Attachments

          Activity

            People

            Assignee:
            jdavis Jenna Davis
            Reporter:
            dmondardo Damiano Mondardo [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: