commit d32aceb: [Fix] Fix parsing of the html tags with no spaces after attributes

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Mar 3 22:15:23 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-03-02 12:41:11 +0000
URL: https://github.com/rspamd/rspamd/commit/d32aceb3b3fefc24c13a821c8eca0c4923cdbb48

[Fix] Fix parsing of the html tags with no spaces after attributes

---
 src/libserver/html.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libserver/html.c b/src/libserver/html.c
index df1773f71..78c69406c 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -1302,6 +1302,11 @@ rspamd_html_parse_tag_content (rspamd_mempool_t *pool,
 		else if (*in == '/' && *(in + 1) == '>') {
 			tag->flags |= FL_CLOSED;
 		}
+		else {
+			/* No space, proceed immediately to the attribute name */
+			state = parse_attr_name;
+			*savep = in;
+		}
 		break;
 
 	case spaces_after_param:


More information about the Commits mailing list