New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple spam checking for [bw_contact_form] #116

bobbingwide opened this Issue Jan 4, 2019 · 3 comments


None yet
1 participant
Copy link

bobbingwide commented Jan 4, 2019

For a while now I've been getting Contact form submissions that appear to come from user name WordPress with a reasonable email address and a message containing a single sentence followed by a link.


A short call to action sentence

These emails come through on sites where Akismet is not activated.


Reduce amount of spam being sent

Proposed solution

  • Add logic to check for unwanted URLs
  • Default to allowing 0
  • Treat any submission as spam if the number of URLs exceeds the allowed
  • Do this regardless of Akismet status

This comment has been minimized.

Copy link

bobbingwide commented Jan 4, 2019

The first solution

  • only does the check if Akismet is not available.
  • It doesn't allow for any URLs in the message body.
  • It doesn't check the subject

This comment has been minimized.

Copy link

bobbingwide commented Jan 15, 2019

OK, so I've captured the actual request for a spam submission. Here are the values passed.

home/wwwbigr/public_html/wp-content/plugins/oik-bwtrace/includes/class-BW-trace-controller.php(368:0) trace_startup(2) 8 2019-01-15T03:36:43+00:00 0.005113 0.000071 cf! 1 0 16777216/16777216 128M F=150 _REQUEST Array
    [q] => some-blurb/contact-us/
    [oiku_email] =>
    [oiku_text] => Get $1500 – $6000 per DAY:
    [_oik_contact_nonce] => 4befd14295
    [oiku_email_to] =>
    [oiku_contact-2] => Contact Herb Miller

There's nothing really out of the ordinary apart from the unwanted payload, and a silly email address.

Both the GET and the POST came from the same IP address,
and the HTTP_USER_AGENT looked normal, though dated.

Spammer - Windows 8.1

Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36

Mine - Windows 10

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML; like Gecko) Chrome/71.0.3578.98 Safari/537.36,

Note: It took 3.8 seconds to send the email; that's the time between trace records between bw_get_email_headers() and bw_send_email(). But that's another issue.


This comment has been minimized.

Copy link

bobbingwide commented Jan 15, 2019

The new version of the code ( in oik v3.2.9 ) has now been deployed on a number of sites and appears to be working well, though there was a problem on one where an error occurred during the send.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment