mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
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.
This commit is contained in:
parent
07e1e3c93e
commit
a71667c07d
@ -373,13 +373,13 @@ extern const char *invalid_domainchar(const char *name);
|
|||||||
extern const char *invalid_prefix_char(const char *name);
|
extern const char *invalid_prefix_char(const char *name);
|
||||||
|
|
||||||
/* returns true if <c> is an identifier character, that is, a digit, a letter,
|
/* returns true if <c> is an identifier character, that is, a digit, a letter,
|
||||||
* or '-', '_', ':' or '.'. This is usable for proxy names, server names, ACL
|
* or '-', '+', '_', ':' or '.'. This is usable for proxy names, server names,
|
||||||
* names, sample fetch names, and converter names.
|
* ACL names, sample fetch names, and converter names.
|
||||||
*/
|
*/
|
||||||
static inline int is_idchar(char c)
|
static inline int is_idchar(char c)
|
||||||
{
|
{
|
||||||
return isalnum((int)(unsigned char)c) ||
|
return isalnum((int)(unsigned char)c) ||
|
||||||
c == '.' || c == '_' || c == '-' || c == ':';
|
c == '.' || c == '_' || c == '-' || c == '+' || c == ':';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user