git-svn: trunk@3171
Török Edvin authored on 2007/08/15 06:10:58... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Tue Aug 14 23:11:00 EEST 2007 (edwin) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/phishcheck.c: Don't report phishing on broken urls containing > |
|
4 |
+ in the hostname. (bb #619) |
|
5 |
+ |
|
1 | 6 |
Mon Aug 13 22:27:13 BST 2007 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* clamav-milter: Tidy up bug fix 614 |
... | ... |
@@ -625,7 +625,7 @@ str_strip(char **begin, const char **end, const char *what, size_t what_len) |
625 | 625 |
/* replace every occurrence of @c in @str with @r*/ |
626 | 626 |
static void str_replace(char* str,const char* end,char c,char r) |
627 | 627 |
{ |
628 |
- for(;str<end;str++) { |
|
628 |
+ for(;str<=end;str++) { |
|
629 | 629 |
if(*str==c) |
630 | 630 |
*str=r; |
631 | 631 |
} |
... | ... |
@@ -722,6 +722,10 @@ cleanupURL(struct string *URL, int isReal) |
722 | 722 |
int rc; |
723 | 723 |
|
724 | 724 |
str_replace(begin,end,'\\','/'); |
725 |
+ /* some broken MUAs put > in the href, and then |
|
726 |
+ * we get a false positive, so remove them */ |
|
727 |
+ str_replace(begin,end,'<','/'); |
|
728 |
+ str_replace(begin,end,'>','/'); |
|
725 | 729 |
str_strip(&begin,&end,"\"",1); |
726 | 730 |
str_strip(&begin,&end,lt,lt_len); |
727 | 731 |
str_strip(&begin,&end,gt,gt_len); |