File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/org/owasp/wrongsecrets/challenges/docker Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments