search for: allowed_first

Displaying 3 results from an estimated 3 matches for "allowed_first".

2018 Sep 10
1
Re: [PATCH nbdkit v3 2/6] main: Tighten up characters permitted in config keys.
...> + * > + * Note this doesn't return an error. If the key is not valid then we > + * return false and the parsing code will assume that this is a bare > + * value instead. > + */ > +static int > +is_config_key (const char *key, size_t len) > +{ > + static const char allowed_first[] = > + "abcdefghijklmnopqrstuvwxyz" > + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; > + static const char allowed[] = > + "abcdefghijklmnopqrstuvwxyz" > + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" > + "0123456789" > + "._-";...
2018 Sep 10
0
[PATCH nbdkit v3 2/6] main: Tighten up characters permitted in config keys.
...numeric with period, + * underscore or dash. + * + * Note this doesn't return an error. If the key is not valid then we + * return false and the parsing code will assume that this is a bare + * value instead. + */ +static int +is_config_key (const char *key, size_t len) +{ + static const char allowed_first[] = + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static const char allowed[] = + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + "._-"; + + if (len == 0) + return 0; +...
2018 Sep 10
7
[PATCH nbdkit v3 0/6] plugins: Implement magic config key.
v1: https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html v2: https://www.redhat.com/archives/libguestfs/2018-September/msg00034.html v3: - Fixed is_config_key zero length test. - Fixed is_config_key so it uses strspn and is not O(n^2). - Changed >= 1.7 to >= 1.8 in the documentation. Rich.