mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
add onmessage handlers registered using global property as PostMessageEventHandler
This commit is contained in:
@@ -199,6 +199,11 @@ class PostMessageEventHandler extends Function {
|
|||||||
addEventListener.getArgument(0).mayHaveStringValue("message") and
|
addEventListener.getArgument(0).mayHaveStringValue("message") and
|
||||||
addEventListener.getArgument(1).getABoundFunctionValue(paramIndex).getFunction() = this
|
addEventListener.getArgument(1).getABoundFunctionValue(paramIndex).getFunction() = this
|
||||||
)
|
)
|
||||||
|
or
|
||||||
|
exists(DataFlow::Node rhs |
|
||||||
|
rhs = DataFlow::globalObjectRef().getAPropertyWrite("onmessage").getRhs() and
|
||||||
|
rhs.getABoundFunctionValue(paramIndex).getFunction() = this
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user