v29.4-roots.4 · Commit 1: [PATCH 01/37] build: port platform and dependency support
depends/patches/miniupnpc/dont_leak_info.patch
Before: /dev/null · After: depends/patches/miniupnpc/dont_leak_info.patch
File metadata
new file mode 100644 index 0000000000000000000000000000000000000000..6bccc8449375be20cff18bb41f61844dbb99af38
Download original patch · Release notes
Diff rows 1–32 of 32. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
depends/patches/miniupnpc/dont_leak_info.patch
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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))
|