From 5a5c0534904dba3a95c63699c4edd9ef7a0a5dbb Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Thu, 5 Nov 2015 16:09:06 +0100 Subject: 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 https://bugzilla.gnome.org/show_bug.cgi?id=740266 --- configure.ac | 2 +- src/librygel-server/rygel-object-creator.vala | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a5b5951a..045e575e 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ VALA_REQUIRED=0.24.0 VALADOC_REQUIRED=0.2 GSSDP_REQUIRED=0.13.0 GUPNP_REQUIRED=0.20.14 -GUPNP_AV_REQUIRED=0.12.4 +GUPNP_AV_REQUIRED=0.12.8 GUPNP_DLNA_REQUIRED=0.9.4 GSTREAMER_REQUIRED=1.0 GSTPBU_REQUIRED=1.0 diff --git a/src/librygel-server/rygel-object-creator.vala b/src/librygel-server/rygel-object-creator.vala index 7a5b0764..0c31643e 100644 --- a/src/librygel-server/rygel-object-creator.vala +++ b/src/librygel-server/rygel-object-creator.vala @@ -255,6 +255,12 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine { (_("Invalid upnp:class given in CreateObject")); } + if (!didl_object.is_restricted_set ()) { + var msg = _("Object is missing the @restricted attribute"); + throw new ContentDirectoryError.BAD_METADATA (msg); + } + + if (didl_object.restricted) { throw new ContentDirectoryError.BAD_METADATA (_("Cannot create restricted item")); -- cgit v1.2.1