Browse code

change order of checks whitelist/isURL

git-svn: trunk@3637

Török Edvin authored on 2008/02/15 05:58:03
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Feb 14 22:45:03 EET 2008 (edwin)
2
+------------------------------------
3
+  * libclamav/phischeck.c: change order of checks whitelist/isURL
4
+
1 5
 Thu Feb 14 21:31:47 CET 2008 (tk)
2 6
 ---------------------------------
3 7
   * libclamav/matcher-ac.c: fix handling of root->ac_pattable (bb#837)
... ...
@@ -1138,9 +1138,6 @@ static enum phish_status phishingCheck(const struct cl_engine* engine,struct url
1138 1138
 	cli_dbgmsg("Phishcheck:URL after cleanup: %s->%s\n", urls->realLink.data,
1139 1139
 		urls->displayLink.data);
1140 1140
 
1141
-	if(whitelist_check(engine, urls, 0))
1142
-		return CL_PHISH_CLEAN;/* if url is whitelisted don't perform further checks */
1143
-
1144 1141
 	if((!isURL(pchk, urls->displayLink.data) || !isRealURL(pchk, urls->realLink.data) ) &&
1145 1142
 			( (phishy&PHISHY_NUMERIC_IP && !isNumericURL(pchk, urls->displayLink.data)) ||
1146 1143
 			  !(phishy&PHISHY_NUMERIC_IP))) {
... ...
@@ -1148,12 +1145,8 @@ static enum phish_status phishingCheck(const struct cl_engine* engine,struct url
1148 1148
 		return CL_PHISH_CLEAN;
1149 1149
 	}
1150 1150
 
1151
-	if(domainlist_match(engine, urls->realLink.data, urls->displayLink.data, NULL, 0, &urls->flags)) {
1152
-		phishy |= DOMAIN_LISTED;
1153
-	} else {
1154
-		/* although entire url is not listed, the host might be,
1155
-		 * so defer phishing decisions till we know if host is listed*/
1156
-	}
1151
+	if(whitelist_check(engine, urls, 0))
1152
+		return CL_PHISH_CLEAN;/* if url is whitelisted don't perform further checks */
1157 1153
 
1158 1154
 	url_check_init(&host_url);
1159 1155