• Resolved esugrue

    (@esugrue)


    Hi
    I am using the plugin Filetrip to allow visitors to upload files that I then review for inclusion on the site. Although php files etc are blocked if I try to upload any file as a Guest it will block the upload.

    Is there a way to allow the upload but only if initiated through that one upload form on that one page?

    At the moment the only way they can upload anything is if they sign up as a member and the site is not really set up as a membership site.

    Ernie

Viewing 1 replies (of 1 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    You would need to use the user configuration file, .htninja and to add your own code to to that.
    For instance, if your form submits the data to a ‘/somescript.php’ script:

    
    <?php
    /*
     +===================================================================+
     | NinjaFirewall optional configuration file                         |
     |                                                                   |
     | See: http://nintechnet.com/ninjafirewall/wp-edition/help/?htninja |
     +===================================================================+
    */
    if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset( $_FILES ) &&
       strpos($_SERVER['SCRIPT_FILENAME'], '/somescript.php') !== FALSE ) {
       return 'ALLOW';
    }
    
Viewing 1 replies (of 1 total)

The topic ‘Allow Guest Uploads with Ninja Firewall’ is closed to new replies.