python-five9
python-five9 copied to clipboard
Suggestion for large XML
I put in a fix to handle large XML, else you get a "Invalid XML content received... huge text node" with the current lxml library. I overrode Class(Five9). I don't think it has consequences except buffer overflow attacks from Five9 (CVE-2008-4226).
class Five9_BigXML(Five9):
def _get_authenticated_client(self, wsdl):
"""Return an authenticated SOAP client.
Returns:
zeep.Client: Authenticated API client.
"""
return zeep.Client(
wsdl % quote(self.username),
transport=zeep.Transport(
session=self._get_authenticated_session(),
),
settings=zeep.Settings(xml_huge_tree=True)
)
Hi @yilun11 Is there a way to fix this issue locally until this fix is applied on master.
@saipraveenc - Add my class definition to your code and change your connect string to use the new class. E.g.
from five9 import Five9
import zeep
# add class def from above
client = Five9_BigXML('user', 'password')