Socket
Socket
Sign inDemoInstall

xfc

Package Overview
Dependencies
6
Maintainers
13
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.0 to 1.6.1

3

CHANGELOG.md
Next Release
-------------
1.6.1
------
* Added href attribute pattern check before unloading.

@@ -5,0 +8,0 @@ 1.6.0

12

lib/provider/application.js

@@ -363,8 +363,10 @@ 'use strict';

value: function unload() {
// Need this line because IE11 & some safari trigger onbeforeunload despite presence of download attribute
if (document.activeElement && document.activeElement.hasAttribute('download')) {
return;
// These patterns trigger unload events but don't actually unload the page
var protocols = /^(tel|mailto|fax|sms|callto):/;
var element = document.activeElement;
if (!element || !(element.hasAttribute('download') || protocols.test(element.href))) {
this.JSONRPC.notification('unload');
this.trigger('xfc.unload');
}
this.JSONRPC.notification('unload');
this.trigger('xfc.unload');
}

@@ -371,0 +373,0 @@ }]);

{
"name": "xfc",
"version": "1.6.0",
"version": "1.6.1",
"description": "A Cross Frame Container that handles securely embedding web content into a 3rd party domain",

@@ -5,0 +5,0 @@ "author": "Cerner Corporation",

@@ -209,3 +209,2 @@ import { EventEmitter } from 'events';

this.JSONRPC.handle(event.data);
}

@@ -212,0 +211,0 @@

@@ -263,8 +263,10 @@ import JSONRPC from 'jsonrpc-dispatch';

unload() {
// Need this line because IE11 & some safari trigger onbeforeunload despite presence of download attribute
if (document.activeElement && document.activeElement.hasAttribute('download')) {
return;
// These patterns trigger unload events but don't actually unload the page
const protocols = /^(tel|mailto|fax|sms|callto):/;
const element = document.activeElement;
if (!element || !(element.hasAttribute('download') || protocols.test(element.href))) {
this.JSONRPC.notification('unload');
this.trigger('xfc.unload');
}
this.JSONRPC.notification('unload');
this.trigger('xfc.unload');
}

@@ -271,0 +273,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc