debug_logger->log_debug("Nonce check failed on enable basic firewall settings!",4);
die("Nonce check failed on enable basic firewall settings!");
}
//Save settings
if(isset($_POST['aiowps_enable_basic_firewall']))
{
$aio_wp_security->configs->set_value('aiowps_enable_basic_firewall','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_enable_basic_firewall','');
}
$aio_wp_security->configs->set_value('aiowps_enable_pingback_firewall',isset($_POST["aiowps_enable_pingback_firewall"])?'1':'');
//Commit the config settings
$aio_wp_security->configs->save_config();
//Recalculate points after the feature status/options have been altered
$aiowps_feature_mgr->check_feature_status_and_recalculate_points();
//Now let's write the applicable rules to the .htaccess file
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess();
if ($res)
{
$this->show_msg_updated(__('Settings were successfully saved', 'aiowpsecurity'));
}
else if($res == -1)
{
$this->show_msg_error(__('Could not write to the .htaccess file. Please check the file permissions.', 'aiowpsecurity'));
}
}
?>
debug_logger->log_debug("Nonce check failed on enable advanced firewall settings!",4);
die("Nonce check failed on enable advanced firewall settings!");
}
//Save settings
if(isset($_POST['aiowps_disable_index_views']))
{
$aio_wp_security->configs->set_value('aiowps_disable_index_views','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_disable_index_views','');
}
if(isset($_POST['aiowps_disable_trace_and_track']))
{
$aio_wp_security->configs->set_value('aiowps_disable_trace_and_track','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_disable_trace_and_track','');
}
if(isset($_POST['aiowps_forbid_proxy_comments']))
{
$aio_wp_security->configs->set_value('aiowps_forbid_proxy_comments','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_forbid_proxy_comments','');
}
if(isset($_POST['aiowps_deny_bad_query_strings']))
{
$aio_wp_security->configs->set_value('aiowps_deny_bad_query_strings','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_deny_bad_query_strings','');
}
if(isset($_POST['aiowps_advanced_char_string_filter']))
{
$aio_wp_security->configs->set_value('aiowps_advanced_char_string_filter','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_advanced_char_string_filter','');
}
//Commit the config settings
$aio_wp_security->configs->save_config();
//Now let's write the applicable rules to the .htaccess file
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess();
if ($res)
{
$this->show_msg_updated(__('You have successfully saved the Additional Firewall Protection configuration', 'aiowpsecurity'));
}
else if($res == -1)
{
$this->show_msg_error(__('Could not write to the .htaccess file. Please check the file permissions.', 'aiowpsecurity'));
}
if($error)
{
$this->show_msg_error($error);
}
}
?>
backup';
$info_msg = sprintf( __('Due to the nature of the code being inserted to the .htaccess file, this feature may break some functionality for certain plugins and you are therefore advised to take a %s of .htaccess before applying this configuration.', 'aiowpsecurity'), $backup_tab_link);
echo '
'.__('This feature allows you to activate more advanced firewall settings to your site.', 'aiowpsecurity').
' '.__('The advanced firewall rules are applied via the insertion of special code to your currently active .htaccess file.', 'aiowpsecurity').
' '.$info_msg.'
';
?>
debug_logger->log_debug("Nonce check failed on enable 5G firewall settings!",4);
die("Nonce check failed on enable 5G firewall settings!");
}
//Save settings
if(isset($_POST['aiowps_enable_5g_firewall']))
{
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall','');
}
//Commit the config settings
$aio_wp_security->configs->save_config();
//Now let's write the applicable rules to the .htaccess file
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess();
if ($res)
{
$this->show_msg_updated(__('You have successfully saved the 5G Firewall Protection configuration', 'aiowpsecurity'));
}
else if($res == -1)
{
$this->show_msg_error(__('Could not write to the .htaccess file. Please check the file permissions.', 'aiowpsecurity'));
}
}
?>
backup';
$info_msg = '
'.sprintf( __('This feature allows you to activate the 5G firewall security protection rules designed and produced by %s.', 'aiowpsecurity'), 'Perishable Press').'
';
$info_msg .= '
'.__('The 5G Blacklist is a simple, flexible blacklist that helps reduce the number of malicious URL requests that hit your website.', 'aiowpsecurity').'
';
$info_msg .= '
'.__('The added advantage of applying the 5G firewall to your site is that it has been tested and confirmed by the people at PerishablePress.com to be an optimal and least disruptive set of .htaccess security rules for general WP sites running on an Apache server or similar.', 'aiowpsecurity').'
';
$info_msg .= '
'.sprintf( __('Therefore the 5G firewall rules should not have any impact on your site\'s general functionality but if you wish you can take a %s of your .htaccess file before proceeding.', 'aiowpsecurity'), $backup_tab_link).'
debug_logger->log_debug("Nonce check failed on enable cookie based brute force prevention feature!",4);
die("Nonce check failed on enable cookie based brute force prevention feature!");
}
if(isset($_POST['aiowps_enable_brute_force_attack_prevention']))
{
$brute_force_feature_secret_word = sanitize_text_field($_POST['aiowps_brute_force_secret_word']);
if(empty($brute_force_feature_secret_word)){
$brute_force_feature_secret_word = "aiowps_secret";
}else if(!ctype_alnum($brute_force_feature_secret_word)){
$msg = '
'.__('Settings have not been saved - your secret word must consist only of alphanumeric characters, ie, letters and/or numbers only!', 'aiowpsecurity').'
'.__('It is important that you save this URL value somewhere in case you forget it, OR,', 'aiowpsecurity').'
';
$msg .= '
'.sprintf( __('simply remember to add a "?%s=1" to your current site URL address.', 'aiowpsecurity'), $brute_force_feature_secret_word).'
';
}
}
else
{
$aio_wp_security->configs->set_value('aiowps_enable_brute_force_attack_prevention','');
$msg = __('You have successfully saved cookie based brute force prevention feature settings.', 'aiowpsecurity');
}
if(isset($_POST['aiowps_brute_force_attack_prevention_pw_protected_exception']))
{
$aio_wp_security->configs->set_value('aiowps_brute_force_attack_prevention_pw_protected_exception','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_brute_force_attack_prevention_pw_protected_exception','');
}
if(isset($_POST['aiowps_brute_force_attack_prevention_ajax_exception']))
{
$aio_wp_security->configs->set_value('aiowps_brute_force_attack_prevention_ajax_exception','1');
}
else
{
$aio_wp_security->configs->set_value('aiowps_brute_force_attack_prevention_ajax_exception','');
}
if (!$error)
{
$aio_wp_security->configs->save_config();//save the value
//Recalculate points after the feature status/options have been altered
$aiowps_feature_mgr->check_feature_status_and_recalculate_points();
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess();
if ($res){
echo '
';
echo $msg;
echo '
';
}
else if($res == -1){
$this->show_msg_error(__('Could not write to the .htaccess file. Please check the file permissions.', 'aiowpsecurity'));
}
}
else
{
$this->show_msg_error($msg);
}
}
?>
'.__('A Brute Force Attack is when a hacker tries many combinations of usernames and passwords until they succeed in guessing the right combination.', 'aiowpsecurity').
' '.__('Due to the fact that at any one time there may be many concurrent login attempts occurring on your site via malicious automated robots, this also has a negative impact on your server\'s memory and performance.', 'aiowpsecurity').
' '.__('The features in this tab will stop the majority of Brute Force Login Attacks at the .htaccess level thus providing even better protection for your WP login page and also reducing the load on your server because the system does not have to run PHP code to process the login attempts.', 'aiowpsecurity').'';
?>
backup';
$video_link = 'video tutorial';
$info_msg = sprintf( __('Even though this feature should not have any impact on your site\'s general functionality you are strongly encouraged to take a %s of your .htaccess file before proceeding.', 'aiowpsecurity'), $backup_tab_link);
$info_msg1 = __('If this feature is not used correctly, you can get locked out of your site. A backup file will come in handy if that happens.', 'aiowpsecurity');
$info_msg2 = sprintf( __('To learn more about how to use this feature please watch the following %s.', 'aiowpsecurity'), $video_link);
$brute_force_login_feature_link = 'Cookie-Based Brute Force Login Prevention';
echo '