Embedded viewer Firefox Strict ETP mode - "Sorry, this browser version is not supported."#213
Open
thisismattmiller wants to merge 2 commits into
Open
Embedded viewer Firefox Strict ETP mode - "Sorry, this browser version is not supported."#213thisismattmiller wants to merge 2 commits into
thisismattmiller wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I came across this issue while trying to use embedded viewer on a Library of Congress site:
It only happens on Firefox browsers internally at LC, because we have Strict ETP security enabled and blocks all cross site cookies. This also prevents any localstorage interaction via embedded iframes, which due to some code in the viewer triggers an error that prevents the viewer payload from being injected and breaks the viewer.
The error flow on
babel/pt/web/firebird/pageviewer.xsl:window.firebirdErrorHandlerwhich has this if statement:Which has a code typo
event.filename.indexOf('/firebird/dist/' != -1)which should beevent.filename.indexOf('/firebird/dist/') != -1('/firebird/dist/' != -1)will always == true which meansevent.filename.indexOf('/firebird/dist/' != -1)will == -1 which will cause the if statement to trigger throwing the popup alert and I think also stop execution so this code is never run and the viewer doesn't work.It works fine on chrome because it does security differently, but does break it on Firefox IF that Strict ETP is enabled. Anyway thought I would suggest a change that should prevent it in this very specific case.
Thanks for all your work,
-Matt Miller