Skip to content

fix(user-activity-broadcaster): determine the correct origin to postMessage #874

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheSharpieOne
Copy link
Collaborator

Previously this would change origin from "essentials" to "apps" assuming that all essentials applications are iframed into the apps domain. This is not always the case anymore as environments have migrated.
Really, this didn't validate the domain, any domain that contained "essentials" or "apps" could be used, including something like "essentials.malicious.com" (which would postMessage to "apps.malicious.com")
Also, not 100% sure why there was the case for the opposite of "apps" to "essentials" since the seems like it could never be the case.

With this change, it will now validate the iframe's parent domain before it uses it as the origin. This works for when essentials is iframed into apps as well as when essentials is iframed into essentials and any time this is iframed into an availity domain.

owolfhu1
owolfhu1 previously approved these changes Jul 16, 2025
@owolfhu1 owolfhu1 dismissed their stale review July 16, 2025 15:43

taking another look

@TheSharpieOne TheSharpieOne force-pushed the fix/user-activity-broadcaster branch 2 times, most recently from 9d84120 to 52c4bf7 Compare July 16, 2025 16:29
@TheSharpieOne TheSharpieOne force-pushed the fix/user-activity-broadcaster branch from 52c4bf7 to 2813f6b Compare July 16, 2025 16:31
@TheSharpieOne TheSharpieOne requested a review from owolfhu1 July 16, 2025 17:36
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