Add hyphen support to is_valid_name validation

This commit is contained in:
RollerMatic 2025-08-21 18:54:20 -07:00
parent c223facc4d
commit cb2cf71397
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ static int is_valid_name(const char *name) {
// character set check // character set check
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
char c = name[i]; char c = name[i];
if (!isalnum(c) && c != '_' && c != '.' && c != ':') { if (!isalnum(c) && c != '_' && c != '.' && c != ':' && c != '-') {
report(LOG_DEBUG, "invalid character '%c' inside field [%s]", c, name); report(LOG_DEBUG, "invalid character '%c' inside field [%s]", c, name);
return 0; return 0;
} }