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

fix(respondable): ignore reflected messages from iframes #2134

Merged
merged 2 commits into from
Mar 27, 2020
Merged

Conversation

straker
Copy link
Contributor

@straker straker commented Mar 25, 2020

The code wasn't ignoring errant iframes from responding to our post messages with data we weren't expecting or to reflected messages. So to ensure we ignored these messages I assigned a unique id to each axe instance. When we receive a message we look to make sure the messages came from a different axe instance than the one listening to the event. That way we are guaranteed to only respond to messages sent from an axe instance inside an iframe.

Closes issue: #2127

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner March 25, 2020 22:14
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Clever fix. I like it!

@straker straker merged commit 3ab9f21 into develop Mar 27, 2020
@straker straker deleted the respondable branch March 27, 2020 16:53
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