Home > Net >  Wordfence: A potentially unsafe operation has been detected (http response code 403)
Wordfence: A potentially unsafe operation has been detected (http response code 403)

Time:05-22

I have implemented a question and answer forum for programming questions using WordPress.
Wordfence plugin is installed on my WordPress system.
Content of posts have programming code with syntax highlighter.
ِData are inserted as AJAX request.
The following error occurs when I use html syntax in posts:

A potentially unsafe operation has been detected in your request to this site
Your access to this service has been limited. (HTTP response code 403)

If you think you have been blocked in error, contact the owner of this site for assistance.

Block Technical Data
Block Reason:   A potentially unsafe operation has been detected in your request to this site

The code I want to insert is:

function redirect($url)
{
    @header('location: ' . $url);
    exit('<meta http-equiv="Refresh" content="0;url='. $url .'">');
}

Will this problem be solved if the post is not inserted as ajax?
What's the solution?

CodePudding user response:

Wordfence is like Norton and will block/kill certain things. Try to visit your site with ?page_id=../../../../../etc/passwd it will trigger wordfence even if page_id is not a valid parameter.

uninstall wordfence

CodePudding user response:

please try to use wordpress functions like this:

function redirect($url)
{
    wp_redirect($url, 301);
    exit;
}
  • Related