You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XML response parser in the WebDAV implementation does not properly handle resolution of different XML namespaces.
RFC 4918 specifies that the response to a PROPFIND request will use tags in the DAV: XML namespace, which is usually shortened to just D: by setting xmlns:D="DAV:" on the D:multistatus tag. The XML parsing in webdav.py depends on this D: alias, which causes it to mishandle responses from for instance the Apache DAV module which often uses lp1: instead by setting xmlns:lp1="DAV:".
Issue occurred when working on #5308 due to trying to test with an Apache WebDAV server.
Modification
Use Python's xml.etree.elementtree to properly resolve namespaces and traverse the DAV response, instead of comparing raw string values.
The text was updated successfully, but these errors were encountered:
…cio#5700, fixrucio#5308
As described in rucio#5700, the parser for the WebDAV server responses had
issues with namespace handling. This caused Rucio to misinterpret
responses from for instance the Apache DAV module. Changing the
implementation to use Python's xml.etree.ElementTree fixes this issue.
This PR also includes a fix for rucio#5308, in which Rucio doesn't properly
handle DAV servers with path prefixes.
Motivation
The XML response parser in the WebDAV implementation does not properly handle resolution of different XML namespaces.
RFC 4918 specifies that the response to a PROPFIND request will use tags in the
DAV:
XML namespace, which is usually shortened to justD:
by settingxmlns:D="DAV:"
on theD:multistatus
tag. The XML parsing inwebdav.py
depends on thisD:
alias, which causes it to mishandle responses from for instance the Apache DAV module which often useslp1:
instead by settingxmlns:lp1="DAV:"
.Issue occurred when working on #5308 due to trying to test with an Apache WebDAV server.
Modification
Use Python's
xml.etree.elementtree
to properly resolve namespaces and traverse the DAV response, instead of comparing raw string values.The text was updated successfully, but these errors were encountered: