@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.
@@ -1300,7 +1300,7 @@ var WebSocketConnection = /** @class */ (function () {
1300
1300
  }());
1301
1301
 
1302
1302
  var name = "@firebase/database";
1303
- var version = "1.0.6-canary.9cd3c1eca";
1303
+ var version = "1.0.6-canary.f58d48cd4";
1304
1304
 
1305
1305
  /**
1306
1306
  * @license
@@ -1939,6 +1939,8 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
1939
1939
  var iframeContents = '<html><body>' + script + '</body></html>';
1940
1940
  try {
1941
1941
  this.myIFrame.doc.open();
1942
+ // TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
1943
+ // library to sanitize the HTML in the iframeContents.
1942
1944
  this.myIFrame.doc.write(iframeContents);
1943
1945
  this.myIFrame.doc.close();
1944
1946
  }
@@ -2164,6 +2166,10 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
2164
2166
  var newScript_1 = _this.myIFrame.doc.createElement('script');
2165
2167
  newScript_1.type = 'text/javascript';
2166
2168
  newScript_1.async = true;
2169
+ // TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
2170
+ // at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
2171
+ // assign a sanitized trustedResourceURL to it. Since the URL must be a template string
2172
+ // literal, this could require some heavy refactoring.
2167
2173
  newScript_1.src = url;
2168
2174
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2169
2175
  newScript_1.onload = newScript_1.onreadystatechange =