Skip to content

Commit

Permalink
prevent keeweb from working in iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
antelle committed Aug 31, 2017
1 parent 4c33e60 commit 1ac6179
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Locale = require('./util/locale');
const ready = Launcher && Launcher.ready || $;

ready(() => {
if (FeatureDetector.isPopup && AuthReceiver.receive()) {
if (FeatureDetector.isPopup && AuthReceiver.receive() || FeatureDetector.isFrame) {
return;
}
loadMixins();
Expand Down
1 change: 1 addition & 0 deletions app/scripts/util/feature-detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const FeatureDetector = {
isMobile: MobileRegex.test(navigator.userAgent) || screen.width < MinDesktopScreenWidth,
isPopup: !!((window.parent !== window.top) || window.opener),
isStandalone: !!navigator.standalone,
isFrame: window.top !== window,
isBeta: window.location.href.toLowerCase().indexOf('beta.') > 0,
isSelfHosted: !isDesktop && !/^http(s?):\/\/((localhost:8085)|((app|beta)\.keeweb\.info))/.test(location.href),
needFixClicks: /Edge\/14/.test(navigator.appVersion),
Expand Down

2 comments on commit 1ac6179

@jhass
Copy link

@jhass jhass commented on 1ac6179 Feb 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, can we have a config setting for allowing this?

@antelle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, added an issue for this: #1108

Please sign in to comment.