Mercurial > dnsbl
comparison src/dnsbl.cpp @ 26:fdae7ab30cfc
allow normal and terminator versions of tags
author | carl |
---|---|
date | Fri, 21 May 2004 21:55:38 -0700 |
parents | 2e23b7184d2b |
children | 43a4f6b3e668 |
comparison
equal
deleted
inserted
replaced
25:6176e7b2e8af | 26:fdae7ab30cfc |
---|---|
503 status st = check_single(ip, dc.content_suffix); | 503 status st = check_single(ip, dc.content_suffix); |
504 if (st == reject) return st; | 504 if (st == reject) return st; |
505 } | 505 } |
506 } | 506 } |
507 host = NULL; | 507 host = NULL; |
508 int bin = priv.memory->binary_tags; | |
508 int bad = priv.memory->bad_html_tags; | 509 int bad = priv.memory->bad_html_tags; |
509 int lim = priv.pc->bad_tag_limit; | 510 int lim = priv.pc->bad_tag_limit; |
511 if (bin > bad) return oksofar; // probably .zip or .tar.gz with random content | |
510 if ((bad > lim) && (lim > 0)) return reject; | 512 if ((bad > lim) && (lim > 0)) return reject; |
511 return oksofar; | 513 return oksofar; |
512 } | 514 } |
513 | 515 |
514 | 516 |
891 } break; | 893 } break; |
892 | 894 |
893 case htmltag: { | 895 case htmltag: { |
894 char *tag = next_token(delim); | 896 char *tag = next_token(delim); |
895 if (!tag) break; // no html tag value | 897 if (!tag) break; // no html tag value |
898 char buf[200]; | |
899 snprintf(buf, sizeof(buf), "/%s", tag); | |
896 dc.html_tags.insert(tag); | 900 dc.html_tags.insert(tag); |
901 dc.html_tags.insert(register_string(buf)); | |
897 processed = true; | 902 processed = true; |
898 } break; | 903 } break; |
899 | 904 |
900 case dnsbl: { | 905 case dnsbl: { |
901 // have a new dnsbl to use | 906 // have a new dnsbl to use |