Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor edits to description

...

Code Block
<item>
  <description>Widget</description>
  <price>500.0</price>
  <quantity>1</quantity><price>1.0</price><quantity>1</quantity>
</item>

A Simple API for XML (SAX) parser (org.xml.sax and javax.xml.parsers.SAXParser) is a standard interface for event-based XML parsing. SAX interprets the XML in this example such that the second price field overrides the first, leaving changing the price of the item as to $1. Even when it is not possible to perform such an attack, the attacker may be able to inject special characters, such as comment blocks and CDATA delimiters, which corrupt the meaning of the XML.

...