-
Notifications
You must be signed in to change notification settings - Fork 9
[MOB-8515]: allow-popups-to-escape-sandbox #380
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update the README for this change and make a disclaimer for this config. I imagine we'll need a security review on this and possibly legal?
src/inapp/utils.ts
Outdated
@@ -284,9 +284,14 @@ const generateSecuredIFrame = () => { | |||
iframe.setAttribute('id', 'iterable-iframe'); | |||
// allow-popups and allow-top-navigation is to enable links for Safari since the iframe will block | |||
// event handlers on elements in it preventing our custom link handling | |||
console.log({ p: process.env }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove console log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ope, good catch.
@ts-nguyen Security is aware of this and will review this today. As for the README, I've alerted docs about this PR so will let them determine what changes are needed. |
@@ -9,6 +9,8 @@ function getParsedEnv() { | |||
...env.parsed, | |||
VERSION: version, | |||
IS_EU_ITERABLE_SERVICE: process.env.IS_EU_ITERABLE_SERVICE || false, | |||
DANGEROUSLY_ALLOW_JS_POPUP_EXECUTION: | |||
process.env.DANGEROUSLY_ALLOW_JS_POPUP_EXECUTION || false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do a strict check against true
given the effect of the changes this value controls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the webpack config to allow the env variable to be passed in. made the check a const and made it stricter here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left an additional suggestion for a safer check!
@@ -8,3 +8,6 @@ | |||
|
|||
# Convenience variable to automatically set the login email during testing. | |||
# [email protected] | |||
|
|||
# IS_EU_ITERABLE_SERVICE=false | |||
# DANGEROUSLY_ALLOW_JS_POPUP_EXECUTION=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this at the sample app level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the package is installed via package manager, devs don't have access to modify the .env
file of the web-sdk so they need to be able to pass this value in from their own .env
. This just serves as an example of how to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this a config change!
* Information about allow-popups-to-escape-sandbox * SDK version information * Update README.md * Update README.md --------- Co-authored-by: Mitch Prewitt <[email protected]>
JIRA Ticket(s) if any
Description
See https://googlechrome.github.io/samples/allow-popups-to-escape-sandbox/
Test Steps