X-Git-Url: http://www.privoxy.org/gitweb/seealso.html?a=blobdiff_plain;f=loadcfg.c;h=a41bcfbd0b90fb30b6b51ca7b3f8c0267c546f5d;hb=cdce878b344dabb6c0b348f4c0a8eb9c5b86dd3c;hp=2426964e56be3e910953b11be100bf148a03fca2;hpb=4032e0039bc0508419902f7d81150a065181f1e4;p=privoxy.git diff --git a/loadcfg.c b/loadcfg.c index 2426964e..a41bcfbd 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,4 +1,4 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.149 2016/03/17 18:20:57 fabiankeil Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.150 2016/03/27 16:54:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ @@ -85,6 +85,9 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.149 2016/03/17 18:20:57 fabiankei #include "urlmatch.h" #include "cgi.h" #include "gateway.h" +#ifdef FEATURE_CLIENT_TAGS +#include "client-tags.h" +#endif const char loadcfg_h_rcs[] = LOADCFG_H_VERSION; @@ -775,6 +778,17 @@ struct configuration_spec * load_config(void) "client-specific-tag '%s' lacks a description.", name); } *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); }