summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 488e202)
raw | patch | inline | side by side (parent: 488e202)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 2 Oct 2007 13:51:41 +0000 (13:51 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 2 Oct 2007 13:51:41 +0000 (13:51 +0000) |
virtual hosts failed if both "-H" and "-I" were specified (noted by
Rodrigo A. G. Schichaschwili on nagiosplug-devel@)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1804 f882894a-f735-0410-b71e-b25c423dba1c
Rodrigo A. G. Schichaschwili on nagiosplug-devel@)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1804 f882894a-f735-0410-b71e-b25c423dba1c
NEWS | patch | blob | history | |
plugins/check_http.c | patch | blob | history |
index 1dabbb046872f68e0fb672af9eab73abd283c9a7..2cc9fbafbc314a04b871842e501c1569c5bb111c 100644 (file)
--- a/NEWS
+++ b/NEWS
This file documents the major additions and syntax changes between releases.
+1.4.11 or 1.5 ??
+ Fix check_http regression in 1.4.10 where following redirects to
+ relative URLs on virtual hosts failed if both "-H" and "-I" were used
+
1.4.10 28th September 2007
Fix check_http buffer overflow vulnerability when following HTTP redirects
check_http now explicitly asks HTTP/1.1 servers to close the connection
diff --git a/plugins/check_http.c b/plugins/check_http.c
index b371cd6413267e6ccc556386869afe67390e8934..24819359cb4c14519046e08cccb18f5f4ab0edee 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
if (display_html == TRUE)
printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
- use_ssl ? "https" : "http", server_address,
+ use_ssl ? "https" : "http", host_name ? host_name : server_address,
server_port, server_url);
/* initialize alarm signal handling, set socket timeout, start timer */
}
i = server_port;
strcpy (type, server_type);
- strcpy (addr, server_address);
+ strcpy (addr, host_name ? host_name : server_address);
}
else {
display_html ? "</A>" : "");
if (verbose)
- printf (_("Redirection to %s://%s:%d%s\n"), server_type, server_address,
- server_port, server_url);
+ printf (_("Redirection to %s://%s:%d%s\n"), server_type,
+ host_name ? host_name : server_address, server_port, server_url);
check_http ();
}