]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix case of SURBL symbols.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 4 Sep 2014 13:32:32 +0000 (14:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 4 Sep 2014 13:32:32 +0000 (14:32 +0100)
src/plugins/surbl.c
src/plugins/surbl.h

index a208291563cbe100ab5a7e98d9fd6014e2417aca..3f0d873d85e46f4e1517ee872ac6acac5cd5b3a1 100644 (file)
@@ -476,6 +476,8 @@ surbl_module_config (struct rspamd_config *cfg)
                                        ucl_iterate_object (cur, &it, true)) != NULL) {
                                        if (ucl_object_key (cur_bit) != NULL && cur_bit->type ==
                                                UCL_INT) {
+                                               gchar *p;
+
                                                bit = ucl_obj_toint (cur_bit);
                                                new_bit = rspamd_mempool_alloc (
                                                        surbl_module_ctx->surbl_pool,
@@ -484,6 +486,13 @@ surbl_module_config (struct rspamd_config *cfg)
                                                new_bit->symbol = rspamd_mempool_strdup (
                                                        surbl_module_ctx->surbl_pool,
                                                        ucl_object_key (cur_bit));
+                                               /* Convert to uppercase */
+                                               p = new_bit->symbol;
+                                               while (*p) {
+                                                       *p = g_ascii_toupper (*p);
+                                                       p ++;
+                                               }
+
                                                msg_debug ("add new bit suffix: %d with symbol: %s",
                                                        (gint)new_bit->bit, new_bit->symbol);
                                                new_suffix->bits = g_list_prepend (new_suffix->bits,
index 912e7fb110d583ec112d67a01f71f7401d1dcd58..1c97c2a4d270bdfff1037fbad47d7a85983b651a 100644 (file)
@@ -78,7 +78,7 @@ struct redirector_param {
 
 struct surbl_bit_item {
        guint32 bit;
-       const gchar *symbol;
+       gchar *symbol;
 };
 
 #endif