Mercurial > dnsbl
comparison src/context.cpp @ 100:63e8633abc34 stable-5-8
allow empty env_to at global context to remove all restrictions on child contexts
author | carl |
---|---|
date | Sun, 25 Sep 2005 08:38:29 -0700 |
parents | f8963ddf7143 |
children | 6ac7ba4a8312 |
comparison
equal
deleted
inserted
replaced
99:f8963ddf7143 | 100:63e8633abc34 |
---|---|
517 char buffer[maxlen]; | 517 char buffer[maxlen]; |
518 char *x = strchr(to, '@'); | 518 char *x = strchr(to, '@'); |
519 if (x) x++; | 519 if (x) x++; |
520 else x = to; | 520 else x = to; |
521 if (*x == '\0') return true; // always allow covering addresses with no domain name, eg abuse@ | 521 if (*x == '\0') return true; // always allow covering addresses with no domain name, eg abuse@ |
522 if (!parent && env_to.empty()) return true; // empty env_to at global level covers everything | |
522 string_set::iterator i = env_to.find(x); | 523 string_set::iterator i = env_to.find(x); |
523 if (i != env_to.end()) return true; | 524 if (i != env_to.end()) return true; |
524 return false; | 525 return false; |
525 } | 526 } |
526 | 527 |