diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-02-02 16:47:21 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-02-02 16:47:21 +0000 |
commit | 957e841f1d7d045a33f5d363fe81f33370190b20 (patch) | |
tree | 303a374c226fa330e5f30656ea7f3603bdca8963 /src | |
parent | 83b9c39e0b1844a49b852af677364619913eb91e (diff) | |
download | rspamd-957e841f1d7d045a33f5d363fe81f33370190b20.tar.gz rspamd-957e841f1d7d045a33f5d363fe81f33370190b20.zip |
[Minor] HTML: Extract urls from `action` attribute
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/html.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index 0dd6eb5cd..5b3aafca0 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -84,7 +84,7 @@ static struct html_tag_def tag_defs[] = { TAG_DEF(Tag_EM, "em", (CM_INLINE)), TAG_DEF(Tag_FIELDSET, "fieldset", (CM_BLOCK)), TAG_DEF(Tag_FONT, "font", (FL_BLOCK)), - TAG_DEF(Tag_FORM, "form", (CM_BLOCK)), + TAG_DEF(Tag_FORM, "form", (CM_BLOCK|FL_HREF)), TAG_DEF(Tag_FRAME, "frame", (CM_FRAMES | CM_EMPTY | FL_HREF)), TAG_DEF(Tag_FRAMESET, "frameset", (CM_HTML | CM_FRAMES)), TAG_DEF(Tag_H1, "h1", (CM_BLOCK | CM_HEADING)), @@ -1000,6 +1000,11 @@ rspamd_html_parse_tag_component (rspamd_mempool_t *pool, NEW_COMPONENT (RSPAMD_HTML_COMPONENT_HREF); } } + else if (len == 6) { + if (g_ascii_strncasecmp (p, "action", len) == 0) { + NEW_COMPONENT (RSPAMD_HTML_COMPONENT_HREF); + } + } if (tag->id == Tag_IMG) { /* Check width and height if presented */ |