commit 39b6052: [Minor] Some more fixes in state machine

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jul 12 13:56:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-12 14:24:03 +0100
URL: https://github.com/rspamd/rspamd/commit/39b6052256fda5925af375aa443462aac1be2d6f

[Minor] Some more fixes in state machine

---
 src/libserver/html/html.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 7f31ba650..6407f3e17 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1703,10 +1703,10 @@ html_process_input(rspamd_mempool_t *pool,
 					state = content_style;
 				}
 				if (html_document_state == html_document_state::doctype) {
-					if (cur_tag->id == Tag_HEAD) {
+					if (cur_tag->id == Tag_HEAD || (cur_tag->flags & CM_HEAD)) {
 						html_document_state = html_document_state::head;
 					}
-					else {
+					else if (cur_tag->id != Tag_HTML) {
 						html_document_state = html_document_state::body;
 					}
 				}


More information about the Commits mailing list