diff options
author | Jens Georg <mail@jensge.org> | 2015-11-05 16:09:06 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2016-02-08 20:37:45 +0100 |
commit | 5a5c0534904dba3a95c63699c4edd9ef7a0a5dbb (patch) | |
tree | 8a8af410a827bd331ab7ab8c282ab41f56a81b4a | |
parent | adf5e348126935620b0e5059e57a66c6c1730b11 (diff) | |
download | rygel-5a5c0534904dba3a95c63699c4edd9ef7a0a5dbb.tar.gz |
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>
https://bugzilla.gnome.org/show_bug.cgi?id=740266
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/librygel-server/rygel-object-creator.vala | 6 |
2 files changed, 7 insertions, 1 deletions
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")); |