• Getting following error when processing forms with file uploads (images, up to 10MB): [Thu Nov 01 *** 2018] [proxy_fcgi:error] [pid …:tid …] [client ***] AH01071: Got error ‘PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /…/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php on line 770\n’, referer: …

    Line 770 contains preg_match within filePatternsMatch(). The issue first appeared after hosting company upgraded from PHP 7.0 to PHP 7.2.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @aksl,
    For testing purposes can you try deactivating the Firewall rule “file_upload Malicious File Upload (Patterns)”. There are a few rules with similar names, so make sure you deactivate exactly that one. You can find the rules under Firewall > Firewall Options.

    It’s not recommended to have this rule deactivated but I’m trying to narrow down the cause. Let me know if that makes a difference.

    Thread Starter aksl

    (@aksl)

    Temporarily disabling all the File Upload rules did the trick earlier. I re-enabled all but the “file_upload Malicious File Upload (Patterns)”. I can’t reproduce the issue myself, so will have to wait a few days to see if any failed requests end up in error log.

    Hi @aksl,
    You may be able to reproduce the issue if the people having the issue are not admins and you also attempt an upload as a non-admin. The Firewall behaves differently depending on whether someone is an admin or not, since admins are more trusted.

    Thread Starter aksl

    (@aksl)

    I was able to reproduce the issue while not logged in. Disabling the firewall rule “file_upload Malicious File Upload (Patterns)” fixed the issue, so it seems to be the root cause. If it helps, the PHP version in use before 7.2 was 7.0.

    Hi again @aksl!
    Sorry for the late response. Is there any chance you could send me a file that causes this? We need to test it to see if we can reproduce it. If that’s possible, please email the file to [email protected] and please put your username aksl in the title so I know who it’s coming from.

    Thread Starter aksl

    (@aksl)

    Sent the file on 13th. Got it?

    Hi @aksl!
    Sorry for the late reply. I did get it. I’ve added it to our sample data for testing. What means are you using to allow non admins/editors to upload files. A specific plugin? If so, which one?

    Thread Starter aksl

    (@aksl)

    Gravity Forms form with a file upload field used for image uploads.

    Thanks for the info @aksl! Since that’s a premium plugin I can’t test this myself but I will forward the information to our quality assurance so they can have a look when they get a chance.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘500 Error – File upload firewall rules causes timeout’ is closed to new replies.