The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Getting CSRF check failed

Zephyr QA
August 20, 2024

 

@Api(value = "TestCase File Import Resource API(s)", description = "Following section describes the rest resources pertaining to IssueImporterResouece")
@Path("importer")
@AnonymousSiteAccess
@DoesNotRequireXsrfCheck
@UnrestrictedAccess
@ZSFilterNameBinding
//@ResourceFilters(ZFJApiFilter.class)
public class IssueImporterResource {



@Inject
public IssueImporterResource(JiraAuthenticationContext authContext, IssueImporterResourceDelegate issueImportResourceDelegate) {
super();
this.authContext = authContext;
this.issueImportResourceDelegate = issueImportResourceDelegate;
}


@ApiOperation(value = "Import test cases into Jira from Excel File/s for a project", notes = "Import project test cases into Jira ")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("/fieldMapping")
@POST
public Response extractIssueMapping(@Context HttpServletRequest request) {
Response authRes = handleAuthRes();
if (authRes != null) return authRes;
if (ZephyrUtil.CheckMemoryUsage(authContext)) return JiraUtil.buildErrorResponse(Status.SERVICE_UNAVAILABLE, null,
authContext.getI18nHelper().getText("zephyr-je.service.temporary.unavailable.message")
, null);
Map<String, String> mapping = null;
try {
mapping = issueImportResourceDelegate.extractIssueMapping(request);
} catch (Exception e) {
return JiraUtil.buildErrorResponse(Response.Status.BAD_REQUEST, null, e.getMessage(), null);
}
return Response.status(Status.OK).entity(mapping).build();
}

}



When i am trying to run above API, I am getting 403 XSRF check failed. This is happening after upgradation of Jira 10. We are facing problem in fixing the above.
Can anyone please help me with the above?

We are using Java 17 only. 

 

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.