HackAttack / bamboo-github-status

A plugin for Atlassian Bamboo that reports build results to the GitHub status API
MIT License
22 stars 23 forks source link

Adding default values fails when "XSRF Protection" is enabled #12

Closed alindeman closed 8 years ago

alindeman commented 8 years ago

If "XSRF Protection" is enabled in Bamboo -> Configuration -> Security -> Security Settings, this plugin causes an error when viewing the Miscellaneous build config tab for the first time

java.lang.IllegalStateException: XSRF: A mutative operation was attempted on DefaultChain within a non-mutative HTTP request: https://bamboo.example/chain/admin/config/editChainMiscellaneous.action?buildKey=PDT-PJHM

It's not allowed to call mutative operations on GET requests (e.g., savePlanAndDefinition) when XSRF Protection is enabled.

Is there a way to fix the bug that this code was intended to fix without mutating on a GET request?

HackAttack commented 8 years ago

Crap. I will release a new version that reverts this change, then investigate. This has been a tricky bug—working with the UI layer is not particularly intuitive.

HackAttack commented 8 years ago

Reverted the defective fix and reopened the original bug.