[nginx] Syslog: allowed underscore symbol in tag (ticket #667).

Homutov Vladimir vl at nginx.com
Thu Nov 20 17:36:01 UTC 2014


details:   http://hg.nginx.org/nginx/rev/68f64bc17fa4
branches:  
changeset: 5922:68f64bc17fa4
user:      Vladimir Homutov <vl at nginx.com>
date:      Thu Nov 20 20:02:21 2014 +0300
description:
Syslog: allowed underscore symbol in tag (ticket #667).

diffstat:

 src/core/ngx_syslog.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 5004210e8c78 -r 68f64bc17fa4 src/core/ngx_syslog.c
--- a/src/core/ngx_syslog.c	Thu Nov 20 15:24:42 2014 +0300
+++ b/src/core/ngx_syslog.c	Thu Nov 20 20:02:21 2014 +0300
@@ -182,10 +182,11 @@ ngx_syslog_parse_args(ngx_conf_t *cf, ng
             for (i = 4; i < len; i++) {
                 c = ngx_tolower(p[i]);
 
-                if (c < '0' || (c > '9' && c < 'a') || c > 'z') {
+                if (c < '0' || (c > '9' && c < 'a' && c != '_') || c > 'z') {
                     ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                        "syslog \"tag\" only allows "
-                                       "alphanumeric characters");
+                                       "alphanumeric characters "
+                                       "and underscore");
                     return NGX_CONF_ERROR;
                 }
             }



More information about the nginx-devel mailing list