Skip to content

Commit c097cdb

Browse files
committed
Final fixes
1 parent 8077985 commit c097cdb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/owasp/wrongsecrets/challenges/docker/Challenge35.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ private String getKey() {
7979
}
8080
}
8181

82+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
83+
value = "CIPHER_INTEGRITY",
84+
justification =
85+
"The scheme is bad without hmac, but we wanted to make it a bit more fun for you")
8286
private String decrypt(String ciphertext)
8387
throws InvalidAlgorithmParameterException,
8488
InvalidKeyException,
@@ -93,6 +97,6 @@ private String decrypt(String ciphertext)
9397

9498
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
9599
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
96-
return new String(cipher.doFinal(Base64.decode(ciphertext)));
100+
return new String(cipher.doFinal(Base64.decode(ciphertext.getBytes(StandardCharsets.UTF_8))));
97101
}
98102
}

0 commit comments

Comments
 (0)