mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
same story for framework: ignore security exception if window.top is in a different security context
eg. because SiteMgr contact-form is running in an iframe
This commit is contained in:
parent
d1b963c98b
commit
f0925ef32c
@ -118,17 +118,19 @@
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||
}
|
||||
if (typeof window.framework != 'undefined')
|
||||
{
|
||||
// set in above try block
|
||||
}
|
||||
else if (window.top && typeof window.top.framework != 'undefined')
|
||||
try {
|
||||
if (typeof window.framework == 'undefined' && window.top && typeof window.top.framework != 'undefined')
|
||||
{
|
||||
window.framework = window.top.framework;
|
||||
if (debug) console.log('found framework object in top');
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if top is different security context / cross-origin
|
||||
}
|
||||
// if framework not found, but requested to check for it, redirect to cd=yes to create it
|
||||
else if (egw_script.getAttribute('data-check-framework') && !window.location.search.match(/[&?]cd=/))
|
||||
if (typeof window.framework == 'undefined' && egw_script.getAttribute('data-check-framework') &&
|
||||
!window.location.search.match(/[&?]cd=/))
|
||||
{
|
||||
window.location.search += window.location.search ? "&cd=yes" : "?cd=yes";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user