From 4077b0069de79f969a4119d8fee19edb6702e2df Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Wed, 5 Jun 2013 11:11:53 +0200 Subject: [PATCH] miniupnpd/upnpsoap: check Service ID in SetDefaultConnectionService method --- miniupnpd/Changelog.txt | 5 ++++- miniupnpd/upnpsoap.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 589dd5d..27d26bb 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,7 @@ -$Id: Changelog.txt,v 1.341 2013/05/29 21:27:21 nanard Exp $ +$Id: Changelog.txt,v 1.342 2013/06/05 09:10:46 nanard Exp $ + +2013/06/05: + check Service ID in SetDefaultConnectionService method 2013/05/29: Remove namespace from variable name elements in Events "propertyset" diff --git a/miniupnpd/upnpsoap.c b/miniupnpd/upnpsoap.c index c61ea05..cb7d8f6 100644 --- a/miniupnpd/upnpsoap.c +++ b/miniupnpd/upnpsoap.c @@ -1,4 +1,4 @@ -/* $Id: upnpsoap.c,v 1.116 2013/05/16 10:41:57 nanard Exp $ */ +/* $Id: upnpsoap.c,v 1.117 2013/06/05 09:10:47 nanard Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2013 Thomas Bernard @@ -1038,8 +1038,12 @@ SetDefaultConnectionService(struct upnphttp * h, const char * action) * 721 InvalidServiceID * 723 InvalidConnServiceSelection */ #ifdef UPNP_STRICT + char * service; + service = strchr(p, ','); if(0 != memcmp(uuidvalue, p, sizeof("uuid:00000000-0000-0000-0000-000000000000") - 1)) { SoapError(h, 720, "InvalidDeviceUUID"); + } else if(service == NULL || 0 != strcmp(service+1, SERVICE_ID_WANIPC)) { + SoapError(h, 721, "InvalidServiceID"); } else #endif {