Skip to content

Commit 31b801d

Browse files
authored
Merge branch 'master' into fix-hasAttribute-error
2 parents e46b92e + d424349 commit 31b801d

File tree

6 files changed

+7
-26
lines changed

6 files changed

+7
-26
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Next Release
22
-------------
3+
1.8.0
4+
------
5+
* Remove activeACL set by referrer, as it breaks if you have your own URL in the ACL list
36

47
1.7.3
58
------

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Cerner Corporation
99
- Sam Milligan [@grneggandsam]
1010
- Supriti Yeotikar [@supritiy]
1111
- Cody Price [@dev-cprice]
12+
- Roxanne Calderon [@foxannefoxanne]
1213
- Yusuf Ali [@yusufali2205]
1314

1415
[@mhemesath]: https://github.com/mhemesath
@@ -20,4 +21,5 @@ Cerner Corporation
2021
[@grneggandsam]: https://github.com/grneggandsam
2122
[@supritiy]: https://github.com/supriticerner
2223
[@dev-cprice]: https://github.com/dev-cprice
24+
[@foxannefoxanne]: https://github.com/foxannefoxanne
2325
[@yusufali2205]: https://github.com/yusufali2205

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xfc",
3-
"version": "1.7.3",
3+
"version": "1.8.0",
44
"description": "A Cross Frame Container that handles securely embedding web content into a 3rd party domain",
55
"author": "Cerner Corporation",
66
"license": "Apache-2.0",

src/provider/application.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ class Application extends EventEmitter {
3333
// Resize for slow loading images
3434
document.addEventListener('load', this.imageRequestResize.bind(this), true);
3535

36-
// If the document referer (parent frame) origin is trusted, default that
37-
// to the active ACL;
38-
const parentOrigin = new URI(document.referrer).origin;
39-
if (this.acls.includes(parentOrigin)) {
40-
this.activeACL = parentOrigin;
41-
}
42-
4336
const self = this;
4437
this.JSONRPC = new JSONRPC(
4538
self.send.bind(self),

test/application.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,6 @@ describe('Application', () => {
2525
application.init({acls, secret, onReady});
2626
global.document = oldDocument;
2727

28-
it ("sets activeACL to document referrer if in ACL", () => {
29-
expect(application.activeACL).to.eq(acls[0]);
30-
});
31-
32-
it ("doesn't set activeACL to document referrer if not in ACL", () => {
33-
const insecureApp = new Application();
34-
global.document = {
35-
referrer: 'http://evilsite.com',
36-
createElement: document.createElement.bind(document),
37-
addEventListener: () => console.log('mock addEventListener')
38-
};
39-
insecureApp.init({acls, secret, onReady});
40-
global.document = oldDocument;
41-
42-
expect(insecureApp.activeACL).to.equal(undefined);
43-
});
44-
4528
it("sets application's acls to the given acls", () => {
4629
expect(application.acls).to.eql(acls);
4730
});

0 commit comments

Comments
 (0)