Skip to content

Commit 50e5b8d

Browse files
authored
Releasing newer version 1.0.3 (#40)
1 parent ddaedec commit 50e5b8d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tasks.compileJava {
3333
dependsOn("spotlessApply")
3434
}
3535

36-
version = "1.0.2"
36+
version = "1.0.3"
3737
description = "Detect JWT requests and scan them to find related vulnerabilities"
3838

3939
zapAddOn {

src/main/java/org/zaproxy/zap/extension/jwt/attacks/SignatureAttack.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
import java.util.Set;
5353
import org.apache.commons.lang3.StringUtils;
5454
import org.apache.log4j.Logger;
55-
import org.json.JSONObject;
5655
import org.json.JSONException;
56+
import org.json.JSONObject;
5757
import org.parosproxy.paros.Constant;
5858
import org.parosproxy.paros.core.scanner.Alert;
5959
import org.parosproxy.paros.core.scanner.Plugin.AttackStrength;
@@ -148,17 +148,18 @@ private boolean executePubliclyWellKnownHMacSecretAttack() {
148148
}
149149

150150
/**
151-
* Mis-matching the token signature and token data, to verify if the JWT implementation verifies the signature properly.
152-
* A malicious user can exploit this vulnerability by supplying an arbitrary claim in the JWT payload to obtain
153-
* new privileges or impersonate other users
151+
* Mis-matching the token signature and token data, to verify if the JWT implementation verifies
152+
* the signature properly. A malicious user can exploit this vulnerability by supplying an
153+
* arbitrary claim in the JWT payload to obtain new privileges or impersonate other users
154154
*
155155
* @throws JWTException
156156
*/
157157
private boolean executeIncorrectSignatureAttack() {
158158
try {
159159
JWTHolder cloneJWTHolder = new JWTHolder(this.serverSideAttack.getJwtHolder());
160160
JSONObject payloadJSONObject = new JSONObject(cloneJWTHolder.getPayload());
161-
payloadJSONObject.put(INCORRECT_SIGNATURE_PAYLOAD_KEY, INCORRECT_SIGNATURE_PAYLOAD_VALUE);
161+
payloadJSONObject.put(
162+
INCORRECT_SIGNATURE_PAYLOAD_KEY, INCORRECT_SIGNATURE_PAYLOAD_VALUE);
162163
cloneJWTHolder.setPayload(payloadJSONObject.toString());
163164

164165
if (this.serverSideAttack.getJwtActiveScanRule().isStop()) {
@@ -176,8 +177,7 @@ private boolean executeIncorrectSignatureAttack() {
176177
return true;
177178
}
178179
return false;
179-
}
180-
catch (JSONException ex) {
180+
} catch (JSONException ex) {
181181
LOGGER.error("An error occurred while incorrect signature attack", ex);
182182
return false;
183183
}

0 commit comments

Comments
 (0)