mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
include startsWith/endsWith checks in js/missing-origin-check
This commit is contained in:
@@ -61,4 +61,10 @@ function is_valid_origin(origin) {
|
||||
warn("invalid origin: " + origin);
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
}
|
||||
|
||||
window.onmessage = event => { // OK - the check is OK
|
||||
if ("https://www.example.com".startsWith(event.origin)) {
|
||||
// do something
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user