Commit 9d0cd98
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
- .vscode
- .yarn/cache
- packages/mgt-components
- src
- components
- mgt-people
- mgt-person
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
23 | 37 | | |
24 | | - | |
25 | | - | |
| 38 | + | |
| 39 | + | |
| 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