From 94e190c63af9977dfed1a33a8ed924e6de17388c Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 11 May 2022 13:47:51 +0100 Subject: [PATCH] C++: getClassAndName. --- cpp/ql/src/Security/CWE/CWE-611/XXE.ql | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-611/XXE.ql b/cpp/ql/src/Security/CWE/CWE-611/XXE.ql index 2bb8839932e..3ce422c89b1 100644 --- a/cpp/ql/src/Security/CWE/CWE-611/XXE.ql +++ b/cpp/ql/src/Security/CWE/CWE-611/XXE.ql @@ -227,10 +227,7 @@ class SetFeatureTranformer extends XXEFlowStateTranformer { * The `DOMLSParser.getDomConfig` function. */ class GetDomConfig extends Function { - GetDomConfig() { - this.hasName("getDomConfig") and - this.getDeclaringType() instanceof DomLSParserClass - } + GetDomConfig() { this.getClassAndName("getDomConfig") instanceof DomLSParserClass } } /** @@ -238,8 +235,7 @@ class GetDomConfig extends Function { */ class DomConfigurationSetParameter extends Function { DomConfigurationSetParameter() { - this.hasName("setParameter") and - this.getDeclaringType().getName() = "DOMConfiguration" + this.getClassAndName("setParameter").getName() = "DOMConfiguration" } }