]> git.kaiwu.me - nginx.git/commitdiff
Syslog: allowed underscore symbol in tag (ticket #667).
authorVladimir Homutov <vl@nginx.com>
Thu, 20 Nov 2014 17:02:21 +0000 (20:02 +0300)
committerVladimir Homutov <vl@nginx.com>
Thu, 20 Nov 2014 17:02:21 +0000 (20:02 +0300)
src/core/ngx_syslog.c

index 616fd712e81c75b7c60f6c4d0bcac8c6036eb6cb..d4e79f67d9f319c4409751459e1febba57343e75 100644 (file)
@@ -182,10 +182,11 @@ ngx_syslog_parse_args(ngx_conf_t *cf, ngx_syslog_peer_t *peer)
             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;
                 }
             }