Skip to content

Commit c062211

Browse files
committed
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 <[email protected]>
1 parent ff09758 commit c062211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syslogd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ parsemsg_rfc3164_app_name_procid(char **msg, char **app_name, char **procid)
12231223
"abcdefghijklmnopqrstuvwxyz"
12241224
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
12251225
"0123456789"
1226-
"_-/");
1226+
"._-/");
12271227
if (app_name_length == 0)
12281228
goto bad;
12291229
m += app_name_length;

0 commit comments

Comments
 (0)