mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix case-sensitivity bug in zone filename token-parsing
The setfilename() function uses case-insensitive strcasestr() when matching the possible tokens, but then one of the token parsers uses case-sensitive INSIST checks which can assert when, for example, matching '%X' and INSIST only accepts '%x'. The case-insensitivity is documented, which means it's the parser that needs to be fixed, not the matcher. Convert the character to lowercase before checking the token's validity.
This commit is contained in:
parent
07c8cddb4c
commit
d2f7b969fe
1 changed files with 1 additions and 1 deletions
|
|
@ -366,7 +366,7 @@ tokenparse_label(const token_names_t *names, const foundtoken_t *token,
|
|||
dns_name_copy(dns_rootname, target);
|
||||
labels = dns_name_countlabels(names->zonename);
|
||||
|
||||
labeltokidx = token->pos[token->len - 1];
|
||||
labeltokidx = isc_ascii_tolower(token->pos[token->len - 1]);
|
||||
if (token->len == 2) {
|
||||
/*
|
||||
* %z, %y, %x pattern
|
||||
|
|
|
|||
Loading…
Reference in a new issue