tinyproxy: Backport patch for CVE-2022-40468
This commit is contained in:
parent
e7121ef6c1
commit
4f354e1716
|
@ -0,0 +1,30 @@
|
|||
https://github.com/tinyproxy/tinyproxy/commit/3764b8551463b900b5b4e3ec0cd9bb9182191cb7
|
||||
|
||||
From 3764b8551463b900b5b4e3ec0cd9bb9182191cb7 Mon Sep 17 00:00:00 2001
|
||||
From: rofl0r <rofl0r@users.noreply.github.com>
|
||||
Date: Thu, 8 Sep 2022 15:18:04 +0000
|
||||
Subject: [PATCH] prevent junk from showing up in error page in invalid
|
||||
requests
|
||||
|
||||
fixes #457
|
||||
---
|
||||
src/reqs.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/reqs.c b/src/reqs.c
|
||||
index bce69819..45db118d 100644
|
||||
--- a/src/reqs.c
|
||||
+++ b/src/reqs.c
|
||||
@@ -343,8 +343,12 @@ static struct request_s *process_request (struct conn_s *connptr,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ /* zero-terminate the strings so they don't contain junk in error page */
|
||||
+ request->method[0] = url[0] = request->protocol[0] = 0;
|
||||
+
|
||||
ret = sscanf (connptr->request_line, "%[^ ] %[^ ] %[^ ]",
|
||||
request->method, url, request->protocol);
|
||||
+
|
||||
if (ret == 2 && !strcasecmp (request->method, "GET")) {
|
||||
request->protocol[0] = 0;
|
||||
|
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Light-weight HTTP proxy daemon for POSIX operating syste
|
|||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.11.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/tinyproxy/tinyproxy/releases/download/${TERMUX_PKG_VERSION}/tinyproxy-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=d66388448215d0aeb90d0afdd58ed00386fb81abc23ebac9d80e194fceb40f7c
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
|
Loading…
Reference in New Issue