JIRA doesn't correctly create a session token when you access the <Jira URL>/projects/<Project key>/issues page prior to login. If you directly click on the create button and try to attach an attachment a missing token error is thrown. This is rectified by cancelling the issue creation or navigating to the dashboard.
- Log off from Jira
- Go to <Jira URL>/projects/<Project key>/issues
- after login automatic redirected to <Jira url>/projects/<Project key>/issues/<Issue key>?filter=allopenissues
- Click create button
- Try to attach a file
Attachment is attached.
xsrf-token-addition filter was moved before Dispatcher so in case request is flushed, it will have all necessary XSRF headers.
Cancel the issue creation and try again.