Skip to content

Commit 018cd95

Browse files
committed
Add Atlassian CSRF check header
1 parent 3a2187c commit 018cd95

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.assertthat.plugins</groupId>
77
<artifactId>assertthat-bdd-standalone</artifactId>
8-
<version>1.9.9</version>
8+
<version>1.9.10</version>
99
<name>assertthat-bdd-standalone</name>
1010
<description>AssertThat BDD Jira plugin client standalone</description>
1111
<url>http://www.assertthat.com</url>

src/main/java/com/assertthat/plugins/standalone/APIUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public File download(File targetDir, String mode, String jql,
9393
}
9494
httpBuilder.addQueryParameter("numbered", String.valueOf(isNumbered));
9595
Request.Builder request = new Request.Builder().url(httpBuilder.build()).addHeader("User-Agent",
96-
USER_AGENT);
96+
USER_AGENT).addHeader("X-Atlassian-Token", "no-check");
9797
Response response = client.newCall(request.build()).execute();
9898
if (!response.isSuccessful()) {
9999
throw new IOException("Failed to download file: " + response);
@@ -126,6 +126,7 @@ public Long upload(Long runId, String runName, String filePath, String type, Str
126126
.url(httpBuilder.build())
127127
.post(requestBody)
128128
.addHeader("User-Agent", USER_AGENT)
129+
.addHeader("X-Atlassian-Token", "no-check")
129130
.build();
130131
Response response = client.newCall(request).execute();
131132
if (response.isSuccessful()) {

0 commit comments

Comments
 (0)