Drop in_iframe and X-Frame-Options due to CSP, found while investigating #537

This commit is contained in:
the-djmaze 2022-09-30 14:01:57 +02:00
parent 54107ca937
commit 97cae30a51
6 changed files with 5 additions and 12 deletions

View file

@ -1,7 +1,5 @@
import ko from 'ko';
import { Settings } from 'Common/Globals';
import { logoutLink } from 'Common/Links';
import { i18nToNodes, initOnStartOrLangChange } from 'Common/Translator';
@ -23,7 +21,7 @@ export class AbstractApp {
const url = logoutLink();
if (location.href !== url) {
setTimeout(() => (Settings.app('inIframe') ? parent : window).location.href = url, 100);
setTimeout(() => location.href = url, 100);
} else {
rl.route.reload();
}

View file

@ -79,7 +79,7 @@ export class AppUser extends AbstractApp {
const currentTime = Date.now();
if (currentTime > (lastTime + interval + 1000)) {
Remote.request('Version',
iError => (100 < iError) && (Settings.app('inIframe') ? parent : window).location.reload(),
iError => (100 < iError) && location.reload(),
{ Version: Settings.app('version') }
);
}
@ -211,7 +211,7 @@ export class AppUser extends AbstractApp {
Remote.request('Logout', () => {
const customLogoutLink = Settings.app('customLogoutLink');
if (customLogoutLink) {
((window.parent && Settings.app('inIframe')) ? window.parent : window).location.href = customLogoutLink;
location.href = customLogoutLink;
} else {
rl.logoutReload()
}

2
dev/bootstrap.js vendored
View file

@ -39,7 +39,7 @@ export default App => {
},
reload: () => {
rl.route.root();
setTimeout(() => (Settings.app('inIframe') ? parent : window).location.reload(), 100);
setTimeout(() => location.reload(), 100);
},
off: () => hasher.active = false,
on: () => hasher.active = true