@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.standalone.js
CHANGED
|
@@ -1935,6 +1935,8 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
1935
1935
|
var iframeContents = '<html><body>' + script + '</body></html>';
|
|
1936
1936
|
try {
|
|
1937
1937
|
this.myIFrame.doc.open();
|
|
1938
|
+
// TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
|
|
1939
|
+
// library to sanitize the HTML in the iframeContents.
|
|
1938
1940
|
this.myIFrame.doc.write(iframeContents);
|
|
1939
1941
|
this.myIFrame.doc.close();
|
|
1940
1942
|
}
|
|
@@ -2160,6 +2162,10 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
2160
2162
|
var newScript_1 = _this.myIFrame.doc.createElement('script');
|
|
2161
2163
|
newScript_1.type = 'text/javascript';
|
|
2162
2164
|
newScript_1.async = true;
|
|
2165
|
+
// TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
|
|
2166
|
+
// at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
|
|
2167
|
+
// assign a sanitized trustedResourceURL to it. Since the URL must be a template string
|
|
2168
|
+
// literal, this could require some heavy refactoring.
|
|
2163
2169
|
newScript_1.src = url;
|
|
2164
2170
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2165
2171
|
newScript_1.onload = newScript_1.onreadystatechange =
|