From a71667c07d4cd9f6d350e100caa9039a7fd2d7a1 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 17 Feb 2020 06:34:11 +0100 Subject: [PATCH] BUG/MINOR: tools: also accept '+' as a valid character in an identifier The function is_idchar() was added by commit 36f586b ("MINOR: tools: add is_idchar() to tell if a char may belong to an identifier") to ease matching of sample fetch/converter names. But it lacked support for the '+' character used in "base32+src" and "url32+src". A quick way to figure the list of supported sample fetch+converter names is to issue the following command: git grep '"[^"]*",.*SMP_T_.*SMP_USE_'|cut -f2 -d'"'|sort -u No more entry is reported once searching for characters not covered by is_idchar(). No backport is needed. --- include/common/standard.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common/standard.h b/include/common/standard.h index da2efcfbb..6d2432f99 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -373,13 +373,13 @@ extern const char *invalid_domainchar(const char *name); extern const char *invalid_prefix_char(const char *name); /* returns true if is an identifier character, that is, a digit, a letter, - * or '-', '_', ':' or '.'. This is usable for proxy names, server names, ACL - * names, sample fetch names, and converter names. + * or '-', '+', '_', ':' or '.'. This is usable for proxy names, server names, + * ACL names, sample fetch names, and converter names. */ static inline int is_idchar(char c) { return isalnum((int)(unsigned char)c) || - c == '.' || c == '_' || c == '-' || c == ':'; + c == '.' || c == '_' || c == '-' || c == '+' || c == ':'; } /*