mirror of
https://github.com/github/codeql.git
synced 2026-04-22 07:15:15 +02:00
JS: Move AngularJSTemplateUrlSink to ClientSideUrlRedirection query
This is not perfect but at least we can be consistent about keeping URLs-that-lead-to-xss in the same query
This commit is contained in:
@@ -237,6 +237,15 @@ module ClientSideUrlRedirect {
|
||||
override predicate isXssSink() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `templateUrl` member of an AngularJS directive.
|
||||
*/
|
||||
private class AngularJSTemplateUrlSink extends Sink {
|
||||
AngularJSTemplateUrlSink() { this = any(AngularJS::CustomDirective d).getMember("templateUrl") }
|
||||
|
||||
override predicate isXssSink() { any() }
|
||||
}
|
||||
|
||||
private class SinkFromModel extends Sink {
|
||||
SinkFromModel() { this = ModelOutput::getASinkNode("url-redirection").asSink() }
|
||||
}
|
||||
|
||||
@@ -653,10 +653,11 @@ module TaintedPath {
|
||||
}
|
||||
|
||||
/**
|
||||
* A `templateUrl` member of an AngularJS directive.
|
||||
* DEPRECATED. This is no longer seen as a path-injection sink. It is tentatively handled
|
||||
* by the client-side URL redirection query for now.
|
||||
*/
|
||||
class AngularJSTemplateUrlSink extends Sink, DataFlow::ValueNode {
|
||||
AngularJSTemplateUrlSink() { this = any(AngularJS::CustomDirective d).getMember("templateUrl") }
|
||||
deprecated class AngularJSTemplateUrlSink extends DataFlow::ValueNode instanceof Sink {
|
||||
AngularJSTemplateUrlSink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user