File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
cpp/ql/src/semmle/code/cpp/security Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,16 @@ string getASecureAlgorithmName() {
5959 * contain an algorithm that is known to be secure.
6060 */
6161string getSecureAlgorithmRegex ( ) {
62- // algorithms usually appear in names surrounded by characters that are not
63- // alphabetical characters in the same case. This handles the upper and lower
64- // case cases
65- result = "(^|.*[^A-Z])" + getASecureAlgorithmName ( ) + "([^A-Z].*|$)"
66- or
67- // for lowercase, we want to be careful to avoid being confused by camelCase
68- // hence we require two preceding uppercase letters to be sure of a case
69- // switch, or a preceding non-alphabetic character
70- result = "(^|.*[A-Z]{2}|.*[^a-zA-Z])" + getASecureAlgorithmName ( ) .toLowerCase ( ) + "([^a-z].*|$)"
62+ result =
63+ // algorithms usually appear in names surrounded by characters that are not
64+ // alphabetical characters in the same case. This handles the upper and lower
65+ // case cases
66+ "(^|.*[^A-Z])(" + strictconcat ( getASecureAlgorithmName ( ) , "|" ) + ")([^A-Z].*|$)" + "|" +
67+ // for lowercase, we want to be careful to avoid being confused by camelCase
68+ // hence we require two preceding uppercase letters to be sure of a case
69+ // switch, or a preceding non-alphabetic character
70+ "(^|.*[A-Z]{2}|.*[^a-zA-Z])(" + strictconcat ( getASecureAlgorithmName ( ) .toLowerCase ( ) , "|" ) +
71+ ")([^a-z].*|$)"
7172}
7273
7374/**
You can’t perform that action at this time.
0 commit comments