@firebase/database 1.0.6-canary.9cd3c1eca → 1.0.6-canary.f58d48cd4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +7 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +7 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +7 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +7 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +6 -0
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +7 -1
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +8 -7
package/dist/index.esm5.js
CHANGED
|
@@ -5,7 +5,7 @@ import { stringify, jsonEval, contains, assert, isNodeSdk, stringToByteArray, Sh
|
|
|
5
5
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
6
6
|
|
|
7
7
|
var name = "@firebase/database";
|
|
8
|
-
var version = "1.0.6-canary.
|
|
8
|
+
var version = "1.0.6-canary.f58d48cd4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -1576,6 +1576,8 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
1576
1576
|
var iframeContents = '<html><body>' + script + '</body></html>';
|
|
1577
1577
|
try {
|
|
1578
1578
|
this.myIFrame.doc.open();
|
|
1579
|
+
// TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
|
|
1580
|
+
// library to sanitize the HTML in the iframeContents.
|
|
1579
1581
|
this.myIFrame.doc.write(iframeContents);
|
|
1580
1582
|
this.myIFrame.doc.close();
|
|
1581
1583
|
}
|
|
@@ -1801,6 +1803,10 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
1801
1803
|
var newScript_1 = _this.myIFrame.doc.createElement('script');
|
|
1802
1804
|
newScript_1.type = 'text/javascript';
|
|
1803
1805
|
newScript_1.async = true;
|
|
1806
|
+
// TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
|
|
1807
|
+
// at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
|
|
1808
|
+
// assign a sanitized trustedResourceURL to it. Since the URL must be a template string
|
|
1809
|
+
// literal, this could require some heavy refactoring.
|
|
1804
1810
|
newScript_1.src = url;
|
|
1805
1811
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1806
1812
|
newScript_1.onload = newScript_1.onreadystatechange =
|