rafaelweingartner commented on a change in pull request #2902: Add checksum
sanity validation on template registration
URL: https://github.com/apache/cloudstack/pull/2902#discussion_r225191153
##########
File path:
utils/src/main/java/org/apache/cloudstack/utils/security/DigestHelper.java
##########
@@ -93,4 +95,33 @@ public static boolean isAlgorithmSupported(String checksum)
{
}
return true;
}
+
+ /**
+ * Checks if the algorithm prefix is provided on the checksum
+ */
+ public static void checksumSanity(String checksum) {
Review comment:
what about a method name with an action that can describe what the method is
doing. E.G. `validateChecksumString`, `checkSanityOfTemplateHashes`, and so on.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services