Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message validations #11

Merged
merged 1 commit into from
May 2, 2024
Merged

Add message validations #11

merged 1 commit into from
May 2, 2024

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented May 2, 2024

Motivation

To validate the window post messages to avoid parsing messages that the code doesn't know what to do with them.

Changes

  • Add validations in the handle function.
  • Add comments to explain where the validation comes from.

Tests

  • Added a test with "malicious" window messages from another origin and check that those don't affect the regular flow.

@lmuntaner lmuntaner marked this pull request as ready for review May 2, 2024 11:33
Copy link

@frederikrothenberger frederikrothenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor comment.

@lmuntaner lmuntaner merged commit 34d3cef into main May 2, 2024
6 checks passed
@lmuntaner lmuntaner deleted the 05-02-add_message_validations branch May 2, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants