Skip to content

Commit

Permalink
internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696429510
Change-Id: I884d4f66d40c20d42cc2c3bb79fb689dcb31820a
  • Loading branch information
ISE Hardening authored and copybara-github committed Nov 14, 2024
1 parent 4ee2ddd commit 12c632e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions common/rules/dom_security/ban_document_writeln_calls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
});
}
}

0 comments on commit 12c632e

Please sign in to comment.