[gupnp] Ensure NOTIFY message has a proper SID
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] Ensure NOTIFY message has a proper SID
- Date: Wed, 29 May 2013 13:36:04 +0000 (UTC)
commit be0665b44a3d0b1433bb48cf959e218c3c6cf965
Author: Jussi Kukkonen <jussi kukkonen intel com>
Date: Thu Mar 21 15:31:55 2013 +0200
Ensure NOTIFY message has a proper SID
SID must start with "uuid:" and has to have some value (the uuid
format was only specified in version 1.1 so that cannot be enforced).
https://bugzilla.gnome.org/show_bug.cgi?id=696289
libgupnp/gupnp-service-proxy.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 691ec7e..0b17d1b 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -1860,7 +1860,9 @@ server_handler (SoupServer *soup_server,
seq = atoi (hdr);
hdr = soup_message_headers_get_one (msg->request_headers, "SID");
- if (hdr == NULL) {
+ if (hdr == NULL ||
+ strlen (hdr) <= strlen ("uuid:") ||
+ strncmp (hdr, "uuid:", strlen ("uuid:")) != 0) {
/* No SID */
soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]