From 12c632efd0d89b7906dc8ceb6ae99d516509843c Mon Sep 17 00:00:00 2001 From: ISE Hardening Date: Thu, 14 Nov 2024 01:18:38 -0800 Subject: [PATCH] internal change PiperOrigin-RevId: 696429510 Change-Id: I884d4f66d40c20d42cc2c3bb79fb689dcb31820a --- .../ban_document_writeln_calls.ts | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/common/rules/dom_security/ban_document_writeln_calls.ts b/common/rules/dom_security/ban_document_writeln_calls.ts index 4ad101a..d0b6f92 100644 --- a/common/rules/dom_security/ban_document_writeln_calls.ts +++ b/common/rules/dom_security/ban_document_writeln_calls.ts @@ -17,7 +17,6 @@ import { ErrorCode, PatternKind, } from '../../third_party/tsetse/rules/conformance_pattern_rule'; -import {overridePatternConfig} from '../../third_party/tsetse/util/pattern_config'; import {TRUSTED_HTML} from '../../third_party/tsetse/util/trusted_types_configuration'; import {RuleConfiguration} from '../../rule_configuration'; @@ -31,16 +30,14 @@ export class Rule extends ConformancePatternRule { static readonly RULE_NAME = 'ban-document-writeln-calls'; constructor(configuration: RuleConfiguration = {}) { - super( - overridePatternConfig({ - errorCode: ErrorCode.CONFORMANCE_PATTERN, - errorMessage: errMsg, - kind: PatternKind.BANNED_PROPERTY, - values: ['Document.prototype.writeln'], - name: Rule.RULE_NAME, - allowedTrustedType: TRUSTED_HTML, - ...configuration, - }), - ); + super({ + errorCode: ErrorCode.CONFORMANCE_PATTERN, + errorMessage: errMsg, + kind: PatternKind.BANNED_PROPERTY, + values: ['Document.prototype.writeln'], + name: Rule.RULE_NAME, + allowedTrustedType: TRUSTED_HTML, + ...configuration, + }); } }