mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Fix handling of turbogears' 'expose' decorator.
This commit is contained in:
@@ -19,14 +19,10 @@ class TurboGearsControllerMethod extends Function {
|
||||
TurboGearsControllerMethod() {
|
||||
aTurboGearsControllerClass().getPyClass() = this.getScope() and
|
||||
decorator = this.getADecorator().getAFlowNode() and
|
||||
/* Is decorated with @expose or @expose(path) */
|
||||
/* Is decorated with @expose() or @expose(path) */
|
||||
(
|
||||
decorator.(NameNode).getId() = "expose"
|
||||
or
|
||||
decorator.(CallNode).getFunction().(NameNode).getId() = "expose"
|
||||
or
|
||||
decorator.refersTo(ModuleObject::named("tg").getAttribute("expose"))
|
||||
or
|
||||
decorator.refersTo(_, ModuleObject::named("tg").getAttribute("expose"), _)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user