Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4780

Stax maxAttributeSize is only vaguely respected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      1. Configure the system property org.apache.cxf.stax.maxAttributeSize to 5000 in EAP standalone.xml and start EAP:
      <system-properties>
      <property name="org.apache.cxf.stax.maxAttributeSize" value="5000"/>
      </system-properties>
      2. Deploy the attached service modified from jaxws-ejb of quickstarts
      3. Run the modified program

      Show
      1. Configure the system property org.apache.cxf.stax.maxAttributeSize to 5000 in EAP standalone.xml and start EAP: <system-properties> <property name="org.apache.cxf.stax.maxAttributeSize" value="5000"/> </system-properties> 2. Deploy the attached service modified from jaxws-ejb of quickstarts 3. Run the modified program

      System property org.apache.cxf.stax.maxAttributeSize only vaguely limits attribute values. If I set the property to 5000 I can send up to 8295 characters in an attribute value without EAP denying the request.
      Reviewing the source code for woodstox reveal that the limit is checked against the size of the buffer before the last buffer expansion. After 2459 characters the buffer is grown to 3687. After 5531 characters the limit is checked against 3687 instead of 5531 and not until 8296 characters is the limit checked against the previous buffer size 5531 which is larger than 5000.

              istudens@redhat.com Ivo Studensky
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: