Skip to content

Commit 18f8c69

Browse files
committed
satisfy the signature of HostnameRegexpSig, which doesn't understand RegExpSink
1 parent d5029c9 commit 18f8c69

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

python/ql/lib/semmle/python/security/regexp/HostnameRegex.qll

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ private import codeql.regex.HostnameRegexp as Shared
1212
private module Impl implements Shared::HostnameRegexpSig<TreeImpl> {
1313
class DataFlowNode = DataFlow::Node;
1414

15-
class RegExpPatternSource = Regexp::RegExpPatternSource;
15+
class RegExpPatternSource extends DataFlow::Node instanceof Regexp::RegExpPatternSource {
16+
/**
17+
* Gets a node where the pattern of this node is parsed as a part of
18+
* a regular expression.
19+
*/
20+
DataFlow::Node getAParse() { result = super.getAParse() }
21+
22+
/**
23+
* Gets the root term of the regular expression parsed from this pattern.
24+
*/
25+
TreeImpl::RegExpTerm getRegExpTerm() { result = super.getRegExpTerm() }
26+
}
1627
}
1728

1829
import Shared::Make<TreeImpl, Impl>

0 commit comments

Comments
 (0)