-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2949ccd
commit 36362d8
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,11 @@ | |
<title>LiveCodes</title> | ||
<script> | ||
window.addEventListener('message', function (event) { | ||
if (event.data.content) { | ||
if ( | ||
event.origin === window.location.origin && | ||
event.source === parent && | ||
event.data.content | ||
) { | ||
document.write(event.data.content); | ||
Check failure Code scanning / SonarCloud DOM updates should not lead to cross-site scripting (XSS) attacks Critical
Change this code to prevent execution of arbitrary client-side code. See more on SonarCloud
|
||
document.close(); | ||
} | ||
|