Skip to content

Commit 74bc901

Browse files
committed
Remove exemptions, and untested usages of safevalues
1 parent 09bb82c commit 74bc901

File tree

8 files changed

+6
-23
lines changed

8 files changed

+6
-23
lines changed

packages/auth/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
{
77
"name": "tsec",
88
"reportTsecDiagnosticsOnly": true,
9-
"exemptionConfig": "./tsec-exemptions.json"
109
}
1110
]
1211
},

packages/auth/tsec-exemptions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/database-compat/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
{
99
"name": "tsec",
1010
"reportTsecDiagnosticsOnly": true,
11-
"exemptionConfig": "./tsec-exemptions.json"
1211
}
1312
]
1413
},

packages/database-compat/tsec-exemptions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/database/src/realtime/BrowserPollConnection.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
*/
1717

1818
import { base64Encode, isNodeSdk, stringify } from '@firebase/util';
19-
import { sanitizeHtml } from 'safevalues';
20-
import { safeDocument } from 'safevalues/dom';
2119

2220
import { RepoInfo, repoInfoConnectionURL } from '../core/RepoInfo';
2321
import { StatsCollection } from '../core/stats/StatsCollection';
@@ -477,7 +475,8 @@ export class FirebaseIFrameScriptHolder {
477475
const iframeContents = '<html><body>' + script + '</body></html>';
478476
try {
479477
this.myIFrame.doc.open();
480-
safeDocument.write(this.myIFrame.doc, sanitizeHtml(iframeContents));
478+
// FIXME: Use the safevalues library to sanitize this
479+
this.myIFrame.doc.write(iframeContents);
481480
this.myIFrame.doc.close();
482481
} catch (e) {
483482
log('frame writing exception');

packages/database/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
{
99
"name": "tsec",
1010
"reportTsecDiagnosticsOnly": true,
11-
"exemptionConfig": "./tsec-exemptions.json"
1211
}
1312
]
1413
},

packages/database/tsec-exemptions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/messaging/src/helpers/registerDefaultSw.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { trustedResourceUrl } from 'safevalues';
19-
import { safeServiceWorkerContainer } from 'safevalues/dom';
20-
21-
import { DEFAULT_SW_SCOPE } from '../util/constants';
18+
import { DEFAULT_SW_PATH, DEFAULT_SW_SCOPE } from '../util/constants';
2219
import { ERROR_FACTORY, ErrorCode } from '../util/errors';
2320

2421
import { MessagingService } from '../messaging-service';
@@ -27,10 +24,9 @@ export async function registerDefaultSw(
2724
messaging: MessagingService
2825
): Promise<void> {
2926
try {
30-
const container = navigator.serviceWorker;
31-
messaging.swRegistration = await safeServiceWorkerContainer.register(
32-
container,
33-
trustedResourceUrl`/firebase-messaging-sw.js`,
27+
// FIXME: Use safevalues to register the service worker with a sanitized URL.
28+
messaging.swRegistration = await navigator.serviceWorker.register(
29+
DEFAULT_SW_PATH,
3430
{
3531
scope: DEFAULT_SW_SCOPE
3632
}

0 commit comments

Comments
 (0)