Contact Form 7 – Plugin Firewall, Security Log 403 Error

Home Forums BulletProof Security Pro Contact Form 7 – Plugin Firewall, Security Log 403 Error

Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #1076
    AITpro Admin
    Keymaster

    Email Question:

    The Security Log is showing this error for Contact Form 7.  This is with Contact Form 7

    Should I use another plugin???

    >>>>>>>>>>> 403 Error Logged - January 16, 2013 - 11:47 pm <<<<<<<<<<<
    REMOTE_ADDR: 208.113.187.154
    Host Name: apache2-dap.early.dreamhost.com
    HTTP_CLIENT_IP:
    HTTP_FORWARDED:
    HTTP_X_FORWARDED_FOR:
    HTTP_X_CLUSTER_CLIENT_IP:
    REQUEST_METHOD: GET
    HTTP_REFERER:
    REQUEST_URI: /wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.23
    QUERY_STRING:
    HTTP_USER_AGENT: Serf/0.7.2 mod_pagespeed/0.10.22.6-1798
    #1077
    AITpro Admin
    Keymaster

    Nope you just need to Whitelist this plugin script in the Plugin Firewall Whitelist.  Click the Blue Read Me button for the Plugin Firewall and scroll down to the section about manually adding a plugin script (Blue Read Me help info copied below – How To Add Plugin Script/File Names Manually).

    Basically what you will be doing is copying this plugin script path:  /contact-form-7/includes/js/jquery.form.min.js into the Plugins Script/File Whitelist Text Area, click the 3. Save Whitelist Options button and click the Plugin Firewall BulletProof Mode Activate button.  Be sure to add a comma and a space between the plugin script path.

    Example:

    /some-plugin-folder/plugin-scriptX.php, /another-plugin-folder/another-plugin-scriptY.php,

    How To Add Plugin Script/File Names Manually

    The Plugin Firewall blocks external/remote access to files that are located in the plugins folder. If you have a script/file outside of the plugins folder then you do not need to Whitelist it.

    The Plugin Firewall Whitelist Scan is designed to detect scripts that are currently loaded on your Home page and your WordPress Login page. The Custom Scan Tool allows you to scan additional specific website pages. If you have a Payment Gateway Provider script/file (A PayPal IPN script for example) that is located in a plugin in your plugins folder then you should manually add that script/file name to Plugins Script/File Whitelist Text Area. Example: /some-example-plugin/api/paypal-ipn-script.php. To add this example script/file name to the Plugins Script/File Whitelist Text Area you would add it after any other scripts/files that have been detected by the Scan and displayed in the Plugins Script/File Whitelist Text Area separated by a comma and a space between each plugin script/file path that you add.

    You can also use the Plugin Override option to create a RewriteEngine Off .htaccess file in a plugins folder.

    Each plugin script/file path that you enter MUST be separated by a comma and a space. Example: /some-example-plugin/api/paypal-ipn-script.php, /another-example-plugin/some-example-script.php. The path name starts with the plugin folder name (do not add /wp-content in the path name). After manually adding your script/file name path, click the Save Whitelist Options button to save your Whitelist data to your database and click the Plugin Firewall BulletProof Mode Activate button.

    #1210
    AITpro Admin
    Keymaster

    A new Plugin Firewall Read Me First Troubleshooting post has been created here >>> http://forum.ait-pro.com/forums/topic/plugin-firewall-read-me-first-troubleshooting/

    #4650
    simon
    Participant

    I got the same problem with contact form 7.

    HTTP_X_CLUSTER_CLIENT_IP:
    REQUEST_METHOD: GET
    HTTP_REFERER:
    REQUEST_URI: /wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.4
    QUERY_STRING:

    This is what i whitelistet:

    first this:

    /contact-form-7/includes/js/jquery.form.min.js, /contact-form-7/includes/js/scripts.js,

    (this is what i got from the firewall test run)

    then additionally this:

    /contact-form-7/

    I also de- and reactivated the plugin. Also deleted chache and tried ananother pc.
    Any ideas? Thanks in advance.

    #4651
    AITpro Admin
    Keymaster

    You can use Regular Expressions (Regex) to whitelist both Contact Form 7 js scripts with this Plugin Firewall Whitelist rule.  This whitelist rule means match any filename (.*) with a .js file extension in the /contact-form-7/includes/js/ folder.

    /contact-form-7/includes/js/(.*).js

    This below by itself is not a valid whitelist rule so delete it if you have added this to the Plugin Firewall Whitelist Text area, click the Save Whitelist Options button and activate the Plugin Firewall again.

    /contact-form-7/

    #4652
    simon
    Participant

    I copied this /contact-form-7/includes/js/(.*).js in the whitelist text area but i still can not send email with the contact field. Same error message.

    And security log entrie:

    REQUEST_URI: /wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.4

    Am i missing something?

    #4653
    AITpro Admin
    Keymaster

    Did you click the Save Whitelist Options button and activate the Plugin Firewall again?

    If you have done these things above already then go to the B-Core Edit/Upload/Download page, click on Your Current Plugins htaccess File tab and copy and paste your Plugin Firewall Whitelist rules from:  # BEGIN WHITELIST: Frontend Loading Website Plugin scripts/files to # END WHITELIST

    #4654
    simon
    Participant
    # BEGIN WHITELIST: Frontend Loading Website Plugin scripts/files
    SetEnvIf Request_URI "/bulletproof-security/400.php$" whitelist
    SetEnvIf Request_URI "/bulletproof-security/403.php$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.touchwipe.1.1.1.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.metadata.v2.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/slideshow.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.cycle.all.js$" whitelist
    SetEnvIf Request_URI "/contact-form-7/includes/js/(.*).js
    $" whitelist
    # END WHITELIST
    #4655
    AITpro Admin
    Keymaster

    Ah ok i see the problem.  A line break occurred in this last whitelist rule.  This can happen sometimes when you are using the Plugin Firewall Test Mode and the function that checks to make sure there are not extra spaces or commas after the last whitelist rule will cause a line break.  To fix this make sure you are not in Test Mode, click the Save Whitelist Options button and activate the Plugin Firewall again.  Then check the file again to make sure the line break is no longer there in this rule below.

    SetEnvIf Request_URI "/contact-form-7/includes/js/(.*).js
    $" whitelist
    #4657
    AITpro Admin
    Keymaster

    Also you can simplify the Meteor Slides plugin whitelist rules to just this 1 whitelist rule.  This also has the added benefit of if the version or file names are changed for a js script then you will not have to add a new whitelist rule each time a file name or version number/name changes in a plugin’s js files.

    /meteor-slides/js/(.*).js

    #4658
    simon
    Participant
    # BEGIN WHITELIST: Frontend Loading Website Plugin scripts/files
    SetEnvIf Request_URI "/bulletproof-security/400.php$" whitelist
    SetEnvIf Request_URI "/bulletproof-security/403.php$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.touchwipe.1.1.1.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.metadata.v2.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/slideshow.js$" whitelist
    SetEnvIf Request_URI "/meteor-slides/js/jquery.cycle.all.js$" whitelist
    SetEnvIf Request_URI "/contact-form-7/includes/js/(.*).js$" whitelist
    # END WHITELIST

    looks better now but it still does not work 🙁 already de- and reactivated the plugin.

    i will change that for meteor slides soon

    #4659
    AITpro Admin
    Keymaster

    Are you using a Minify plugin?

    #4660
    simon
    Participant

    Don’t know what a Minify plugin is…

    #4661
    AITpro Admin
    Keymaster

    You are not using a Minify plugin.  I just checked your site.  I do not know if this could be the problem, but either way you should not be caching your Contact Form page with WP Super Cache.  You do not want this page to be cached so what you need to do is go to the WP Super Cache settings Advanced tab page, scroll down until you see this

    Add here strings (not a filename) that forces a page not to be cached. For example, if your URLs include year and you dont want to cache last year posts, it’s enough to specify the year, i.e. ’/2004/’. WP-Cache will search if that string is part of the URI and if so, it will not cache that page.

    then in the text area/box add this rule below to tell WP Super Cache never to cache your Contact page and save your changes.  Then clear your WP Super Cache cache files and test your contact form again.

    /kontakt/

    #4662
    AITpro Admin
    Keymaster

    Ok i checked 3 of your sites.  The contact form on this site is working correctly:  holiday-marketing.  this site does not have a cached contact page and is also not a subdomain site.  The other 2 sites are subdomain sites and the contact page is being cached.  the contact form is not working on these 2 sites.  So the problem is either with WP Super Cache caching the contact form or the problem has something to do with how the subdomains were created.  Did you create DNS A records or CNAME records for these subdomains?  Are the subdomain sites installed correctly in their own folders?

    Example:

    The fitness subdomain site should be installed in a folder called /fitness.
    The tennis subdomain site should be installed in a folder called /tennis
    The correct WordPress settings for subdomain sites under Settings >>> General are this:
    WordPress Address (URL)   subdomain.root-domain.com
    Site Address (URL)   subdomain.root-domain.com

Viewing 15 posts - 1 through 15 (of 31 total)
  • You must be logged in to reply to this topic.