mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-09-12 21:28:25 -04:00
dowild()'s literal path folds the pattern char, but the [class]/[a-z] path compared unfolded pattern bytes against the (folded) text, so iwildmatch() was still case-asymmetric for character classes and ranges -- e.g. a daemon 'hosts deny = [A-Z]*.EVIL.COM' failed to match a lower-case host (access-control fail-open, same class as the literal case). Fold p_ch for the escaped-member, range-endpoint and plain-member comparisons; the range start (prev_ch) picks up the folded value too. Only active under force_lower_case (iwildmatch), so case-sensitive wildmatch() is unchanged. Reported-by: Leonid Bugaev