Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Latest commit

 

History

History
41 lines (32 loc) · 2.13 KB

033 XmlTextReader DTD entity expansion is limited to 10000000 characters.md

File metadata and controls

41 lines (32 loc) · 2.13 KB

33: XmlTextReader DTD entity expansion is limited to 10,000,000 characters

Scope

Edge

Version Introduced

4.5

Source Analyzer Status

Available

Change Description

DTD entity expansion is now limited to 10,000,000 characters. Loading XML files without DTD entity expansion or with limited DTD entity expansion is unaffected. Files with DTD entities that expand to more than 10,000,000 characters fail to load, and now throw an exception.

  • Quirked
  • Build-time break

Recommended Action

If the limit of DTD entity expansion is too low 10,000,000, the value can be overridden with the XmlReaderSettings.MaxCharactersFromEntities property. An XmlReaderSettings with the proper MaxCharactersFromEntity value can be passed to XmlReader.Create

Affected APIs

  • T:System.Xml.XmlTextReader
  • M:System.Xml.XmlTextReader.#ctor
  • M:System.Xml.XmlTextReader.#ctor(System.IO.Stream)
  • M:System.Xml.XmlTextReader.#ctor(System.IO.Stream,System.Xml.XmlNameTable)
  • M:System.Xml.XmlTextReader.#ctor(System.IO.Stream,System.Xml.XmlNodeType,System.Xml.XmlParserContext)
  • M:System.Xml.XmlTextReader.#ctor(System.IO.TextReader)
  • M:System.Xml.XmlTextReader.#ctor(System.IO.TextReader,System.Xml.XmlNameTable)
  • M:System.Xml.XmlTextReader.#ctor(System.String)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.IO.Stream)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.IO.Stream,System.Xml.XmlNameTable)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.IO.TextReader)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.IO.TextReader,System.Xml.XmlNameTable)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.Xml.XmlNameTable)
  • M:System.Xml.XmlTextReader.#ctor(System.String,System.Xml.XmlNodeType,System.Xml.XmlParserContext)
  • M:System.Xml.XmlTextReader.#ctor(System.Xml.XmlNameTable)

Category

XML, XSLT

More information