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

Limit oidc check session iframe postMessage hook scope #124

Conversation

longsleep
Copy link
Collaborator

In certain cases the check session iframe might receive postMessage events from itself. This might sound strange and normally does not happen expect in cases where other scripts run in the scope of this iframe (e.g. getting injected by a browser extension). This for example happens with the 1Password browser extension which seems to communicate with itself via postMessage to itself and causes a high CPU load as an event busy loop is created.

With this change, our own processing of events is only done if the event source is not the own window (which is the only case we care about anyways).

In certain cases the check session iframe might receive postMessage
events from itself. This might sound strange and normally does not
happen expect in cases where other scripts run in the scope of this
iframe (e.g. getting injected by a browser extension). This for example
happens with the 1Password browser extension which seems to communicate
with itself via postMessage to itself and causes a high CPU load as an
event busy loop is created.

With this change, our own processing of events is only done if the event
source is not the own window (which is the only case we care about
anyways).
@longsleep longsleep merged commit 831daa9 into libregraph:master Feb 19, 2024
1 check passed
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.

1 participant