Skip to content

Commit

Permalink
fix xss issue reported by @realansgar, regression from 3dade61
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Jan 30, 2024
1 parent 5d131ce commit 16f6633
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/notes/notes.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin/notes/notes.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions plugin/notes/speaker-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ <h4 class="label">Notes</h4>

window.addEventListener( 'message', function( event ) {

// Validate the origin of all messages to avoid parsing messages
// that aren't meant for us. Ignore when running off file:// so
// that the speaker view continues to work without a web server.
if( window.location.origin !== event.origin && window.location.origin !== 'file://' ) {
return
}

clearTimeout( connectionTimeout );
connectionStatus.style.display = 'none';

Expand Down

0 comments on commit 16f6633

Please sign in to comment.