summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 474d171)
raw | patch | inline | side by side (parent: 474d171)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Sun, 14 Oct 2007 22:19:29 +0000 (22:19 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Sun, 14 Oct 2007 22:19:29 +0000 (22:19 +0000) |
forged "LLLLocation" header prefixed with multiple "L"s (fabiodds -
1813346)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1807 f882894a-f735-0410-b71e-b25c423dba1c
1813346)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1807 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_http.c | patch | blob | history |
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 24819359cb4c14519046e08cccb18f5f4ab0edee..901f6b668986b9e521bc6bc5b177abc4d1d8e93b 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
/* per RFC 2396 */
-#define HDR_LOCATION "%*[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]: "
#define URI_HTTP "%5[HTPShtps]"
#define URI_HOST "%255[-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]"
#define URI_PORT "%6d" /* MAX_PORT's width is 5 chars, 6 to detect overflow */
die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate url\n"));
while (pos) {
- sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i);
+ sscanf (pos, "%1[Ll]%*1[Oo]%*1[Cc]%*1[Aa]%*1[Tt]%*1[Ii]%*1[Oo]%*1[Nn]:%n", xx, &i);
if (i == 0) {
pos += (size_t) strcspn (pos, "\r\n");
pos += (size_t) strspn (pos, "\r\n");