Skip to content

Commit 95c6b3a

Browse files
DaanHooglandkishankavala
authored andcommitted
findbugs: decoding String using preferred Charset
1 parent ba618da commit 95c6b3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/network/NetworkModelImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ public List<String[]> generateVmData(String userData, String serviceOffering, St
23232323
throw new CloudRuntimeException("Unable to get MD5 MessageDigest", e);
23242324
}
23252325
md5.reset();
2326-
md5.update(password.getBytes());
2326+
md5.update(password.getBytes(StringUtils.getPreferredCharset()));
23272327
byte[] digest = md5.digest();
23282328
BigInteger bigInt = new BigInteger(1, digest);
23292329
String hashtext = bigInt.toString(16);

0 commit comments

Comments
 (0)