On 11/13/09 10:22, Urs Weiss wrote:
Hi Robert,
f.ex. "sdfsdfs" does not work.
For one of my OSS project i made a regex which matches an IP address:
^(25[0-5]|2[0-4]\d|1\d\d|\d?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|\d?\d)){3}$
This exactly checks a valid IP address without any netmask (but can
easily be added) Maybe this helps for a better checking.
Urs
Hi Urs,
Please try the attached patch. This will skip invalid whitelist entries.
Robert
Index: cbp/modules/Greylisting.pm
===================================================================
--- cbp/modules/Greylisting.pm (revision 483)
+++ cbp/modules/Greylisting.pm (working copy)
@@ -230,17 +230,14 @@
return $server->protocol_response(PROTO_PASS);
}
} else {
- $server->log(LOG_ERR,"[GREYLISTING] Failed to parse address '$address' is invalid.");
- DBFreeRes($sth);
- return $server->protocol_response(PROTO_DATA_ERROR);
+ $server->log(LOG_WARN,"[GREYLISTING] Skipping invalid address '$address'.");
}
} else {
- $server->log(LOG_ERR,"[GREYLISTING] Whitelist entry '".$row->{'source'}."' is invalid.");
- DBFreeRes($sth);
- return $server->protocol_response(PROTO_DATA_ERROR);
+ $server->log(LOG_WARN,"[GREYLISTING] Skipping invalid whitelist entry '".$row->{'source'}."'.");
}
}
+ DBFreeRes($sth);
#
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users