Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:RISCV
tinyproxy
0001-prevent-junk-from-showing-up-in-error-page...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-prevent-junk-from-showing-up-in-error-page-in-invali.patch of Package tinyproxy
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 bce6981..45db118 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; -- 2.37.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor