File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -235,22 +235,12 @@ string getAnInsecureHashAlgorithmName() {
235235 result = "MD5"
236236}
237237
238- private string rankedInsecureAlgorithm ( int i ) {
239- result = rank [ i ] ( string name | insecureAlgorithm ( name , _) )
240- }
241-
242- private string insecureAlgorithmString ( int i ) {
243- i = 1 and result = rankedInsecureAlgorithm ( i )
244- or
245- result = rankedInsecureAlgorithm ( i ) + "|" + insecureAlgorithmString ( i - 1 )
246- }
247-
248238/**
249239 * Gets the regular expression used for matching strings that look like they
250240 * contain an algorithm that is known to be insecure.
251241 */
252242string getInsecureAlgorithmRegex ( ) {
253- result = algorithmRegex ( insecureAlgorithmString ( max ( int i | exists ( rankedInsecureAlgorithm ( i ) ) ) ) )
243+ result = algorithmRegex ( concat ( string name | insecureAlgorithm ( name , _ ) | name , "|" ) )
254244}
255245
256246/** Gets the reason why `input` is an insecure algorithm, if any. */
You can’t perform that action at this time.
0 commit comments