summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kaluza <hanzz.k@gmail.com>2013-05-31 12:42:42 +0200
committerJan Kaluza <hanzz.k@gmail.com>2013-05-31 12:42:42 +0200
commit3d06e82ead0cc7e72ceaab56b96fbcad3eae10d9 (patch)
tree8dda6a86a0924fdd609170c506199d9a69b27426
parent0b19f7b6e1a47c6167a8ab43b4a9d1e759b54721 (diff)
downloadhttpd-3d06e82ead0cc7e72ceaab56b96fbcad3eae10d9.tar.gz
httpd-3d06e82ead0cc7e72ceaab56b96fbcad3eae10d9.tar.xz
httpd-3d06e82ead0cc7e72ceaab56b96fbcad3eae10d9.zip
return 400 Bad Request on malformed Host header
-rw-r--r--httpd-2.4.4-malformed-host.patch12
-rw-r--r--httpd.spec7
2 files changed, 18 insertions, 1 deletions
diff --git a/httpd-2.4.4-malformed-host.patch b/httpd-2.4.4-malformed-host.patch
new file mode 100644
index 0000000..57975e5
--- /dev/null
+++ b/httpd-2.4.4-malformed-host.patch
@@ -0,0 +1,12 @@
+diff --git a/server/protocol.c b/server/protocol.c
+index e1ef204..d6d9165 100644
+--- a/server/protocol.c
++++ b/server/protocol.c
+@@ -1049,6 +1049,7 @@ request_rec *ap_read_request(conn_rec *conn)
+ * now read. may update status.
+ */
+ ap_update_vhost_from_headers(r);
++ access_status = r->status;
+
+ /* Toggle to the Host:-based vhost's timeout mode to fetch the
+ * request body and send the response body, if needed.
diff --git a/httpd.spec b/httpd.spec
index a554921..f727b59 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -14,7 +14,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.4
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: http://httpd.apache.org/
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -67,6 +67,7 @@ Patch51: httpd-2.4.3-sslsninotreq.patch
Patch52: httpd-2.4.4-r1476674.patch
Patch53: httpd-2.4.4-mod_cache-tmppath.patch
Patch54: httpd-2.4.4-dump-vhost-twice.patch
+Patch55: httpd-2.4.4-malformed-host.patch
License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -194,6 +195,7 @@ interface for storing and accessing per-user session data.
%patch52 -p1 -b .r1476674
%patch53 -p1 -b .tmppath
%patch54 -p1 -b .vhosttwice
+%patch55 -p1 -b .malformedhost
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -616,6 +618,9 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/rpm/macros.httpd
%changelog
+* Fri May 31 2013 Jan Kaluza <jkaluza@redhat.com> - 2.4.4-8
+- return 400 Bad Request on malformed Host header
+
* Fri May 24 2013 Jan Kaluza <jkaluza@redhat.com> - 2.4.4-7
- ignore /etc/sysconfig/httpd and document systemd way of setting env variables
in this file