WPS: Fix UNSUBSCRIBE error returns if NT or CALLBACK header is used
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f34df28e93
commit
329039869a
1 changed files with 14 additions and 1 deletions
|
@ -1171,7 +1171,6 @@ static void web_connection_parse_unsubscribe(struct upnp_wps_device_sm *sm,
|
||||||
.....
|
.....
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* SID is only for renewal */
|
|
||||||
match = "SID:";
|
match = "SID:";
|
||||||
match_len = os_strlen(match);
|
match_len = os_strlen(match);
|
||||||
if (os_strncasecmp(h, match, match_len) == 0) {
|
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;
|
got_uuid = 1;
|
||||||
continue;
|
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) {
|
if (got_uuid) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue