6. Security

xmlProtection

Version

Prohibits XML documents to be passed through that look like XML attacks on older parsers. Too many attributes, too long element names are such indications. DTD definitions will simply be removed.

Syntax

<xmlProtection removeDTD="boolean" maxElementNameLength="integer" maxAttibuteCount="integer" />
<xmlProtection removeDTD="boolean" maxElementNameLength="integer" maxAttibuteCount="integer" />

Sample

<beans>
<transport coreThreadPoolSize="20">
<ruleMatching />
<dispatching />
<userFeature />

<xmlProtection />

<httpClient />
</transport>
</beans>
<beans>
  <transport coreThreadPoolSize="20">
	<ruleMatching />
	<dispatching />
	<userFeature />

	<xmlProtection />

	<httpClient />
  </transport>
</beans>

Attributes

NameRequiredDefaultDescriptionExamples
maxAttributeCountfalse1000If an incoming request exceeds this limit, it will be discarded.-
maxElementNameLengthfalse1000If an incoming request exceeds this limit, it will be discarded.-
removeDTDfalsetrueWhether to remove the DTD from incoming requests.-

Can be used in