Skip to content

Attempt to solve snow clash when snow protected page opens itself#97

Merged
weizman merged 1 commit intomainfrom
fix-issue-81-2
Jun 15, 2023
Merged

Attempt to solve snow clash when snow protected page opens itself#97
weizman merged 1 commit intomainfrom
fix-issue-81-2

Conversation

@weizman
Copy link
Copy Markdown
Member

@weizman weizman commented Jun 15, 2023

Attempt to fix #81 (after ditching maybe a too complex idea on first attempt @ #82)

  • Change Snow so that for each intercepted window it sets the SNOW property to the new window.
  • Change package.json to add a line at the very beginning of Snow execution so that if prop SNOW already exists this means parent already applied Snow here and we don't have to continue.
  • This helps specifically in case the new realm loads the same page which loads a 2nd Snow instance. This tells the 2nd instance to bail and trust the parent instance.

@weizman weizman merged commit 142e7c5 into main Jun 15, 2023
@weizman weizman deleted the fix-issue-81-2 branch June 15, 2023 14:54
@weizman
Copy link
Copy Markdown
Member Author

weizman commented Jul 16, 2023

Seems that this solves a scenario where Snow code is loaded again in a same origin iframe, but doesn't cover a scenario where that instance of Snow is actually being called. fixed at #121

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.

Clash when snow protected page opens itself

1 participant