Skip to content

Commit 51d29b8

Browse files
committed
Merge branch 'hotfix-1.1.1' into master
2 parents 6b7e0e2 + 4ee0ee9 commit 51d29b8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allprojects {
1010
apply plugin: 'java'
1111
group = 'org.zaproxy'
1212

13-
version '1.1.0'
13+
version '1.1.1'
1414
ext.versionBC = '1.0.0'
1515

1616
repositories {

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@ private HttpRequest buildZapRequest(
398398
}
399399
sb.append('&');
400400
}
401+
} else if (apiKey != null && !apiKey.isEmpty()) {
402+
// Send the API key even if there are no parameters,
403+
// older ZAP versions might need it as (query) parameter.
404+
sb.append('?');
405+
sb.append(encodeQueryParam(ZAP_API_KEY_PARAM));
406+
sb.append('=');
407+
sb.append(encodeQueryParam(apiKey));
401408
}
402409

403410
HttpRequest request = new HttpRequest(new URL(sb.toString()));

0 commit comments

Comments
 (0)