]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix parsing of the escaped '#' in maps
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 6 Aug 2018 13:05:40 +0000 (14:05 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 6 Aug 2018 17:00:34 +0000 (18:00 +0100)
src/libutil/map_helpers.c

index 6c8117cff32aafd5a6328cf4a166ed2cfcd76fc2..c43c23277a5288db802a38077f1b4f421819f168 100644 (file)
@@ -150,7 +150,7 @@ rspamd_parse_kv_list (
                case map_read_key:
                        /* read key */
                        /* Check here comments, eol and end of buffer */
-                       if (*p == '#') {
+                       if (*p == '#' && (p == c || *(p - 1) != '\\')) {
                                if (p - c > 0) {
                                        /* Store a single key */
                                        MAP_STORE_KEY;