Support » Plugin: NinjaFirewall (WP Edition) - Advanced Security » How to turn off ” your request cannot be processed” error message?

  • Resolved talgalili

    (@talgalili)


    My site has the following error in all internal pages:

    Sorry %%REM_ADDRESS%%, your request cannot be processed.For security reasons, it was blocked and logged.%%NINJA_LOGO%%If you believe this was an error please contact thewebmaster and enclose the following incident ID:[ #%%NUM_INCIDENT%% ]

    Which option should I turn off to remove these messages?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author nintechnet

    (@nintechnet)

    This isn’t an option but either a bug, an error or conflict.
    Can you try to keep NinjaFirewall enabled and, one by one, disable other plugin to see if the message goes away?

    Can you also enable debugging in WordPress and see if there’s anything written to the PHP error log?

    1. Edit your wp-config.php
    2. Search for:
    define('WP_DEBUG', false);
    3. Replace with:
    define('WP_DEBUG', true);
    4. Add this line below:
    define( 'WP_DEBUG_LOG', true );

    The log (if any) will be located in “/wp-content/debug.log”.
    After debugging, don’t forget to undo those changes.

    Hi @nintechnet
    Thank you for the reply.
    I turned off all my plugins, and turned on debugging.
    The error still persists. I believe this is related to theme I’m using (jobroller).
    The debug log doesn’t seem very helpful:

    [20-Jun-2020 19:08:51 UTC] PHP Deprecated:  contextual_help is <strong>deprecated</strong> since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead. in /home/rusers/public_html/wp-includes/functions.php on line 5089
    [20-Jun-2020 19:09:27 UTC] PHP Deprecated:  appthemes_recaptcha is <strong>deprecated</strong> since version 1.8.3! Use appthemes_display_recaptcha() instead. in /home/rusers/public_html/wp-includes/functions.php on line 4714
    [20-Jun-2020 19:09:58 UTC] PHP Deprecated:  contextual_help is <strong>deprecated</strong> since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead. in /home/rusers/public_html/wp-includes/functions.php on line 5089

    I’m not sure what else can be done to mitigate the issue. I’ve reported this to the theme developers. But in the meantime, is there a way to turn off this false-alarm message?

    Thanks!

    Plugin Author nintechnet

    (@nintechnet)

    I can’t see how you could mask that error.
    If you try to temporarily switch to another theme, does the error go away?

    I manually added:
    $message = ”;
    To the file
    ninjafirewall.php
    in line 74.

    This solved the issue for me.

    Any chance to add it as a definition in the plugin so I could do it from the option menu (and that it would keep the definitions between version upgrades)?

    Plugin Author nintechnet

    (@nintechnet)

    I think the issue comes from your theme jobroller: it makes use of the $message variable and I think it echoes the NF $message variable.
    Can you try to rename it in ninjafirewall.php? There are two occurrences L68 and L74:

    $message = '<br /><br /><br /><br /><center>' .
          sprintf( __('Sorry %s, your request cannot be processed.', 'ninjafirewall'), '<b>%%REM_ADDRESS%%</b>') .
          '<br />' . __('For security reasons, it was blocked and logged.', 'ninjafirewall') .
          '<br /><br />%%NINJA_LOGO%%<br /><br />' .
          __('If you believe this was an error please contact the<br />webmaster and enclose the following incident ID:', 'ninjafirewall') .
          '<br /><br />[ <b>#%%NUM_INCIDENT%%</b> ]</center>';
    define( 'NFW_DEFAULT_MSG', $message );
    

    Replace the 2 $message with $nfw_message so that it looks like this:

    $nfw_message = '<br /><br /><br /><br /><center>' .
          sprintf( __('Sorry %s, your request cannot be processed.', 'ninjafirewall'), '<b>%%REM_ADDRESS%%</b>') .
          '<br />' . __('For security reasons, it was blocked and logged.', 'ninjafirewall') .
          '<br /><br />%%NINJA_LOGO%%<br /><br />' .
          __('If you believe this was an error please contact the<br />webmaster and enclose the following incident ID:', 'ninjafirewall') .
          '<br /><br />[ <b>#%%NUM_INCIDENT%%</b> ]</center>';
    define( 'NFW_DEFAULT_MSG', $nfw_message );
    

    Thanks @nintechnet ,
    This modification indeed solves it. Could you please include this change in the next version of ninjafirewall?

    Plugin Author nintechnet

    (@nintechnet)

    Yes, I’ll make the change in the next release.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.