[4.2] - Portal page embedded on a website error

Posted by IramK on 01-Jul-2016 03:30

Hello,

I have a portal page that is embedded on a website in an iframe and I get the following security error:

Uncaught SecurityError: Blocked a frame with origin "https://subdomain.domain.com" from accessing a frame with origin "http://www.domain.com".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match. main.js:436

Note: I do not have any script that is trying to access information from the main website page where this iframe is embedded. 

Upon inspecting the main.js file at line 436, it is trying to access the rb.newui variable from the parent window which is not defined for portals and window.top (which is my website) definitely doesn't have that variable defined. This needs to be resolved going further as my portal page is not behaving correctly because of this security exception error. Let me know once this issue is fixed.

Cheers.

Iram

Posted by Mayank Kumar on 29-Nov-2016 05:13

Hi Iram,

This is the same-origin policy restriction due to different protocols. Please see below for more details.

developer.mozilla.org/.../Same-origin_policy

Could you please try by adding below script to the footer of your portal and let us know the outcome.

<script>

window.rbf_isNewUI=function(){return Boolean(window.rb&&window.rb.newui);};

</script>

Regards,

Mayank

All Replies

Posted by IramK on 16-Aug-2016 08:14

Hello guys,

Could someone confirm to me about this issue please?

Iram

Posted by Mayank Kumar on 24-Aug-2016 04:28

Hi Iram,

We are looking into it, will update soon.

Regards,

Mayank

Posted by IramK on 24-Nov-2016 05:33

Hello [mention:3f7b5b26a0194087bff1a3fc2ec50bf1:e9ed411860ed4f2ba0265705b8793d05] ,

Could you suggest a solution for this to me please? This post has been there for 3 months already.

Iram

Posted by Mayank Kumar on 29-Nov-2016 05:13

Hi Iram,

This is the same-origin policy restriction due to different protocols. Please see below for more details.

developer.mozilla.org/.../Same-origin_policy

Could you please try by adding below script to the footer of your portal and let us know the outcome.

<script>

window.rbf_isNewUI=function(){return Boolean(window.rb&&window.rb.newui);};

</script>

Regards,

Mayank

Posted by IramK on 29-Nov-2016 06:54
Hi Mayank,
 
That does seem to work and gets rid of the error message in the console, however, is this something that might break existing functionality on the portal?
 
Cheers,
Iram
 
Posted by Mohammed Siraj on 18-Dec-2016 23:07

This issue has been resolved on release branch. Fix will be available in the forthcoming release .

Once available, please consider reverting the above suggested client-side override employed as a workaround.

This thread is closed