Closed mr-const closed 8 years ago
We have the same issue. I opened an issue (https://jira.atlassian.com/browse/BSERV-7914) at atlassian, but they mean that the addon needs to be updated:
If the add-on is making any requests into Bitbucket Server which are not declared to accept a content-type of application/json, then the X-Atlassian-Token: no-check header will need to be set. See https://confluence.atlassian.com/bitbucketserver/how-to-update-your-add-on-779302412.html#Howtoupdateyouradd-on-XSRFProtectionenabledbydefault for more information.
Can confirm the same issue since yesterday on our system.
Same here, if we can help, we'd be lucky to provide you with more details.
The fix for this should be to change the Content-Type on the POST request being to "application/json" .
I can see the request is currently using Content-Type: text/html
Since Bitbucket Server 4.0, we have enabled XSRF prevention by default on all Rest resources.
More information on this can be found here: https://confluence.atlassian.com/bitbucketserver/how-to-update-your-add-on-779302412.html#Howtoupdateyouradd-on-XSRFProtectionenabledbydefault
Hopefully passing in contentType: "application/json" to the POST method in jenkins-pr-trigger-button.js should set the content-type header for that request.
Is there already a workaround or something to get this going again? Until the official fix is ready.
I opened PR #162 to fix this. Seems to work in my local testing.
We tried PR #162, works for us too.
We're also stuck with this issue at the moment - it would be great to get a new release.
I'm also affected by this and would like to add that I'm currently running a snapshot build of #162 just fine. I'd appreciate a release as well, though.
I would also appreciate if there would be a new release with this PR in it. To have our normal dev workflow back up and running.
Any chance to see this going into a release soon? We have the problem as well.
I'm sorry all that it's taken a while to get this resolved. I've merged the PR, will test locally, and push a new release over the weekend.
@mikesir87 any update on pushing a release? I know people here really want us to update the plugin :)
@itay Thanks for checking in and giving a smiley, although I'm sure it's been frustrating waiting for the update. I was hoping to do it earlier, but got caught up with the holidays.
BUT... the release has just been pushed to the Marketplace, so it should be showing up for you shortly. Thanks!
Once it's been confirmed in the deployed version of the code, I'll close this issue.
I can confirm that it works with version 3.0.1.
Thanks @mikesir87 It seems the new version is on Marketplace, and it works.
You're welcome all! I'm sorry it took so long to get out there.
I can also confirm it working. Thanks a lot @mikesir87 !
I've upgraded stash to bitbucket 4.0 and stash webhook plugin to bitbucket webhook. After that PR's 'trigger build' is broken. When I create first PR, trigger build works as expected, but when I press that button after PR update (i.e. added new commit) - it stucks. I checked button press with web debugger and got following POST error: