-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: untainted prototype access in Angular #1633
base: master
Are you sure you want to change the base?
fix: untainted prototype access in Angular #1633
Conversation
🦋 Changeset detectedLatest commit: 7facb49 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
i think also fixes #1627 |
customer testing shows this isn't the whole picture... will keep digging |
I'm sceptical about adding it to |
the change to head didn't fix it... or didn't fix it enough 🤣 i'm hoping the customer is still willing to test more - i think i'll try polling for the content window next to see if it's not ready when we try to read from it it may all be a red herring here ofc 🙈 |
Hi! Exists any news related to this fix? I had the same issue with dynamic iframes in my react app |
I need to update this PR. In the end I went back to how rrweb v1 used to do this, since Angular Zone advertises unpatched versions in a known location Safari was perfectly capable of giving me a mutation observer from an iframe but I could never get that observer to trigger anything |
return defaultObj.prototype as BasePrototypeCache[T]; | ||
const isUntainted = isUntaintedAccessors && isUntaintedMethods; | ||
// we're going to default to what we do have | ||
let impl: BasePrototypeCache[T] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i kept the reorganization here since I did find it difficult to track what was happening previously
we're seeing multiple reports of issues with the mutation observer in Safari
this is most often in relation to Angular apps
considering we recently improved detection of need to load untainted observers when using Angular
when testing locally I can always see that Safari gives a mutation observer from an iframe - but I never see that mutation observer notify of any mutations.
this PR moves back to the approach that it turns out rrweb had in V1
The Angular zone stores unpatched things that it has patched in a discoverable location. This checks for that and if it is present uses it.
This means that in practice Angular won't trigger safari to load a mutation observer from an iframe and so (in testing) reliably captures mutations in safari for angular apps