diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-11 18:42:13 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-11 18:42:13 +0400 |
commit | b14402cd4ed5bf9b3efc0cc9d50c812b66a31f57 (patch) | |
tree | 7db7c93232fe4422e4ab76f0b8457644428d373f /src/message.c | |
parent | 9e6acadd7ce323f42ebed02237d064305df32249 (diff) | |
download | rspamd-b14402cd4ed5bf9b3efc0cc9d50c812b66a31f57.tar.gz rspamd-b14402cd4ed5bf9b3efc0cc9d50c812b66a31f57.zip |
Fix phishing detection with img flag.
Handle unclosed HTML tags properly.
Remove warnings for types on 32 bit archs.
Do not touch grow factor many times when one shot mode is turned on.
Diffstat (limited to 'src/message.c')
-rw-r--r-- | src/message.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c index 4db4bef7d..8ff53ea93 100644 --- a/src/message.c +++ b/src/message.c @@ -70,7 +70,13 @@ strip_html_tags (struct worker_task *task, memory_pool_t * pool, struct mime_tex state = 1; } else if (state == 1) { - depth++; + /* Opening bracket without closing one */ + p --; + while (g_ascii_isspace (*p) && p > src->data) { + p --; + } + p ++; + goto unbreak_tag; } break; @@ -107,7 +113,7 @@ strip_html_tags (struct worker_task *task, memory_pool_t * pool, struct mime_tex if (in_q) { break; } - +unbreak_tag: switch (state) { case 1: /* HTML/XML */ lc = '>'; |