git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@853 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/09/13 22:18:52... | ... |
@@ -1,3 +1,10 @@ |
1 |
+Mon Sep 13 14:17:01 BST 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/mbox.c: return with CL_EFORMAT if mail can't be parsed |
|
4 |
+ clamav-milter: Updated SESSION code. Not enabled by default - don't |
|
5 |
+ use in a production environment, but testing |
|
6 |
+ feedback would be welcome |
|
7 |
+ |
|
1 | 8 |
Mon Sep 13 11:23:21 BST 2004 (trog) |
2 | 9 |
----------------------------------- |
3 | 10 |
* libclamav: re-write HTML code: |
... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: mbox.c,v $ |
20 |
+ * Revision 1.116 2004/09/13 13:16:28 nigelhorne |
|
21 |
+ * Return CL_EFORMAT on bad format |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.115 2004/09/06 11:02:08 nigelhorne |
21 | 24 |
* Normalise HTML before scanning for URLs to download |
22 | 25 |
* |
... | ... |
@@ -333,7 +336,7 @@ |
333 | 333 |
* Compilable under SCO; removed duplicate code with message.c |
334 | 334 |
* |
335 | 335 |
*/ |
336 |
-static char const rcsid[] = "$Id: mbox.c,v 1.115 2004/09/06 11:02:08 nigelhorne Exp $"; |
|
336 |
+static char const rcsid[] = "$Id: mbox.c,v 1.116 2004/09/13 13:16:28 nigelhorne Exp $"; |
|
337 | 337 |
|
338 | 338 |
#if HAVE_CONFIG_H |
339 | 339 |
#include "clamav-config.h" |
... | ... |
@@ -418,6 +421,8 @@ typedef enum { FALSE = 0, TRUE = 1 } bool; |
418 | 418 |
|
419 | 419 |
#ifdef FOLLOWURLS |
420 | 420 |
|
421 |
+#include "htmlnorm.h" |
|
422 |
+ |
|
421 | 423 |
#define MAX_URLS 5 /* |
422 | 424 |
* Maximum number of URLs scanned in a message |
423 | 425 |
* part |
... | ... |
@@ -716,10 +721,7 @@ cli_mbox(const char *dir, int desc, unsigned int options) |
716 | 716 |
*/ |
717 | 717 |
if(messageGetBody(body)) |
718 | 718 |
if(!parseEmailBody(body, NULL, dir, rfc821, subtype, options)) |
719 |
- /* |
|
720 |
- * There is no mailformed e-mail return code |
|
721 |
- */ |
|
722 |
- retcode = -1; |
|
719 |
+ retcode = CL_EFORMAT; |
|
723 | 720 |
|
724 | 721 |
/* |
725 | 722 |
* Tidy up and quit |
... | ... |
@@ -1707,7 +1709,8 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t |
1707 | 1707 |
fileblobSetFilename(fb, dir, "bounce"); |
1708 | 1708 |
fb = textToFileblob(t_line, fb); |
1709 | 1709 |
fileblobDestroy(fb); |
1710 |
- } |
|
1710 |
+ } else |
|
1711 |
+ cli_dbgmsg("Not found a bounce message\n"); |
|
1711 | 1712 |
} else { |
1712 | 1713 |
bool saveIt; |
1713 | 1714 |
|
... | ... |
@@ -2140,6 +2143,7 @@ checkURLs(message *m, const char *dir) |
2140 | 2140 |
tableDestroy(t); |
2141 | 2141 |
return; |
2142 | 2142 |
} |
2143 |
+ /* TODO: Do we need to call remove_html_comments? */ |
|
2143 | 2144 |
|
2144 | 2145 |
/* |
2145 | 2146 |
* cli_memstr(ptr, len, "<a href=", 8) |