[rygel] core: Check upnp:class on CreateItem
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Check upnp:class on CreateItem
- Date: Wed, 7 Sep 2011 13:35:43 +0000 (UTC)
commit 3f65517d61f5119d98909558e7dbfaf8e0e9b1ee
Author: Jens Georg <mail jensge org>
Date: Wed Sep 7 14:41:42 2011 +0200
core: Check upnp:class on CreateItem
src/rygel/rygel-item-creator.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-item-creator.vala b/src/rygel/rygel-item-creator.vala
index f2882a2..5ed384b 100644
--- a/src/rygel/rygel-item-creator.vala
+++ b/src/rygel/rygel-item-creator.vala
@@ -97,6 +97,13 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
"were found in 'dlnaManaged'");
}
+ if (didl_item.upnp_class == null ||
+ didl_item.upnp_class == "" ||
+ !didl_item.upnp_class.has_prefix ("object.item")) {
+ throw new ContentDirectoryError.BAD_METADATA
+ ("Invalid upnp:class given ");
+ }
+
if (didl_item.restricted) {
throw new ContentDirectoryError.INVALID_ARGS
("Cannot create restricted item");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]