Skip to content

Core 954 window help menu - #103

Merged
TylerZeroMaster merged 25 commits into
mainfrom
CORE-954-window-help-menu
Oct 20, 2025
Merged

Core 954 window help menu#103
TylerZeroMaster merged 25 commits into
mainfrom
CORE-954-window-help-menu

Conversation

@TylerZeroMaster

@TylerZeroMaster TylerZeroMaster commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Comment thread src/components/HelpMenu/hooks.ts Outdated

const handleMessage = (e: MessageEvent) => {
const { source, data: { type } } = e;
if (source !== popup.current) return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also enforce that the origin matches the popup origin?

@TylerZeroMaster TylerZeroMaster Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jivey I am not sure we can check that if the popup is cross-origin. I am getting this error when I try :

Uncaught SecurityError: Failed to read a named property 'origin' from 'Window': Blocked a frame with origin "..." from accessing a cross-origin frame.

Granted, I think this would share the same origin as the chat embed popup in a real situation (but there's no guarantee of that since the path is passed in).

Is there a reason to compare the origin too? I would have thought that comparing the objects directly would be most secure. It's effectively checking if the message is from the window the help menu opened, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No I think you're right, I don't remember what my thought/concern here was.

@TylerZeroMaster
TylerZeroMaster requested a review from jivey October 13, 2025 14:33
@TylerZeroMaster
TylerZeroMaster merged commit 80cba97 into main Oct 20, 2025
4 of 5 checks passed
@TylerZeroMaster
TylerZeroMaster deleted the CORE-954-window-help-menu branch October 20, 2025 16:08
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