]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] HTML: Fix some more SGML tags issues
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 4 Feb 2019 14:59:26 +0000 (14:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 4 Feb 2019 14:59:26 +0000 (14:59 +0000)
Issue: #2738

src/libserver/html.c

index e00746c51b0ab9a414c6508abb180cc3f0e2fc90..c33aacf826ab136a6b7e0957f60068e90c2abb63 100644 (file)
@@ -2589,8 +2589,7 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc,
                                /* Empty tag */
                                hc->flags |= RSPAMD_HTML_FLAG_BAD_ELEMENTS;
                                state = tag_end;
-                               p ++;
-                               break;
+                               continue;
                        default:
                                state = tag_content;
                                substate = 0;
@@ -2640,6 +2639,7 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc,
                case xml_tag_end:
                        if (t == '>') {
                                state = tag_end;
+                               continue;
                        }
                        else {
                                hc->flags |= RSPAMD_HTML_FLAG_BAD_ELEMENTS;
@@ -2656,6 +2656,7 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc,
                        }
                        else if (t == '>' && obrace == ebrace) {
                                state = tag_end;
+                               continue;
                        }
                        p ++;
                        break;