]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Compare local_name case insensitive
authorAki Tuomi <aki.tuomi@dovecot.fi>
Sat, 15 Oct 2016 20:04:35 +0000 (23:04 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 19 Oct 2016 12:42:08 +0000 (15:42 +0300)
DNS and certificate names should be compared
case insensitive.

src/config/config-filter.c

index e8cc010422d2cf2662d4b2dba871bf93c2c8d369..87a24da26cd7ea1b9fff0028d9a76682f4c225c5 100644 (file)
@@ -36,7 +36,7 @@ static bool config_filter_match_rest(const struct config_filter *mask,
        if (mask->local_name != NULL) {
                if (filter->local_name == NULL)
                        return FALSE;
-               if (strcmp(filter->local_name, mask->local_name) != 0)
+               if (strcasecmp(filter->local_name, mask->local_name) != 0)
                        return FALSE;
        }
        /* FIXME: it's not comparing full masks */
@@ -82,7 +82,7 @@ bool config_filters_equal(const struct config_filter *f1,
        if (!net_ip_compare(&f1->local_net, &f2->local_net))
                return FALSE;
 
-       if (null_strcmp(f1->local_name, f2->local_name) != 0)
+       if (null_strcasecmp(f1->local_name, f2->local_name) != 0)
                return FALSE;
 
        return TRUE;