-
Notifications
You must be signed in to change notification settings - Fork 5
PROPPATCH mangles XML values #203
Comments
I've added logging in Reva to see the value of "InnerXML", apparently it's been decoded wrong:
Interestingly, if I change the input to be "xxmlns" then it doesn't get duplicated. |
If I set |
as far as I understand, this is the bit that tells the parser to not parse the contents of the element and reuse it as is: https://github.com/cs3org/reva/blob/master/internal/http/services/owncloud/ocdav/propfind.go#L547 still, for some reason, it seems to insist on parsing it and mangling it |
might be a bug in the decode, I didn't find which one yet: golang/go#13400 maybe it's another yet undiscovered bug |
my local go version where I run Litmus tests is go1.13.10 |
problem also happens with go1.14.2 |
oh, seems we have a custom decoder handler:
not sure why we need that magic and can't just grab the XML as a raw value ? @butonic |
I see those seem to be there for handling the "lang" attribute, so apparently it's not enough to just keep everything as is ? http://www.webdav.org/specs/rfc4918.xml#ELEMENT_set spec for property values: http://www.webdav.org/specs/rfc4918.html#property_values |
ok, seems I managed to fix the custom UnmarshalXML to work on the parent element: cs3org/reva#743 |
Matches the "propwformed" Litmus test from the "props" suite: #183
Steps to reproduce
getfattr -d temp
Expected result
Actual result
The XML element is mangled, the
xmlns
property is duplicated, resulting in a badly formed XML structure:Version
reva 4621a5d3c79e2371a42d7a0d306962bf380db8d1
The text was updated successfully, but these errors were encountered: