dont_leak_info.patch raw

   1  commit 51f6dd991c29af66fb4f64c6feb2787cce23a1a7
   2  Author: fanquake <fanquake@gmail.com>
   3  Date:   Mon Jan 8 11:21:40 2024 +0000
   4  
   5      Don't leak OS and miniupnpc version info in User-Agent
   6  
   7  diff --git a/src/minisoap.c b/src/minisoap.c
   8  index 903ac5f..046e0ea 100644
   9  --- a/src/minisoap.c
  10  +++ b/src/minisoap.c
  11  @@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd,
  12   	headerssize = snprintf(headerbuf, sizeof(headerbuf),
  13                          "POST %s HTTP/%s\r\n"
  14   	                   "Host: %s%s\r\n"
  15  -					   "User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
  16  +					   "User-Agent: " UPNP_VERSION_STRING "\r\n"
  17   	                   "Content-Length: %d\r\n"
  18   #if (UPNP_VERSION_MAJOR == 1) && (UPNP_VERSION_MINOR == 0)
  19   					   "Content-Type: text/xml\r\n"
  20  diff --git a/src/miniwget.c b/src/miniwget.c
  21  index e76a5e5..0cc36fe 100644
  22  --- a/src/miniwget.c
  23  +++ b/src/miniwget.c
  24  @@ -444,7 +444,7 @@ miniwget3(const char * host,
  25                    "GET %s HTTP/%s\r\n"
  26   			     "Host: %s:%d\r\n"
  27   				 "Connection: close\r\n"
  28  -				 "User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
  29  +				 "User-Agent: " UPNP_VERSION_STRING "\r\n"
  30   				 "\r\n",
  31   			   path, httpversion, host, port);
  32   	if ((unsigned int)len >= sizeof(buf))
  33