Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent Jira webhook from encoding query parameters

Roy Drenker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2019

When creating a web hook from a Microsoft Flow integration, the callback URL includes query parameters with encoded characters, for example:

 

https://prod-35.westus.logic.azure.com/workflows/some-id/triggers/jira/versions/0839/run?api-version=2016-06-01&sp=%2Ftriggers%2Ftracker%2Fversions%2F0839

 

When Jira fires the webhook, it is re-encoding the query parameter values, which is causing the integration to fail;  for example, the URL shown above is being sent out as follows:

https://prod-35.westus.logic.azure.com/workflows/some-id/triggers/jira/versions/0839/run?api-version=2016-06-01&sp=%252Ftriggers%252Ftracker%252Fversions%252F0839

 

Note that the "%2F" in the original URL is being substituted for "%252F";  seems the Jira is attempting to encode the query parameter values.

 

Is there any way to prevent this behavior?  This is preventing us from using Jira webhooks with Microsoft Flow.

 

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2019

Hi Roy,

Is it possible instead of using the %2F encoded character in your URL to instead just use the / character in it's place?   So instead of making the call to

https://jira.example.com/workflows/some-id/triggers/jira/versions/0839/run?api-version=2016-06-01&sp=%2Ftriggers%2Ftracker%2Fversions%2F0839

You can make the call to

https://jira.example.com/workflows/some-id/triggers/jira/versions/0839/run?api-version=2016-06-01&sp=/triggers/tracker/versions/0839

This way, Jira might still adjust the encoding of those characters later on, but if it did do so, it wouldn't try to convert the % symbol into the %25 character, instead it could just do the / into a single %2F value instead.

Or is the use of that character there somehow invalid to use in Microsoft Flow?

Justin Paterson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 3, 2019

Hi Andrew,

Unfortunately Microsoft Flow is responsible for creating the URL - we have no control over it.  Also, Flow is responsible for subscribing / unsubscribing to the webhook whenever a new workflow is created that uses JIRA.

 

We have a workaround right now;  we login to JIRA as an admin, and then from the plugins/servlet/webhooks,  we manually update the URL as you suggest.  This allows us to get past this issue, however its a pain as someone in our company needs to contact a JIRA administrator whenever they create a new workflow using the JIRA connector.

 

The only real solution in my mind is for JIRA to either stop trying to encode the callback URL, or at the very least to have a flag which would prevent this behavior.

Like Berti likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events