You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/ca3075-insecure-dtd-processing.md
+6-22Lines changed: 6 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ If you use insecure <xref:System.Xml.XmlReaderSettings.DtdProcessing%2A> instanc
24
24
25
25
## Rule description
26
26
27
-
A *Document Type Definition (DTD)* is one of two ways an XML parser can determine the validity of a document, as defined by the [World Wide Web Consortium (W3C) Extensible Markup Language (XML) 1.0](http://www.w3.org/TR/2008/REC-xml-20081126/). This rule seeks properties and instances where untrusted data is accepted to warn developers about potential [Information Disclosure](/dotnet/framework/wcf/feature-details/information-disclosure) threats, which may lead to [Denial of Service (DoS)](/dotnet/framework/wcf/feature-details/denial-of-service) attacks. This rule triggers when:
27
+
A *Document Type Definition (DTD)* is one of two ways an XML parser can determine the validity of a document, as defined by the [World Wide Web Consortium (W3C) Extensible Markup Language (XML) 1.0](http://www.w3.org/TR/2008/REC-xml-20081126/). This rule seeks properties and instances where untrusted data is accepted to warn developers about potential [Information Disclosure](/dotnet/framework/wcf/feature-details/information-disclosure) threats, or which may lead to [Denial of Service (DoS)](/dotnet/framework/wcf/feature-details/denial-of-service) attacks. This rule triggers when:
28
28
29
29
- DtdProcessing is enabled on the <xref:System.Xml.XmlReader> instance, which resolves external XML entities using <xref:System.Xml.XmlUrlResolver>.
30
30
@@ -44,7 +44,7 @@ In each of these cases, the outcome is the same: the contents from either the fi
44
44
45
45
- Catch and process all XmlTextReader exceptions properly to avoid path information disclosure .
46
46
47
-
- Use the <xref:System.Xml.XmlSecureResolver> to restrict the resources that the XmlTextReader can access.
47
+
- Use the <xref:System.Xml.XmlSecureResolver> to restrict the resources that the XmlTextReader can access.
48
48
49
49
- Do not allow the <xref:System.Xml.XmlReader> to open any external resources by setting the <xref:System.Xml.XmlResolver> property to **null**.
50
50
@@ -198,7 +198,7 @@ public static void TestMethod(string xml)
0 commit comments