You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/09/26 13:34:04 UTC

[GitHub] [cordova-plugin-inappbrowser] mschwrdtnr opened a new issue #541: Throws error if embedded in iframe with different origin

mschwrdtnr opened a new issue #541: Throws error if embedded in iframe with different origin
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/541
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   Embedded app in Iframe should load without errors
   
   
   ### What does actually happen?
   https://github.com/apache/cordova-plugin-inappbrowser/blob/c54d10052a42d5e68c76b53991c287a19cdce12c/www/inappbrowser.js#L24-L27
   this line throws the error
   ```bash
   polyfills.5574a41….js:1 Uncaught DOMException: Blocked a frame with origin "https://websiteB" from accessing a cross-origin frame.
       at https://websiteB/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js:24:42
       at https://websiteB/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js:125:3
       at e (https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:277)
       at https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:379
       at Object.t.mapModules (https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:12468)
       at https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:11719
       at a.r (https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:6215)
       at a.fire (https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:7764)
       at https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:11686
       at https://websiteB/cordova.29dc09fa9fc3a7aeb58c.js:1:14390
   ```
   
   As iframes are not allowed to access parent frames:
   https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe#Scripting
   
   ## Information
   This does occur if websiteA embeds websiteB and they do not share the same origin. 
   
   ### Environment, Platform, Device
   Since: https://github.com/apache/cordova-plugin-inappbrowser/pull/118
   
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   
   @paule96 @danielhabenicht
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org