current client-tags.h, 1.1, 1.2 loadcfg.c, 1.150, 1.151
Fabian Keil <[email protected]> Tue, 03 May 2016 13:21:44 +0000
| Newsgroups | gmane.comp.web.privoxy.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28608
Modified Files:
client-tags.h loadcfg.c
Log Message:
Limit the names of client tags to 50 characters
Index: client-tags.h
===================================================================
RCS file: /cvsroot/ijbswa/current/client-tags.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** client-tags.h 17 Mar 2016 10:42:27 -0000 1.1
--- client-tags.h 3 May 2016 13:21:42 -0000 1.2
***************
*** 41,43 ****
--- 41,45 ----
extern int client_has_requested_tag(const char *client_address,
const char *tag);
+
+ #define CLIENT_TAG_LENGTH_MAX 50
#endif
Index: loadcfg.c
===================================================================
RCS file: /cvsroot/ijbswa/current/loadcfg.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** loadcfg.c 27 Mar 2016 16:54:50 -0000 1.150
--- loadcfg.c 3 May 2016 13:21:42 -0000 1.151
***************
*** 86,89 ****
--- 86,92 ----
#include "cgi.h"
#include "gateway.h"
+ #ifdef FEATURE_CLIENT_TAGS
+ #include "client-tags.h"
+ #endif
const char loadcfg_h_rcs[] = LOADCFG_H_VERSION;
***************
*** 776,779 ****
--- 779,793 ----
}
*description = '\0';
+ /*
+ * The length is limited because we don't want truncated
+ * HTML caused by the cgi interface using static buffer
+ * sizes.
+ */
+ if (strlen(name) > CLIENT_TAG_LENGTH_MAX)
+ {
+ log_error(LOG_LEVEL_FATAL,
+ "client-specific-tag '%s' is longer than %d characters.",
+ name, CLIENT_TAG_LENGTH_MAX);
+ }
description++;
register_tag(config->client_tags, name, description);
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z