mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
fix security exeception if opener is from a different security context eg. LTI opening in a new window
This commit is contained in:
parent
b02936dddb
commit
450febb623
@ -238,18 +238,20 @@
|
||||
gen_time_async.text(egw.lang('async includes took %1s', (end_time-start_time)/1000));
|
||||
|
||||
// Make sure opener knows when we close - start a heartbeat
|
||||
if((popup || window.opener) && window.name != '')
|
||||
{
|
||||
// Timeout is 5 seconds, but it iks only applied(egw_utils) when something asks for the window list
|
||||
window.setInterval(function() {
|
||||
if (window.opener && window.opener.framework && typeof window.opener.framework.popup_idx(window) == 'undefined' && !egwIsMobile())
|
||||
{
|
||||
window.opener.framework.popups.push(window);
|
||||
}
|
||||
egw().storeWindow(this.egw_appName, this);
|
||||
}, 2000);
|
||||
try {
|
||||
if ((popup || window.opener && window.opener.framework) && window.name != '') {
|
||||
// Timeout is 5 seconds, but it iks only applied(egw_utils) when something asks for the window list
|
||||
window.setInterval(function () {
|
||||
if (window.opener && window.opener.framework && typeof window.opener.framework.popup_idx(window) == 'undefined' && !egwIsMobile()) {
|
||||
window.opener.framework.popups.push(window);
|
||||
}
|
||||
egw().storeWindow(this.egw_appName, this);
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||
}
|
||||
|
||||
// instanciate app object
|
||||
var appname = window.egw_appName;
|
||||
if (app && typeof app[appname] != 'object' && typeof app.classes[appname] == 'function')
|
||||
|
Loading…
Reference in New Issue
Block a user