Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-81369

Jira double encodes already encoded URL characters causing the webhook to send to wrong destination

    XMLWordPrintable

Details

    Description

      Issue Summary

      Jira is encoding an already encoded URL

      Steps to Reproduce

      Using Power Automate as an example for this bug report -

      1. 1. Go to https://flow.microsoft.com/  and sign in to your Power Automate account.
         
      2. Click on the "Create" button to create a new flow.
         
      3. Search for and select the "When an HTTP request is received" trigger.
      4. Give your trigger a name and define the input parameters that you want to receive from Jira. For example, you might want to include the Jira issue key or the updated field values.
      5. Once you have defined the input parameters, click on "Create" to create the trigger.
      6. Next, you need to configure Jira to send an HTTP request to the Power Automate flow whenever an issue is updated. To do this, you can create a Jira webhook.
      7. In Jira, go to the project or issue where you want to set up the webhook.
      8. Navigate to the "Webhooks" section or "Automation" section, depending on your Jira version.
      9. Add a new webhook and provide the following details:
        1.URL: Enter the URL of the HTTP request trigger in your Power Automate flow.
        2.Events: Select the event that suits your requirement.
        3.Payload: Configure the payload to include the necessary information you want to send to the Power Automate flow. Save the webhook configuration in Jira.
         
      1. Go back to Power Automate, and your flow should now be triggered whenever a Jira issue is deleted.
      2. Add the necessary actions or steps in your flow to process the updated Jira issue data as per your requirements.
         
        I was able to investigate and compare the HTTP incoming request received to the URL, in order to trigger the flow.
         
        I am able to see an HTTP client failure when the user agent is Atlassian. Comparing the target URL from Postman and Jira, I can see the following difference:
        Postman: https://www.azure.com:443/workflows/-/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2ftriggers>  
        Jira: https://www.azure.com:443/workflows/-/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%252Ftriggers

      If you look into Jira URL, it seems that is adding %252F to the sp property.

      Expected Results

      For encoding not to be double encoded

      Actual Results

      As per the conversation with Microsoft Support, the sp property is being double encoded -

      Here's the decoding of these characters
      %252F -> %2F
      %2F -> /

      Workaround

      The customer had to decode the URL before it was re-encoded by Jira.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fc5d288272d6 Jimmy Bell
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: