• Hi!
    First let me congratulate you for the best security suite available to WordPress.
    Sadly I had to disable 5G Blacklist firewall rules because otherwise I can’t edit images in WordPress. Searching the net for a solution I found this:

    Dave January 31, 2013 at 4:56 pm

    A client discovered for me that the 5G (2013) Firewall interferes with the “Edit Image” tool bundled with WordPress:

    Go to Media > Library, click on an image
    Click Edit Image button
    Click the Rotate button (for instance)
    An error is displayed in red: “Could not load the preview image. Please reload the page and try again.”

    Through trial and error (me not being much of a regex or ajax guy), I found that modifying two lines of the 5G above fixes this:

    1. Line 8, comment out or remove this line:

    RewriteCond %{QUERY_STRING} (\”|%22).*(<|>|%3) [NC,OR]

    2. Line 12, remove the ‘and’ from the string, so it becomes:

    RewriteCond %{QUERY_STRING} (\;|\’|\”|%22).*(union|select|insert|drop|update|md5|benchmark|or|if) [NC,OR]

    I’m sure those lines are useful, so hope 5G can be updated to allow Edit Image to work without giving up too much security ??

    Regardless, thanks again for a brilliant piece of code for protecting our WP sites!

    So the solution seems trivial and it would be great if you could review those lines and if the modifications don’t decrease the security significantly than if you incorporate the fix.
    Regards,
    Dawith

    https://www.ads-software.com/plugins/all-in-one-wp-security-and-firewall/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi Dawith thank you for pointing that out. One of the plugin developers will review that line of code further.

    Kind regards

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi @dawith,
    The 5G blacklist was created by a .htaccess security expert (Jeff Starr from perishablepress.com) and what we did was take that code and apply it as-is to our plugin. You can always ask him at his website regarding the changes you want to make.

    Having said that, I think the best solution for this and other similar situations as yours is to allow users to insert custom .htaccess rules. We will look at adding such a feature soon so stay tuned.

    For now you can try the following workaround:
    FTP to your host and get your htaccess file and edit it and copy the 5G rules section and paste it outside of the following tags:
    # BEGIN All In One WP Security
    # END All In One WP Security

    I recommend that you paste it just after the “# END All In One WP Security”.
    Then make the changes to the newly pasted block of code. I also recommend that you label the customised block with your own start and end tags for your reference. Then FTP the modified .htaccess file back to your host and then deactivate the 5G rules from the AIOWPS plugin. Since your modified 5G code is now outside of the AIOWPS code it will be ignored by the AIOWPS plugin and will not be deleted.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘5G Blacklist and image editing’ is closed to new replies.