]> source.dussan.org Git - rspamd.git/commitdiff
Fix xml parsing for param tags.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Nov 2013 12:56:45 +0000 (12:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Nov 2013 12:56:45 +0000 (12:56 +0000)
src/cfg_xml.c

index b8b75b715ee166c88aa584d7c2894dec671bad41..9c60d8a7f78970919e09e7f32e644a712ae6bb40 100644 (file)
@@ -784,8 +784,11 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam
                                if (extract_attr ("value", attribute_names, attribute_values, &res)) {
                                        element_name = res;
                                }
+                               else if (extract_attr ("name", attribute_names, attribute_values, &res)) {
+                                       element_name = res;
+                               }
                                else {
-                                       *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "param 'value' is required for tag 'param'");
+                                       *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "attribute 'value' or 'name' are required for tag 'param'");
                                        ud->state = XML_ERROR;
                                }
                        }