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

Silent refresh event listener does not check messages for origin #1138

Closed
R3ZL opened this issue Sep 16, 2021 · 1 comment
Closed

Silent refresh event listener does not check messages for origin #1138

R3ZL opened this issue Sep 16, 2021 · 1 comment
Labels
bug For tagging faulty or unexpected behavior.

Comments

@R3ZL
Copy link

R3ZL commented Sep 16, 2021

Describe the bug
Event listener process login operation without checking the origin of message. It is potential vulnerability issue.

Code location: oauth-service.ts —> setupSilentRefreshEventListener

image

Expected behavior
setupSilentRefreshEventListener should check the message origin and do try login only if message origin is expected origin.

Explanation
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#security_concerns

@jeroenheijmans jeroenheijmans added the bug For tagging faulty or unexpected behavior. label Sep 18, 2021
@manfredsteyer
Copy link
Owner

There is now a new config property checkOrigin. If you set it to true, the origin will be checked too. The default value is false, but one of the next versions of this lib will default to true for the sake of security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For tagging faulty or unexpected behavior.
Projects
None yet
Development

No branches or pull requests

3 participants