Totally Zenned
- Join Date:
- Dec 2007
- Location:
- Payson, AZ
- Posts:
- 1,075
- Plugin Contributions:
- 7
Suggestion for spam filtering
In ZC1.5.7x the regex line is only checking for HTTPS and FTPS with in the input fields.
While catching spam input coming through my site and information from other networks, I see often things like mysite DOT com, mysite(DOT)com, https://www.mysite.com, http://www.mysite.com then the none payload spammers we see email addresses in non-email fields mailto:[email protected], [email protected].
I changed it to this after testing on a regex tester/debugger. ```
$reg_exUrl = "/(([A-Za-z]{3,9}:(?://)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+|(?:DOT\W)+)/";
Not sure if I'm missing the reason for the shorter test but it wasn't catching all of the spam for me..
Also thinking to the future, I'd like to use a configuration field to list the input field names to test. Mods such as testimonial manager could add it's fields or I just need to update the mod to use the most common names! I find it's easy to add to the list, but others may not understand it. Thoughts?
Dave
Always forward thinking... Lost my mind!