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 cross origin iframe bugs #1093

Merged
merged 3 commits into from
Jan 16, 2023
Merged

Fix cross origin iframe bugs #1093

merged 3 commits into from
Jan 16, 2023

Conversation

YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented Jan 16, 2023

Bug 1

image

Recorder generates error data while recording some websites are integrated with stripe
These websites will usually have an iframe with src "https://js.stripe.com/v3/m-outer-xxx.html"

Reason

The Stripe site has nested iframes and they all have a message proxy to forward messages from child iframe to parent iframe. So cross-origin rrweb messages are also forwarded by this hidden proxy and it makes the recorder generate redundant iframe full snapshots.
digram

Fix

Add an origin property to each cross-origin rrweb message for the parent frame to check the integrity of messages.

Bug 2

fixes #1077
As Justin's suggestion #1077 (comment), I disabled packing for inter-iframe communication.

@YunFeng0817 YunFeng0817 added bug Something isn't working 2.0 labels Jan 16, 2023
1. bugfix
2. add test case
3. add rrweb-all.js to the result of command: bundle:browser
4. make puppeteer headless in CI by default to increase the speed and stability
@YunFeng0817 YunFeng0817 changed the title Fix cross origin iframe bug Fix cross origin iframe bugs Jan 16, 2023
Copy link
Contributor

@Juice10 Juice10 left a comment

Choose a reason for hiding this comment

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

Great stuff @Mark-Fenng!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: recordCrossOriginIframes: true does not work with pack/unpack fn
2 participants