After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740266 - gupnp-av is overly strict with the verification of DIDL-Lite XML fragments
gupnp-av is overly strict with the verification of DIDL-Lite XML fragments
Status: RESOLVED FIXED
Product: gupnp-av
Classification: Other
Component: General
0.20.x
Other Linux
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-17 16:22 UTC by Sven Neumann
Modified: 2019-02-22 05:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make DIDL-Lite check less restrictive (3.18 KB, patch)
2015-11-05 15:08 UTC, Jens Georg
committed Details | Review
server: Add explicit check for @restricted (1.76 KB, patch)
2015-11-05 15:10 UTC, Jens Georg
committed Details | Review

Description Sven Neumann 2014-11-17 16:22:53 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.
Comment 1 Jens Georg 2014-11-18 08:07:38 UTC
Might be that this code is a bit too close to the DIDL-Lite parsing of server upload use-cases.
Comment 2 Jens Georg 2015-11-05 13:42:58 UTC
I think we can safely return TRUE instead of false if "restricted" is not there. Preparing a patch.
Comment 3 Jens Georg 2015-11-05 14:43:23 UTC
Or maybe not because our code does not have the ability to distinguish between "not there" or "false"
Comment 4 Jens Georg 2015-11-05 15:08:49 UTC
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>
Comment 5 Jens Georg 2015-11-05 15:10:36 UTC
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>
Comment 6 Jens Georg 2016-01-01 11:57:23 UTC
Attachment 314926 [details] pushed as 9d65132 - Make DIDL-Lite check less restrictive
Comment 7 Jens Georg 2016-02-08 19:42:59 UTC
Comment on attachment 314927 [details] [review]
server: Add explicit check for @restricted

Attachment 314927 [details] pushed as 5a5c053 - server: Add explicit check for @restricted