coheigea opened a new pull request, #3777: URL: https://github.com/apache/cxf/pull/3777
…entText DepthRestrictingStreamReader tracks the number of child elements per parent in a stack, pushing on START_ELEMENT and popping on END_ELEMENT in next(). getElementText() is inherited from DepthXMLStreamReader and reads up to the END_ELEMENT directly on the wrapped reader, so next() never sees it and the counter for that element is never popped. As a result, when a consumer reads child elements with getElementText(), the stale counter sits on top of the stack and the parent's counter is never incremented, so innerElementCountThreshold is not enforced for those children. The depth and total element count limits are unaffected. Override getElementText() to pop the counter, and add a regression test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
