Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7401605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:31:05+00:00 2026-05-29T04:31:05+00:00

Struggling with this one. I have set up a basic email/enquiry form for a

  • 0

Struggling with this one.

I have set up a basic email/enquiry form for a client using WordPress (Fast secure contact form – Mike Challis, which I’ve used before with no problem).

I tested it with various emails – got others to test – All fine.

Passed on to client for approval and his email address (two of them) create the error: Illegal characters in POST. Possible email injection attempt

One is a BT email the other is Gmail. I have tested again with BT and Gmail all fine for my addresses – I try his again and the same error.

I did have the account password protected while testing so disabled that to see if that was the problem but makes no difference.

There’s quite a bit of code so I won’t paste it yet as someone my know instantly why this would be.

My original form had some customisations (only visual) but even when going back the simplest new install of the plugin, same error – only with clients email addresses. Embarrassing.

Would really appreciate your hunches.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:31:07+00:00Added an answer on May 29, 2026 at 4:31 am

    I’ve found this code in the plugin (line 1433 and onwards in the latest wordpress plugin version):

    // check posted input for email injection attempts
    // Check for these common exploits
    // if you edit any of these do not break the syntax of the regex
    $input_expl = "/(content-type|mime-version|content-transfer-encoding|to:|bcc:|cc:|document.cookie|document.write|onmouse|onkey|onclick|onload)/i";
    // Loop through each POST'ed value and test if it contains one of the exploits fromn $input_expl:
    foreach($_POST as $k => $v){
        if (is_string($v)){
            $v = strtolower($v);
            $v = str_replace('donkey','',$v); // fixes invalid input with "donkey" in string
            $v = str_replace('monkey','',$v); // fixes invalid input with "monkey" in string
            if( preg_match($input_expl, $v) ){
                return __('Illegal characters in POST. Possible email injection attempt', 'si-contact-form');
            }
        }
    }
    

    The error occurs when at least one of the posted fields contain an ‘invalid’ value anywhere in the string. The most likely candidates that trigger this error on email addresses would seem to be onmouse, onkey, onclick, and onload. (Note that the words ‘donkey’ and ‘monkey’ are allowed.) You should check the value of $v just before the return statement so you can determine which section causes the error, then you can decide how to solve the problem.

            if( preg_match($input_expl, $v) ){
                var_dump($v); exit(); // <-- add this for testing
                return __('Illegal characters in POST. Possible email injection attempt', 'si-contact-form');
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, struggling to get a definitive answer to this one... I have an application
I'm struggling... used google and have come up with no answers to this one!
So I have been struggling with this one all morning. I have read a
I'm really struggling to get this to work in xcode 4. I have one
I've been struggling with this one SQL query requirement today that I was wondering
I've been struggling with this one for a couple of days now. My current
Hey, I'm really struggling with this one. I'am trying to port a small piece
I am struggling a bit to figure this one out. I'm working on an
I've been struggling for a while with this one; I'll try to explain it
This is a bit of a strange one, but I've been struggling for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.