Skip to content

Commit

Permalink
Be a little more lenient about XML errors
Browse files Browse the repository at this point in the history
Server admins have been observed to put bare ampersands into strings,
which libxml wants to treat as entities.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed May 30, 2013
1 parent 152d4e4 commit 1b7537d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth.c
Expand Up @@ -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"));
Expand Down
1 change: 1 addition & 0 deletions www/changelog.xml
Expand Up @@ -17,6 +17,7 @@
<ul>
<li><b>OpenConnect HEAD</b>
<ul>
<li>Be more permissive in parsing XML forms.</li>
<li>Use original URL when falling back to non-XML POST mode.</li>
<li>Add <tt>--no-xmlpost</tt> option to revert to older, compatible behaviour.</li>
<li>Close connection before falling back to non-xmlpost mode <a href="https://bugzilla.redhat.com/show_bug.cgi?id=964650"><i>(RH#964650)</i></a>.</li>
Expand Down

0 comments on commit 1b7537d

Please sign in to comment.