GNOME Bugzilla – Bug 740266
gupnp-av is overly strict with the verification of DIDL-Lite XML fragments
Last modified: 2019-02-22 05:57:50 UTC
The GUPnpDIDLLiteParser is quite strict about the DIDL-Lite XML and will refuse to parse XML that doesn't pass the verify_didl_attributes() function. In our experience it has shown that it is rather common for UPnP servers to deliver DIDL-Lite XML that doesn't pass this test. In particular there are many servers that fail to set the 'restricted' attribute. While the spec is indeed quite clear that this attribute is required, it would seem like a more reasonable behaviour for a library to deal gracefully with this missing attribute. I suggest that the verification code is entirely removed or at least that some option is added to make parser less strict.
Might be that this code is a bit too close to the DIDL-Lite parsing of server upload use-cases.
I think we can safely return TRUE instead of false if "restricted" is not there. Preparing a patch.
Or maybe not because our code does not have the ability to distinguish between "not there" or "false"
Created attachment 314926 [details] [review] Make DIDL-Lite check less restrictive Only check for validity of @restricted if present, but not its presence Signed-off-by: Jens Georg <mail@jensge.org>
Created attachment 314927 [details] [review] server: Add explicit check for @restricted Previously the DIDL-Lite parser did that in its verification, but that broke broken clients. The move the code to where it was added for, Rygel's CreateObject call handler. Signed-off-by: Jens Georg <mail@jensge.org>
Attachment 314926 [details] pushed as 9d65132 - Make DIDL-Lite check less restrictive
Comment on attachment 314927 [details] [review] server: Add explicit check for @restricted Attachment 314927 [details] pushed as 5a5c053 - server: Add explicit check for @restricted