Skip to content

Commit 9d0cd98

Browse files
gavinbarronCopilot
andauthored
fix(mgt-components): sanitize search result summaries with DOMPurify to prevent XSS (#3493)
* fix(mgt-components): sanitize search result summaries with DOMPurify to prevent XSS sanitizeSummary() previously only replaced proprietary Graph API tags (<ddd/>, <c0>, </c0>) without sanitizing other HTML. This allowed stored XSS via attacker-controlled content indexed by Microsoft Search and rendered through .innerHTML in mgt-search-results. Add DOMPurify to sanitize HTML after proprietary tag conversion, allowing only safe formatting tags (b, em, strong, span) with no attributes. fix(test): set experimentalDecorators in web-test-runner tsconfig The @web/dev-server-esbuild plugin passes the tsconfig to esbuild as tsconfigRaw, which does not resolve `extends`. After bumping esbuild, its default switched to standard (TC39) decorators, causing Lit's @Property to throw "Unsupported decorator location: field/getter" and breaking test module imports. Declare experimentalDecorators and emitDecoratorMetadata directly so esbuild emits legacy decorators. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3bd07b9 commit 9d0cd98

1,893 files changed

Lines changed: 7230 additions & 7536 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.vscode/settings.jsonβ€Ž

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"editor.codeActionsOnSave": {
66
"source.fixAll.eslint": "explicit"
77
},
8-
"lit-html.tags": ["mgtHtml"],
9-
"typescript.tsdk": "node_modules/typescript/lib",
8+
"lit-html.tags": [
9+
"mgtHtml"
10+
],
1011
"css.validate": false,
1112
"less.validate": false,
1213
"scss.validate": false,
@@ -17,9 +18,23 @@
1718
"editor.defaultFormatter": "stylelint.vscode-stylelint"
1819
},
1920
"stylelint.packageManager": "yarn",
20-
"stylelint.snippet": ["css", "less", "postcss", "scss"],
21-
"stylelint.validate": ["css", "less", "postcss", "scss"],
22-
"cSpell.words": ["mailenabledsecurity", "noreferrer"],
21+
"stylelint.snippet": [
22+
"css",
23+
"less",
24+
"postcss",
25+
"scss"
26+
],
27+
"stylelint.validate": [
28+
"css",
29+
"less",
30+
"postcss",
31+
"scss"
32+
],
33+
"cSpell.words": [
34+
"mailenabledsecurity",
35+
"noreferrer"
36+
],
2337
"liveServer.settings.root": "storybook-static",
24-
"liveServer.settings.port": 6006
25-
}
38+
"liveServer.settings.port": 6006,
39+
"js/ts.tsdk.path": "node_modules/typescript/lib"
40+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
Β (0)