5252import java .util .Set ;
5353import org .apache .commons .lang3 .StringUtils ;
5454import org .apache .log4j .Logger ;
55- import org .json .JSONObject ;
5655import org .json .JSONException ;
56+ import org .json .JSONObject ;
5757import org .parosproxy .paros .Constant ;
5858import org .parosproxy .paros .core .scanner .Alert ;
5959import 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