aboutsummaryrefslogtreecommitdiff
path: root/depends/patches/miniupnpc/dont_leak_info.patch
blob: 512f9c50ea8d7fbca35004e92756236721e0919c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
commit 8815452257437ba36607d0e2381c01142d1c7bb0
Author: fanquake <fanquake@gmail.com>
Date:   Thu Nov 19 10:51:19 2020 +0800

    Don't leak OS and miniupnpc version info in User-Agent

diff --git a//minisoap.c b/minisoap.c
index 7860667..775580b 100644
--- a/minisoap.c
+++ b/minisoap.c
@@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd,
 	headerssize = snprintf(headerbuf, sizeof(headerbuf),
                        "POST %s HTTP/%s\r\n"
 	                   "Host: %s%s\r\n"
-					   "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+					   "User-Agent: " UPNP_VERSION_STRING "\r\n"
 	                   "Content-Length: %d\r\n"
 					   "Content-Type: text/xml\r\n"
 					   "SOAPAction: \"%s\"\r\n"
diff --git a/miniwget.c b/miniwget.c
index d5b7970..05aeb9c 100644
--- a/miniwget.c
+++ b/miniwget.c
@@ -444,7 +444,7 @@ miniwget3(const char * host,
                  "GET %s HTTP/%s\r\n"
 			     "Host: %s:%d\r\n"
 				 "Connection: Close\r\n"
-				 "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+				 "User-Agent: " UPNP_VERSION_STRING "\r\n"
 
 				 "\r\n",
 			   path, httpversion, host, port);