mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: add window.name as DOM-based remote flow source
This commit is contained in:
@@ -199,4 +199,18 @@ private class PostMessageEventParameter extends RemoteFlowSource {
|
||||
override string getSourceType() {
|
||||
result = "postMessage event"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An access to `window.name`, which can be controlled by the opener of the window,
|
||||
* even if the window is opened from a foreign domain.
|
||||
*/
|
||||
private class WindowNameAccess extends RemoteFlowSource {
|
||||
WindowNameAccess() {
|
||||
this = DataFlow::globalVarRef("name")
|
||||
}
|
||||
|
||||
override string getSourceType() {
|
||||
result = "Window name"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user