aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-02-22 16:57:41 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-22 16:58:33 (GMT)
commit329039869a36d36080ec7a7d53367e86f599ebde (patch)
tree6739ebae5849bc63b10c6d449d9f7e32a8f0d672 /src/wps
parentf34df28e9370aa2924ae1ad38740f62942c3c7ef (diff)
downloadhostap-329039869a36d36080ec7a7d53367e86f599ebde.zip
hostap-329039869a36d36080ec7a7d53367e86f599ebde.tar.gz
hostap-329039869a36d36080ec7a7d53367e86f599ebde.tar.bz2
WPS: Fix UNSUBSCRIBE error returns if NT or CALLBACK header is used
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_upnp_web.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/wps/wps_upnp_web.c b/src/wps/wps_upnp_web.c
index 31963ff..2a3b636 100644
--- a/src/wps/wps_upnp_web.c
+++ b/src/wps/wps_upnp_web.c
@@ -1171,7 +1171,6 @@ static void web_connection_parse_unsubscribe(struct upnp_wps_device_sm *sm,
.....
}
#endif
- /* SID is only for renewal */
match = "SID:";
match_len = os_strlen(match);
if (os_strncasecmp(h, match, match_len) == 0) {
@@ -1194,6 +1193,20 @@ static void web_connection_parse_unsubscribe(struct upnp_wps_device_sm *sm,
got_uuid = 1;
continue;
}
+
+ match = "NT:";
+ match_len = os_strlen(match);
+ if (os_strncasecmp(h, match, match_len) == 0) {
+ ret = HTTP_BAD_REQUEST;
+ goto send_msg;
+ }
+
+ match = "CALLBACK:";
+ match_len = os_strlen(match);
+ if (os_strncasecmp(h, match, match_len) == 0) {
+ ret = HTTP_BAD_REQUEST;
+ goto send_msg;
+ }
}
if (got_uuid) {