Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Forum: Plugins
    In reply to: [AMP] Google Page Cache
    jiraky90

    (@jiraky90)

    Thank you @jamesosborne .
    I’ll have a look into the provided resources.

    You may close the ticket.

    Have a nice day.

    Forum: Plugins
    In reply to: [AMP] Google Page Cache
    jiraky90

    (@jiraky90)

    Sorry to hop-in, I’m in the same dev team.

    Is there any method ready-to-call (or close to) to provide a generic signed request to the AMP service?

    From the github issue it looks like the problem to deal with it the update logic, however the functions to upload a new AMP page to the cache service should be already included and perfectly working.
    Therefore my question stands: can I call a specific function to craft the call to be sent to AMP service?

    Specifically I would like to avoid to have to deal with the crypto side of the request.

    Thanks in advance!

    Have a nice day

    Thread Starter jiraky90

    (@jiraky90)

    Which is the same of adding the rules directly to the .htaccess.
    In any case, I could help with that if you need something.

    Cheers

    Thread Starter jiraky90

    (@jiraky90)

    Actually my solution is the hack of the wp-security-utility-htaccess class. The point is that I need to recheck all of this staff after any update.

    My edits are:

    static function getrules_block_wp_file_access()
        {
            global $aio_wp_security;
            $rules = '';
            if ($aio_wp_security->configs->get_value('aiowps_prevent_default_wp_file_access') == '1') {
                $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_wp_file_access_marker_start . PHP_EOL; //Add feature marker start
                $rules .= '<Files license.txt>
                            Require all denied
                            </files>
                            <Files wp-config-sample.php>
                            Require all denied
                            </Files>
                            <Files readme.html>
                            Require all denied
                            </Files>' . PHP_EOL;
                $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_wp_file_access_marker_end . PHP_EOL; //Add feature marker end
            }
    
            return $rules;
        }
    static function getrules_basic_htaccess()
        {
            global $aio_wp_security;
    
            $rules = '';
            if ($aio_wp_security->configs->get_value('aiowps_enable_basic_firewall') == '1') {
                $rules .= AIOWPSecurity_Utility_Htaccess::$basic_htaccess_rules_marker_start . PHP_EOL; //Add feature marker start
                //protect the htaccess file - this is done by default with apache config file but we are including it here for good measure
                $rules .= '<Files .htaccess>' . PHP_EOL;
                $rules .= 'Require all denied' . PHP_EOL;
                $rules .= '</Files>' . PHP_EOL;
    
                //disable the server signature
                $rules .= 'ServerSignature Off' . PHP_EOL;
    
                //limit file uploads to 10mb
                $rules .= 'LimitRequestBody 10240000' . PHP_EOL;
    
                // protect wpconfig.php.
                $rules .= '<Files wp-config.php>' . PHP_EOL;
                $rules .= 'Require all denied' . PHP_EOL;
                $rules .= '</Files>' . PHP_EOL;
    
                $rules .= AIOWPSecurity_Utility_Htaccess::$basic_htaccess_rules_marker_end . PHP_EOL; //Add feature marker end
            }
            return $rules;
        }
    static function getrules_pingback_htaccess()
        {
            global $aio_wp_security;
    
            $rules = '';
            if ($aio_wp_security->configs->get_value('aiowps_enable_pingback_firewall') == '1') {
                $rules .= AIOWPSecurity_Utility_Htaccess::$pingback_htaccess_rules_marker_start . PHP_EOL; //Add feature marker start
                $rules .= '<Files xmlrpc.php>' . PHP_EOL;
                $rules .= 'Require all denied' . PHP_EOL;
                $rules .= '</Files>' . PHP_EOL;
    
                $rules .= AIOWPSecurity_Utility_Htaccess::$pingback_htaccess_rules_marker_end . PHP_EOL; //Add feature marker end
            }
            return $rules;
        }
    static function getrules_block_debug_log_access_htaccess()
        {
            global $aio_wp_security;
    
            $rules = '';
            if ($aio_wp_security->configs->get_value('aiowps_block_debug_log_file_access') == '1') {
                $rules .= AIOWPSecurity_Utility_Htaccess::$debug_log_block_htaccess_rules_marker_start . PHP_EOL; //Add feature marker start
                $rules .= '<Files debug.log>' . PHP_EOL;
                $rules .= 'Require all denied' . PHP_EOL;
                $rules .= '</Files>' . PHP_EOL;
                $rules .= AIOWPSecurity_Utility_Htaccess::$debug_log_block_htaccess_rules_marker_end . PHP_EOL; //Add feature marker end
            }
            return $rules;
        }
    # 5G:[USER AGENTS]
                            <IfModule mod_setenvif.c>
                                    # SetEnvIfNoCase User-Agent ^$ keep_out
                                    SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
                                    <limit GET POST PUT>
                                            Require all granted
                                            #Deny from env=keep_out
                                    </limit>
                            </IfModule>

    And all the blacklists/whitelists or reference protections are disabled from the control panel

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