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

Open
bobbingwide opened this Issue Jan 4, 2019 · 3 comments

Comments

Projects
None yet
1 participant
@bobbingwide
Copy link
Owner

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.

e.g.

A short call to action sentence http://example.com/pretty-daft-looking-link

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

Requirement

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
@bobbingwide

This comment has been minimized.

Copy link
Owner

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
@bobbingwide

This comment has been minimized.

Copy link
Owner

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] => chivalrous1989spam@yahoo.com
    [oiku_text] => Get $1500 – $6000 per DAY: http://go.fireontherim.com/bestinvestsystems43210
    [_oik_contact_nonce] => 4befd14295
    [oiku_email_to] => herb@bobbingwide.com
    [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.

@bobbingwide

This comment has been minimized.

Copy link
Owner

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