Commit a1ac477
docs: Add untrusted data security warnings to System.Speech APIs (#12149)
Add untrusted-data-instance-note to APIs that handle external XML/SRGS/SSML/audio files to warn developers about security risks when processing untrusted data.
Changes:
- SrgsDocument: Added class-level warning and warnings to constructors that accept file paths and XmlReader
- Grammar: Added warnings to constructors that accept file paths and streams
- PromptBuilder: Added warnings to AppendSsml(XmlReader) and AppendAudio(string) methods
- GrammarBuilder: Added warnings to AppendRuleReference methods that accept file paths
These APIs can load and parse external files which may contain corrupted or malicious content. The warnings direct developers to validate all inputs per OWASP guidelines.
Co-authored-by: Pranav Gupta <[email protected]>1 parent a737183 commit a1ac477
File tree
4 files changed
+27
-1
lines changed- xml
- System.Speech.Recognition.SrgsGrammar
- System.Speech.Recognition
- System.Speech.Synthesis
4 files changed
+27
-1
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| 289 | + | |
| 290 | + | |
287 | 291 | | |
288 | 292 | | |
289 | 293 | | |
| |||
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| 333 | + | |
| 334 | + | |
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
| 545 | + | |
| 546 | + | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
| |||
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
| 781 | + | |
| 782 | + | |
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
| |||
1223 | 1229 | | |
1224 | 1230 | | |
1225 | 1231 | | |
| 1232 | + | |
| 1233 | + | |
1226 | 1234 | | |
1227 | 1235 | | |
1228 | 1236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2002 | 2002 | | |
2003 | 2003 | | |
2004 | 2004 | | |
| 2005 | + | |
| 2006 | + | |
2005 | 2007 | | |
2006 | 2008 | | |
2007 | 2009 | | |
| |||
2089 | 2091 | | |
2090 | 2092 | | |
2091 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
2092 | 2096 | | |
2093 | 2097 | | |
2094 | 2098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
| |||
960 | 966 | | |
961 | 967 | | |
962 | 968 | | |
| 969 | + | |
| 970 | + | |
963 | 971 | | |
964 | 972 | | |
965 | 973 | | |
| |||
0 commit comments