Consider setStartTLSRequired for Apache SimpleEmail

This commit is contained in:
Tony Torralba
2021-06-30 12:22:48 +02:00
parent baffb0ed89
commit 2d1278ece5
3 changed files with 63 additions and 32 deletions

View File

@@ -33,7 +33,7 @@ predicate isInsecureMailPropertyConfig(VarAccess propertiesVarAccess) {
* Holds if `ma` enables TLS/SSL with Apache Email.
*/
predicate enablesEmailSsl(MethodAccess ma) {
ma.getMethod().hasName("setSSLOnConnect") and
ma.getMethod().hasName(["setSSLOnConnect", "setStartTLSRequired"]) and
ma.getMethod().getDeclaringType() instanceof ApacheEmail and
ma.getArgument(0).(BooleanLiteral).getBooleanValue() = true
}