Browse Source

WPS: Remove trailing CR from subscription callback URLs

This cleans up the debug log a bit.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
89a72e1c7f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/wps/wps_upnp_web.c

+ 2 - 0
src/wps/wps_upnp_web.c

@@ -1003,6 +1003,8 @@ static void web_connection_parse_subscribe(struct upnp_wps_device_sm *sm,
 				ret = HTTP_INTERNAL_SERVER_ERROR;
 				goto error;
 			}
+			if (len > 0 && callback_urls[len - 1] == '\r')
+				callback_urls[len - 1] = '\0';
 			continue;
 		}
 		/* SID is only for renewal */