From c0622119d6baf45dcaef01897f6c686f2eb92ee4 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 19 Mar 2025 06:35:39 +0100 Subject: [PATCH] Fix #102: allow '.' in tag names, regression in v2.7.1 RFC3164 specifies; "The TAG is a string of ABNF alphanumeric characters that MUST NOT exceed 32 characters. Any non-alphanumeric character will terminate the TAG field and will be assumed to be the starting character of the CONTENT field." Strictly speaking, ABNF (Augmented Backus-Naur Form) only includes the alphanumeric characters, meaning just be letters and digits. However, in real-life scenarios, and per previous behavior, we should definitely allow '.' as well. The existing argument to `strspn()` is from FreeBSD, which for some reason do *not* allow '.', but they do also allow '_-/' ... '/' seems like the real outlier here. Signed-off-by: Joachim Wiberg --- src/syslogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syslogd.c b/src/syslogd.c index 9128e7f..07abdf9 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -1223,7 +1223,7 @@ parsemsg_rfc3164_app_name_procid(char **msg, char **app_name, char **procid) "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" - "_-/"); + "._-/"); if (app_name_length == 0) goto bad; m += app_name_length;