From: David Woodhouse Date: Thu, 30 May 2013 14:27:12 +0000 (+0100) Subject: Be a little more lenient about XML errors X-Git-Tag: v5.01~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1b7537d7ec1638e23c93165f5fe28bae2b1cd488;p=users%2Fdwmw2%2Fopenconnect.git Be a little more lenient about XML errors Server admins have been observed to put bare ampersands into strings, which libxml wants to treat as entities. Signed-off-by: David Woodhouse --- diff --git a/auth.c b/auth.c index c3bc4fbc..19020896 100644 --- a/auth.c +++ b/auth.c @@ -509,8 +509,8 @@ int parse_xml_response(struct openconnect_info *vpninfo, char *response, struct form = calloc(1, sizeof(*form)); if (!form) return -ENOMEM; - - xml_doc = xmlReadMemory(response, strlen(response), "noname.xml", NULL, 0); + xml_doc = xmlReadMemory(response, strlen(response), "noname.xml", NULL, + XML_PARSE_NOERROR|XML_PARSE_RECOVER); if (!xml_doc) { vpn_progress(vpninfo, PRG_ERR, _("Failed to parse server response\n")); diff --git a/www/changelog.xml b/www/changelog.xml index 4f4ad2eb..e4d2e553 100644 --- a/www/changelog.xml +++ b/www/changelog.xml @@ -17,6 +17,7 @@