Cerber Security & Antispam - Version 5.8

Version Description

  • New: Now the plugin will send a brief performance report (activity for past seven days) to specified email addresses.
  • Plugin admin interface pages: compatibility with screen readers has been improved.
  • REST API: the deprecated rest_enabled filter is used for WordPress older than 4.7.
  • Bug fixed: After updating the plugin to the 5.7 version some disabled checkboxes (and corresponding disabled settings) are set to their default, enabled states.
  • Bug fixed: An IP address in the white access list may be locked out as a suspicious IP.
  • Read more
Download this release

Release Info

Developer Gioni
Plugin Icon 128x128 Cerber Security & Antispam
Version 5.8
Comparing to
See all releases

Code changes from version 5.7 to 5.8

Files changed (11) hide show
  1. assets/admin.css +13 -13
  2. assets/admin.js +2 -4
  3. cerber-lab.php +13 -5
  4. cerber-news.php +11 -6
  5. cerber-tools.php +13 -3
  6. common.php +99 -2
  7. dashboard.php +31 -55
  8. languages/wp-cerber.pot +310 -234
  9. readme.txt +38 -29
  10. settings.php +239 -42
  11. wp-cerber.php +202 -119
assets/admin.css CHANGED
@@ -863,11 +863,9 @@ table.vtable td:nth-child(2) {
863
  /*height: 300px;*/
864
  }
865
 
 
866
 
867
- /* Switches */
868
-
869
-
870
- .switch {
871
  position: relative;
872
  display: inline-block;
873
  width: 50px;
@@ -875,11 +873,13 @@ table.vtable td:nth-child(2) {
875
  margin-right: 0.8em;
876
  }
877
 
878
- .switch input {
879
- display: none;
 
 
880
  }
881
 
882
- .slider {
883
  position: absolute;
884
  cursor: pointer;
885
  top: 0;
@@ -891,7 +891,7 @@ table.vtable td:nth-child(2) {
891
  transition: .2s;
892
  }
893
 
894
- .slider:before {
895
  position: absolute;
896
  content: "";
897
  height: 16px;
@@ -903,25 +903,25 @@ table.vtable td:nth-child(2) {
903
  transition: .2s;
904
  }
905
 
906
- input:checked + .slider {
907
  background-color: #51AE43;
908
  }
909
 
910
- input:focus + .slider {
911
  box-shadow: 0 0 1px #2196F3;
912
  }
913
 
914
- input:checked + .slider:before {
915
  -webkit-transform: translateX(26px);
916
  -ms-transform: translateX(26px);
917
  transform: translateX(26px);
918
  }
919
 
920
- .slider.round {
921
  border-radius: 34px;
922
  }
923
 
924
- .slider.round:before {
925
  border-radius: 50%;
926
  }
927
 
863
  /*height: 300px;*/
864
  }
865
 
866
+ /* Switches & Toggle */
867
 
868
+ .crb-switch {
 
 
 
869
  position: relative;
870
  display: inline-block;
871
  width: 50px;
873
  margin-right: 0.8em;
874
  }
875
 
876
+ .crb-switch input {
877
+ /* @since 5.7.4 display: none;*/
878
+ /* Use .screen-reader-text instead */
879
+ /* https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/ */
880
  }
881
 
882
+ .crb-slider {
883
  position: absolute;
884
  cursor: pointer;
885
  top: 0;
891
  transition: .2s;
892
  }
893
 
894
+ .crb-slider:before {
895
  position: absolute;
896
  content: "";
897
  height: 16px;
903
  transition: .2s;
904
  }
905
 
906
+ input:checked + .crb-slider {
907
  background-color: #51AE43;
908
  }
909
 
910
+ input:focus + .crb-slider {
911
  box-shadow: 0 0 1px #2196F3;
912
  }
913
 
914
+ input:checked + .crb-slider:before {
915
  -webkit-transform: translateX(26px);
916
  -ms-transform: translateX(26px);
917
  transform: translateX(26px);
918
  }
919
 
920
+ .crb-slider.round {
921
  border-radius: 34px;
922
  }
923
 
924
+ .crb-slider.round:before {
925
  border-radius: 50%;
926
  }
927
 
assets/admin.js CHANGED
@@ -3,7 +3,7 @@ jQuery(document).ready(function ($) {
3
  /* WP Comments page */
4
  var comtable = 'table.wp-list-table.comments';
5
 
6
- if ($(comtable).length) {
7
  $(comtable + " td.column-author").each(function (index) {
8
  var ip = $(this).find('a').last().text();
9
  var ip_id = cerber_get_id_ip(ip);
@@ -50,9 +50,7 @@ jQuery(document).ready(function ($) {
50
  var data = server_data['data'];
51
  var slug = server_data['slug'];
52
  $(".crb-no-" + slug).each(function (index) {
53
- if (data[$(this).data('ip-id')]) {
54
- $(this).replaceWith(data[$(this).data('ip-id')]);
55
- }
56
  });
57
  }
58
 
3
  /* WP Comments page */
4
  var comtable = 'table.wp-list-table.comments';
5
 
6
+ if (crb_lab_available && $(comtable).length) {
7
  $(comtable + " td.column-author").each(function (index) {
8
  var ip = $(this).find('a').last().text();
9
  var ip_id = cerber_get_id_ip(ip);
50
  var data = server_data['data'];
51
  var slug = server_data['slug'];
52
  $(".crb-no-" + slug).each(function (index) {
53
+ $(this).replaceWith(data[$(this).data('ip-id')]);
 
 
54
  });
55
  }
56
 
cerber-lab.php CHANGED
@@ -440,7 +440,7 @@ function lab_status(){
440
  $nodes = lab_get_nodes();
441
  if (empty($nodes['nodes'])) return $ret . '<p>No information. No request has been made yet.</p>';
442
 
443
- $ret .= '<table><tr><th>Node</th><th>Processing time</th><th>Operational status</th><th>Info</th><th>IP address</th><th>Last request</th><th>Protocol used</th></tr>';
444
  foreach ( $nodes['nodes'] as $id => $node ) {
445
  $delay = round(1000 * $node['last'][0]) . ' ms';
446
  $ago = cerber_ago_time($node['last'][3]);
@@ -506,9 +506,12 @@ function lab_trunc_push(){
506
  $wpdb->query( 'TRUNCATE TABLE ' . CERBER_LAB_TABLE );
507
  }
508
 
509
- add_action( 'shutdown', 'cerber_push_lab' );
 
 
 
510
  function cerber_push_lab() {
511
- if ( ! cerber_get_options( 'cerberlab' ) ) {
512
  return;
513
  }
514
  // TODO: replace with my own cache code because wp_cache_get doesn't work with expiration
@@ -603,7 +606,12 @@ function lab_lab() {
603
  return false;
604
  }
605
 
606
- return $key[3];
 
 
 
 
 
607
  }
608
 
609
  function lab_indicator(){
@@ -727,9 +735,9 @@ function lab_get_country( $ip, $cache_only = true ) {
727
  }
728
 
729
  $ip_id = cerber_get_id_ip( $item );
 
730
 
731
  if ( is_ip_private( $item ) ) {
732
- $ret[ $ip_id ] = null;
733
  continue;
734
  }
735
 
440
  $nodes = lab_get_nodes();
441
  if (empty($nodes['nodes'])) return $ret . '<p>No information. No request has been made yet.</p>';
442
 
443
+ $ret .= '<table id="lab-status"><tr><th>Node</th><th>Processing time</th><th>Operational status</th><th>Info</th><th>IP address</th><th>Last request</th><th>Protocol used</th></tr>';
444
  foreach ( $nodes['nodes'] as $id => $node ) {
445
  $delay = round(1000 * $node['last'][0]) . ' ms';
446
  $ago = cerber_ago_time($node['last'][3]);
506
  $wpdb->query( 'TRUNCATE TABLE ' . CERBER_LAB_TABLE );
507
  }
508
 
509
+ add_action( 'shutdown', function () {
510
+ cerber_push_lab();
511
+ } );
512
+
513
  function cerber_push_lab() {
514
+ if ( ! crb_get_settings( 'cerberlab' ) ) {
515
  return;
516
  }
517
  // TODO: replace with my own cache code because wp_cache_get doesn't work with expiration
606
  return false;
607
  }
608
 
609
+ $df = get_option( 'date_format' );
610
+ $gmt_offset = get_option( 'gmt_offset' ) * 3600;
611
+
612
+ return date_i18n( $df, $gmt_offset + $key[3] );
613
+
614
+ //return $key[3];
615
  }
616
 
617
  function lab_indicator(){
735
  }
736
 
737
  $ip_id = cerber_get_id_ip( $item );
738
+ $ret[ $ip_id ] = null;
739
 
740
  if ( is_ip_private( $item ) ) {
 
741
  continue;
742
  }
743
 
cerber-news.php CHANGED
@@ -54,19 +54,19 @@ function cerber_push_the_news( $version ) {
54
  $news['4.0'] =
55
  '<h3>Welcome a new version with extended Access Lists and reCAPTCHA for WooCommerce</h3>
56
  <ul>
57
- <li>reCAPTCHA for WooCommerce forms. <a href="http://wpcerber.com/how-to-setup-recaptcha/">How to set up reCAPTCHA</a>.</li>
58
  <li>IP Access Lists has got support for IP networks in three forms: ability to restrict access with IPv4 ranges, IPv4 CIDR notation and IPv4 subnets: A,B,C has been added. Read more: <a href="http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Access Lists for WordPress</a>.</li>
59
  <li>Cerber can automatically detect an IP network of an intruder and suggest you to block the entire network right from the Activity screen.</li>
60
  <!-- <li>reCAPTCHA will not be shown and processed for IP addresses from the White IP Access List.</li> -->
61
  </ul>
62
 
63
- <p><a href="http://wpcerber.com/wp-cerber-security-4-0/" target="_blank">Read a full list of changes and improvements</a></p>
64
  ';
65
 
66
  $news['4.3'] =
67
  '<h3>What\'s new in version 4.3</h3>
68
  <ul>
69
- <li>Do you want to keep eye on specific activity on your website? I have good news for you! Track them like a PRO. Use powerful subscriptions to get email notifications according to filters for events you have set. Filter out activities that you are interested to monitor and then click Subscribe. <a href="http://wpcerber.com/wordpress-notifications-made-easy/">Read more</a></li>
70
  <li>Search and/or filter activity by IP address, username (login), specific event and a user. You can use any combination of them. </li>
71
  <li>Now you can export activity from your WordPress website to a CSV file. You can export all activities or a set of filtered activities only as it described above. When you will import the CSV file in your spreadsheet editor, don\'t forget to select UTF-8 charset.</li>
72
  <li>You can use multiple email addresses for notifications (Main Settings -> Notifications -> Email Address). Use a comma to specify several addresses.</li>
@@ -95,16 +95,21 @@ function cerber_push_the_news( $version ) {
95
  $news['5.5'][] = 'White list for REST API requests. It allows creating a list of namespace exceptions if REST API is disabled.';
96
  $news['5.5'][] = 'Disable access to user data via REST API and stop REST API user enumeration.';
97
 
 
 
 
 
 
98
  if ( ! empty( $news[ $version ] ) ) {
99
  //$text = '<h3>What\'s new in WP Cerber '.$version.'</h3>';
100
 
101
- $text = '<h3>Highlights from WP Cerber '.$version.'</h3>';
102
 
103
  $text .= '<ul><li>'.implode('</li><li>', $news[ $version ]).'</li></ul>';
104
 
105
- $text .= ' <p style="margin-top: 18px;"><a href="https://wpcerber.com/security/releases/" target="_blank">Change log</a></p>';
106
 
107
- $text .= ' <p style="margin-top: 24px;"><span class="dashicons-before dashicons-email-alt"></span> &nbsp; <a href="http://wpcerber.com/subscribe-newsletter/">Subscribe to Cerber\'s newsletter</a></p>
108
  <p><span class="dashicons-before dashicons-twitter"></span> &nbsp; <a href="https://twitter.com/wpcerber">Follow Cerber on Twitter</a></p>
109
  <p><span class="dashicons-before dashicons-facebook"></span> &nbsp; <a href="https://www.facebook.com/wpcerber/">Follow Cerber on Facebook</a></p>
110
  ';
54
  $news['4.0'] =
55
  '<h3>Welcome a new version with extended Access Lists and reCAPTCHA for WooCommerce</h3>
56
  <ul>
57
+ <li>reCAPTCHA for WooCommerce forms. <a href="https://wpcerber.com/how-to-setup-recaptcha/">How to set up reCAPTCHA</a>.</li>
58
  <li>IP Access Lists has got support for IP networks in three forms: ability to restrict access with IPv4 ranges, IPv4 CIDR notation and IPv4 subnets: A,B,C has been added. Read more: <a href="http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Access Lists for WordPress</a>.</li>
59
  <li>Cerber can automatically detect an IP network of an intruder and suggest you to block the entire network right from the Activity screen.</li>
60
  <!-- <li>reCAPTCHA will not be shown and processed for IP addresses from the White IP Access List.</li> -->
61
  </ul>
62
 
63
+ <p><a href="https://wpcerber.com/wp-cerber-security-4-0/" target="_blank">Read a full list of changes and improvements</a></p>
64
  ';
65
 
66
  $news['4.3'] =
67
  '<h3>What\'s new in version 4.3</h3>
68
  <ul>
69
+ <li>Do you want to keep eye on specific activity on your website? I have good news for you! Track them like a PRO. Use powerful subscriptions to get email notifications according to filters for events you have set. Filter out activities that you are interested to monitor and then click Subscribe. <a href="https://wpcerber.com/wordpress-notifications-made-easy/">Read more</a></li>
70
  <li>Search and/or filter activity by IP address, username (login), specific event and a user. You can use any combination of them. </li>
71
  <li>Now you can export activity from your WordPress website to a CSV file. You can export all activities or a set of filtered activities only as it described above. When you will import the CSV file in your spreadsheet editor, don\'t forget to select UTF-8 charset.</li>
72
  <li>You can use multiple email addresses for notifications (Main Settings -> Notifications -> Email Address). Use a comma to specify several addresses.</li>
95
  $news['5.5'][] = 'White list for REST API requests. It allows creating a list of namespace exceptions if REST API is disabled.';
96
  $news['5.5'][] = 'Disable access to user data via REST API and stop REST API user enumeration.';
97
 
98
+ $news['5.8'][] = 'Weekly reports. Now the plugin will send a brief performance report (activity for past seven days) to specified email addresses. Weekly reports are sent once a week. Set desired reporting time on the Notification admin page.';
99
+ $news['5.8'][] = 'Plugin admin interface pages: compatibility with screen readers has been improved.';
100
+ $news['5.8'][] = 'Compatibility with caching plugins is improved: define( ‘DONOTCACHEPAGE’, true ) is added for Custom login page.';
101
+ $news['5.8'][] = 'REST API: the deprecated rest_enabled filter is used for WordPress older than 4.7.';
102
+
103
  if ( ! empty( $news[ $version ] ) ) {
104
  //$text = '<h3>What\'s new in WP Cerber '.$version.'</h3>';
105
 
106
+ $text = '<h3>Highlights from WP Cerber Security '.$version.'</h3>';
107
 
108
  $text .= '<ul><li>'.implode('</li><li>', $news[ $version ]).'</li></ul>';
109
 
110
+ $text .= ' <p style="margin-top: 18px; font-weight: bold;"><a href="https://wpcerber.com/?plugin_version='.$version.'" target="_blank">Read more</a></p>';
111
 
112
+ $text .= ' <p style="margin-top: 24px;"><span class="dashicons-before dashicons-email-alt"></span> &nbsp; <a href="https://wpcerber.com/subscribe-newsletter/">Subscribe to Cerber\'s newsletter</a></p>
113
  <p><span class="dashicons-before dashicons-twitter"></span> &nbsp; <a href="https://twitter.com/wpcerber">Follow Cerber on Twitter</a></p>
114
  <p><span class="dashicons-before dashicons-facebook"></span> &nbsp; <a href="https://www.facebook.com/wpcerber/">Follow Cerber on Facebook</a></p>
115
  ';
cerber-tools.php CHANGED
@@ -216,8 +216,18 @@ function cerber_show_diag(){
216
  ?>
217
  </div>
218
  <?php
219
- $subs = get_site_option( '_cerber_subs' );
220
- if ( $subs ) {
 
 
 
 
 
 
 
 
 
 
221
  echo '
222
  <div class="diag-section">
223
  <h3>Subscriptions for notifications</h3>';
@@ -297,7 +307,7 @@ function cerber_recaptcha_page() {
297
  <?php
298
  cerber_show_aside( 'recaptcha' );
299
  echo '<div class="crb-main">';
300
- cerber_show_settings( 'recaptcha' );
301
  echo '</div';
302
  ?>
303
  </div>
216
  ?>
217
  </div>
218
  <?php
219
+ if ( $report = get_site_option( '_cerber_report' ) ) {
220
+ echo '<div class="diag-section"><h3>Reports</h3>';
221
+ echo cerber_ago_time($report[0]).' ('.cerber_date($report[0]).')';
222
+ if ($report[1]) {
223
+ echo ' OK';
224
+ }
225
+ else {
226
+ echo ' Unable to send email';
227
+ }
228
+ echo '</div>';
229
+ }
230
+ if ( $subs = get_site_option( '_cerber_subs' ) ) {
231
  echo '
232
  <div class="diag-section">
233
  <h3>Subscriptions for notifications</h3>';
307
  <?php
308
  cerber_show_aside( 'recaptcha' );
309
  echo '<div class="crb-main">';
310
+ cerber_show_settings_page( 'recaptcha' );
311
  echo '</div';
312
  ?>
313
  </div>
common.php CHANGED
@@ -83,6 +83,46 @@ function cerber_activity_link($set = array()){
83
  }
84
  return cerber_admin_link( 'activity' ) . $filter;
85
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
  function cerber_pb_get_devices($token = ''){
88
  global $wp_cerber;
@@ -493,10 +533,20 @@ function cerber_get_labels($type = 'activity'){
493
  return $labels;
494
  }
495
 
496
- function crb_black_activities() {
497
- return array( 16, 17, 40, 50, 51, 52 );
 
 
 
 
 
 
 
 
 
498
  }
499
 
 
500
  function cerber_get_reason($id){
501
  $labels = array();
502
  $ret = __('Unknown','wp-cerber');
@@ -552,6 +602,27 @@ function cerber_ago_time($time){
552
  return sprintf( __( '%s ago' ), human_time_diff( $time ) );
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  function cerber_percent($one,$two){
556
  if ($one == 0) {
557
  if ($two > 0) $ret = '100';
@@ -649,4 +720,30 @@ function cerber_recaptcha_lang() {
649
  }
650
 
651
  return $lang;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
652
  }
83
  }
84
  return cerber_admin_link( 'activity' ) . $filter;
85
  }
86
+ function cerber_get_login_url(){
87
+ $ret = '';
88
+
89
+ if ($path = crb_get_settings( 'loginpath' )) {
90
+ $ret = get_home_url() . '/' . $path . '/';
91
+ }
92
+
93
+ return $ret;
94
+ }
95
+
96
+ function cerber_calculate_kpi($period = 1){
97
+ global $wpdb;
98
+
99
+ $period = absint( $period );
100
+ if ( ! $period ) {
101
+ $period = 1;
102
+ }
103
+
104
+ // TODO: Add spam performance as percentage Denied / Allowed comments
105
+
106
+ $stamp = time() - $period * 24 * 3600;
107
+ $in = implode( ',', crb_get_activity_set( 'malicious' ) );
108
+ $unique_ip = $wpdb->get_var('SELECT COUNT(DISTINCT ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN ('.$in.') AND stamp > '.$stamp);
109
+
110
+ $kpi_list = array(
111
+ //array( __('Incidents detected','wp-cerber').'</a>', cerber_count_log( array( 16, 40, 50, 51, 52, 53, 54 ) ) ),
112
+ array(
113
+ __( 'Malicious activities mitigated', 'wp-cerber' ) . '</a>',
114
+ cerber_count_log( crb_get_activity_set( 'malicious' ), $period )
115
+ ),
116
+ array( __( 'Spam comments denied', 'wp-cerber' ), cerber_count_log( array( 16 ), $period ) ),
117
+ array( __( 'Spam form submissions denied', 'wp-cerber' ), cerber_count_log( array( 17 ), $period ) ),
118
+ array( __( 'Malicious IP addresses detected', 'wp-cerber' ), $unique_ip ),
119
+ array( __( 'Lockouts occurred', 'wp-cerber' ), cerber_count_log( array( 10, 11 ), $period ) ),
120
+ //array( __('Locked out IP now','wp-cerber'), $kpi_locknum ),
121
+ );
122
+
123
+ return $kpi_list;
124
+ }
125
+
126
 
127
  function cerber_pb_get_devices($token = ''){
128
  global $wp_cerber;
533
  return $labels;
534
  }
535
 
536
+ function crb_get_activity_set($slice = 'malicious') {
537
+ switch ( $slice ) {
538
+ case 'malicious':
539
+ return array( 10, 11, 16, 17, 40, 50, 51, 52, 53, 54 );
540
+ case 'suspicious':
541
+ return array( 10, 11, 16, 17, 20, 40, 50, 51, 52, 53, 54 );
542
+ case 'black':
543
+ return array( 16, 17, 40, 50, 51, 52 );
544
+ }
545
+
546
+ return array();
547
  }
548
 
549
+
550
  function cerber_get_reason($id){
551
  $labels = array();
552
  $ret = __('Unknown','wp-cerber');
602
  return sprintf( __( '%s ago' ), human_time_diff( $time ) );
603
  }
604
 
605
+ /**
606
+ * Format date according to user settings and timezone
607
+ *
608
+ * @param $timestamp int Unix timestamp
609
+ *
610
+ * @return string
611
+ */
612
+ function cerber_date( $timestamp ) {
613
+ $timestamp = absint( $timestamp );
614
+ $gmt_offset = get_option( 'gmt_offset' ) * 3600;
615
+ if ( $df = crb_get_settings( 'dateformat' ) ) {
616
+ return date_i18n( $df, $gmt_offset + $timestamp );
617
+ }
618
+ else {
619
+ $tf = get_option( 'time_format' );
620
+ $df = get_option( 'date_format' );
621
+
622
+ return date_i18n( $df, $gmt_offset + $timestamp ) . ', ' . date_i18n( $tf, $gmt_offset + $timestamp );
623
+ }
624
+ }
625
+
626
  function cerber_percent($one,$two){
627
  if ($one == 0) {
628
  if ($two > 0) $ret = '100';
720
  }
721
 
722
  return $lang;
723
+ }
724
+
725
+ /*
726
+ Checks for a new version of WP Cerber and creates messages if needed
727
+ */
728
+ function cerber_check_version() {
729
+ $ret = false;
730
+ if ( $updates = get_site_transient( 'update_plugins' ) ) {
731
+ $key = cerber_plug_in();
732
+ if ( isset( $updates->checked[ $key ] ) && isset( $updates->response[ $key ] ) ) {
733
+ $old = $updates->checked[ $key ];
734
+ $new = $updates->response[ $key ]->new_version;
735
+ if ( 1 === version_compare( $new, $old ) ) { // current version is lower than latest
736
+ $msg = __( 'New version is available', 'wp-cerber' ) . ' <span class="dashicons dashicons-arrow-right"></span>';
737
+ if ( is_multisite() ) {
738
+ $href = network_admin_url( 'plugins.php?plugin_status=upgrade' );
739
+ }
740
+ else {
741
+ $href = admin_url( 'plugins.php?plugin_status=upgrade' );
742
+ }
743
+ cerber_admin_message( '<b>' . $msg . '</b> <a href="' . $href . '">' . sprintf( __( 'Update to version %s of WP Cerber', 'wp-cerber' ), $new ) . '</a>' );
744
+ $ret = array( 'msg' => '<a href="' . $href . '">' . $msg . '</a>', 'ver' => $new );
745
+ }
746
+ }
747
+ }
748
+ return $ret;
749
  }
dashboard.php CHANGED
@@ -128,9 +128,9 @@ function cerber_show_lockouts($args = array(), $echo = true){
128
  */
129
  function cerber_acl_form(){
130
  global $wp_cerber;
131
- echo '<h2>'.__('White IP Access List','wp-cerber').'</h2><p><span style="color:green;" class="dashicons-before dashicons-thumbs-up"></span> '.__('These IPs will never be locked out','wp-cerber').' - <a target="_blank" href="http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Know more</a></p>'.
132
  cerber_acl_get_table('W');
133
- echo '<h2>'.__('Black IP Access List','wp-cerber').'</h2><p><span style="color:red;" class="dashicons-before dashicons-thumbs-down"></span> '.__('Nobody can log in or register from these IPs','wp-cerber').' - <a target="_blank" href="http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Know more</a></p>'.
134
  cerber_acl_get_table('B');
135
 
136
  $user_ip = $wp_cerber->getRemoteIp();
@@ -266,6 +266,8 @@ function cerber_admin_ajax() {
266
  foreach ( $list as $ip_id ) {
267
  if ($ip = filter_var( cerber_get_ip_id( $ip_id ), FILTER_VALIDATE_IP )){
268
  $ip_list[ $ip_id ] = $ip;
 
 
269
  }
270
  else {
271
  $response['data'][ $ip_id ] = '-';
@@ -280,11 +282,17 @@ function cerber_admin_ajax() {
280
  }
281
  break;
282
  case 'country':
283
- $list = lab_get_country($ip_list, false);
284
- foreach ( $list as $ip_id => $country ) {
285
- $response['data'][ $ip_id ] = cerber_get_flag_html( $country ) . cerber_country_name( $country );
 
 
 
 
 
 
286
  }
287
- break;
288
 
289
  }
290
 
@@ -1112,7 +1120,7 @@ function cerber_quick_w(){
1112
  <a href="'.$loc.'"><span class="dashicons dashicons-shield"></span> ' . __('Lockouts','wp-cerber').'</a> |
1113
  <a href="'.$acl.'"><span class="dashicons dashicons-admin-network"></span> ' . __('Access Lists','wp-cerber').'</a>
1114
  </div>';
1115
- if ( $new = cerber_update_check() ) {
1116
  echo '<div class="up-cerber">' . $new['msg'] . '</div>';
1117
  }
1118
  }
@@ -1271,25 +1279,10 @@ function cerber_show_help() {
1271
  *
1272
  */
1273
  function cerber_show_dashboard() {
1274
- global $wpdb;
1275
 
1276
  echo '<div style="padding-right: 30px;">';
1277
 
1278
- $period = time() - 24 * 3600;
1279
- $unique_ip = $wpdb->get_var('SELECT COUNT(DISTINCT ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN (10, 11, 16, 17, 40, 50, 51, 52, 53, 54) AND stamp > '.$period);
1280
- $kpi_locknum = $wpdb->get_var('SELECT COUNT(ip) FROM '. CERBER_BLOCKS_TABLE);
1281
-
1282
- // TODO: Add spam performance as percentage Denied / Allowed comments
1283
-
1284
- $kpi_list = array(
1285
- //array( __('Incidents detected','wp-cerber').'</a>', cerber_count_log( array( 16, 40, 50, 51, 52, 53, 54 ) ) ),
1286
- array( __('Malicious activities mitigated','wp-cerber').'</a>', cerber_count_log( array( 10, 11, 16, 17, 40, 50, 51, 52, 53, 54 ) ) ),
1287
- array( __('Spam comments denied','wp-cerber'), cerber_count_log( array( 16 ) ) ),
1288
- array( __('Spam form submissions denied','wp-cerber'), cerber_count_log( array( 17 ) ) ),
1289
- array( __('Malicious IP addresses detected','wp-cerber'), $unique_ip ),
1290
- array( __('Lockouts occurred','wp-cerber'), cerber_count_log( array( 10, 11 ) ) ),
1291
- //array( __('Locked out IP now','wp-cerber'), $kpi_locknum ),
1292
- );
1293
 
1294
  $kpi_show = '';
1295
  foreach ($kpi_list as $kpi){
@@ -1298,6 +1291,7 @@ function cerber_show_dashboard() {
1298
 
1299
  $kpi_show = '<table id = "crb-kpi" class="cerber-margin"><tr>'.$kpi_show.'</tr></table>';
1300
 
 
1301
  echo '<div>' . $kpi_show . '<p style="text-align: right; margin: 0;">' . __( 'in the last 24 hours', 'wp-cerber' ) . '</p></div>';
1302
 
1303
  //$total = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE );
@@ -1313,7 +1307,7 @@ function cerber_show_dashboard() {
1313
  }
1314
 
1315
  $links[] = '<a href="' . cerber_activity_link( array( 2 ) ) . '">' . __( 'User registered', 'wp-cerber' ) . '</a>';
1316
- $links[] = '<a href="' . cerber_activity_link( array( 10, 11, 16, 17, 20, 40, 50, 51, 52, 53, 54 ) ) . '">' . __( 'All suspicious activity', 'wp-cerber' ) . '</a>';
1317
 
1318
 
1319
  $nav_links = '<span style="display: inline-block; margin-left: 1em;">' . implode(' &nbsp;|&nbsp; ',$links) . '</span>';
@@ -1527,32 +1521,6 @@ function cerber_get_tab( $default = '', $available = array() ) {
1527
  return $tab;
1528
  }
1529
 
1530
- /*
1531
- Checks for a new version of WP Cerber and creates messages if needed
1532
- */
1533
- function cerber_update_check() {
1534
- $ret = false;
1535
- if ( $updates = get_site_transient( 'update_plugins' ) ) {
1536
- $key = cerber_plug_in();
1537
- if ( isset( $updates->checked[ $key ] ) && isset( $updates->response[ $key ] ) ) {
1538
- $old = $updates->checked[ $key ];
1539
- $new = $updates->response[ $key ]->new_version;
1540
- if ( 1 === version_compare( $new, $old ) ) { // current version is lower than latest
1541
- $msg = __( 'New version is available', 'wp-cerber' ) . ' <span class="dashicons dashicons-arrow-right"></span>';
1542
- if ( is_multisite() ) {
1543
- $href = network_admin_url( 'plugins.php?plugin_status=upgrade' );
1544
- }
1545
- else {
1546
- $href = admin_url( 'plugins.php?plugin_status=upgrade' );
1547
- }
1548
- cerber_admin_message( '<b>' . $msg . '</b> <a href="' . $href . '">' . sprintf( __( 'Update to version %s of WP Cerber', 'wp-cerber' ), $new ) . '</a>' );
1549
- $ret = array( 'msg' => '<a href="' . $href . '">' . $msg . '</a>', 'ver' => $new );
1550
- }
1551
- }
1552
- }
1553
- return $ret;
1554
- }
1555
-
1556
  /**
1557
  *
1558
  * Generates a link for subscribing on a currently displaying Activity page
@@ -1667,7 +1635,7 @@ add_filter('plugin_action_links','cerber_action_links',10,4);
1667
  function cerber_action_links($actions, $plugin_file, $plugin_data, $context){
1668
  if($plugin_file == cerber_plug_in()){
1669
  $link[] = '<a href="' . cerber_admin_link() . '">' . __('Dashboard','wp-cerber') . '</a>';
1670
- $link[] = '<a href="' . cerber_admin_link('acl') . '">' . __('Access Lists','wp-cerber') . '</a>';
1671
  $actions = array_merge ($link,$actions);
1672
  }
1673
  return $actions;
@@ -1821,8 +1789,8 @@ function cerber_admin_assets() {
1821
  * JS & CSS for admin head
1822
  *
1823
  */
1824
- add_action('admin_head','cerber_admin_css');
1825
- function cerber_admin_css(){
1826
  global $assets_url, $crb_assets_url, $crb_ajax_loader;
1827
 
1828
  $assets_url = plugin_dir_url( CERBER_FILE ) . 'assets/';
@@ -1906,12 +1874,20 @@ function cerber_admin_footer() {
1906
  //add_some_pointers();
1907
 
1908
  $ajax_nonce = wp_create_nonce( 'crb-ajax-admin' );
 
 
 
 
 
 
1909
  ?>
1910
  <script type="text/javascript">
1911
  crb_ajax_nonce = '<?php echo $ajax_nonce; ?>';
1912
  crb_ajax_loader = '<?php echo $crb_ajax_loader; ?>';
 
1913
  </script>
1914
- <?php
 
1915
 
1916
  if ( defined( 'CERBER_BETA' ) && cerber_is_admin_page( false ) ) :
1917
  ?>
@@ -1941,7 +1917,7 @@ function cerber_footer_text2($text){
1941
  $pr = '';
1942
  $support = '<a target="_blank" href="https://wordpress.org/support/plugin/wp-cerber">Support Forum</a>';
1943
  }
1944
- return 'WP Cerber Security '.$pr.' v '.CERBER_VER.'. | ' . $support;
1945
  }
1946
 
1947
  /*
128
  */
129
  function cerber_acl_form(){
130
  global $wp_cerber;
131
+ echo '<h2>'.__('White IP Access List','wp-cerber').'</h2><p><span style="color:green;" class="dashicons-before dashicons-thumbs-up"></span> '.__('These IPs will never be locked out','wp-cerber').' - <a target="_blank" href="https://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Know more</a></p>'.
132
  cerber_acl_get_table('W');
133
+ echo '<h2>'.__('Black IP Access List','wp-cerber').'</h2><p><span style="color:red;" class="dashicons-before dashicons-thumbs-down"></span> '.__('Nobody can log in or register from these IPs','wp-cerber').' - <a target="_blank" href="https://wpcerber.com/using-ip-access-lists-to-protect-wordpress/">Know more</a></p>'.
134
  cerber_acl_get_table('B');
135
 
136
  $user_ip = $wp_cerber->getRemoteIp();
266
  foreach ( $list as $ip_id ) {
267
  if ($ip = filter_var( cerber_get_ip_id( $ip_id ), FILTER_VALIDATE_IP )){
268
  $ip_list[ $ip_id ] = $ip;
269
+ // Set elements for frontend
270
+ $response['data'][ $ip_id ] = '';
271
  }
272
  else {
273
  $response['data'][ $ip_id ] = '-';
282
  }
283
  break;
284
  case 'country':
285
+ if ($country_list = lab_get_country($ip_list, false)) {
286
+ foreach ( $country_list as $ip_id => $country ) {
287
+ if ( $country ) {
288
+ $response['data'][ $ip_id ] = cerber_get_flag_html( $country ) . cerber_country_name( $country );
289
+ }
290
+ else {
291
+ $response['data'][ $ip_id ] = __( 'Unknown', 'wp-cerber' );
292
+ }
293
+ }
294
  }
295
+ break;
296
 
297
  }
298
 
1120
  <a href="'.$loc.'"><span class="dashicons dashicons-shield"></span> ' . __('Lockouts','wp-cerber').'</a> |
1121
  <a href="'.$acl.'"><span class="dashicons dashicons-admin-network"></span> ' . __('Access Lists','wp-cerber').'</a>
1122
  </div>';
1123
+ if ( $new = cerber_check_version() ) {
1124
  echo '<div class="up-cerber">' . $new['msg'] . '</div>';
1125
  }
1126
  }
1279
  *
1280
  */
1281
  function cerber_show_dashboard() {
 
1282
 
1283
  echo '<div style="padding-right: 30px;">';
1284
 
1285
+ $kpi_list = cerber_calculate_kpi(1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1286
 
1287
  $kpi_show = '';
1288
  foreach ($kpi_list as $kpi){
1291
 
1292
  $kpi_show = '<table id = "crb-kpi" class="cerber-margin"><tr>'.$kpi_show.'</tr></table>';
1293
 
1294
+ // TODO: add link "send daily report to my email"
1295
  echo '<div>' . $kpi_show . '<p style="text-align: right; margin: 0;">' . __( 'in the last 24 hours', 'wp-cerber' ) . '</p></div>';
1296
 
1297
  //$total = $wpdb->get_var( 'SELECT count(ip) FROM ' . CERBER_LOG_TABLE );
1307
  }
1308
 
1309
  $links[] = '<a href="' . cerber_activity_link( array( 2 ) ) . '">' . __( 'User registered', 'wp-cerber' ) . '</a>';
1310
+ $links[] = '<a href="' . cerber_activity_link( crb_get_activity_set( 'suspicious' ) ) . '">' . __( 'All suspicious activity', 'wp-cerber' ) . '</a>';
1311
 
1312
 
1313
  $nav_links = '<span style="display: inline-block; margin-left: 1em;">' . implode(' &nbsp;|&nbsp; ',$links) . '</span>';
1521
  return $tab;
1522
  }
1523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1524
  /**
1525
  *
1526
  * Generates a link for subscribing on a currently displaying Activity page
1635
  function cerber_action_links($actions, $plugin_file, $plugin_data, $context){
1636
  if($plugin_file == cerber_plug_in()){
1637
  $link[] = '<a href="' . cerber_admin_link() . '">' . __('Dashboard','wp-cerber') . '</a>';
1638
+ $link[] = '<a href="' . cerber_admin_link('main') . '">' . __('Main settings','wp-cerber') . '</a>';
1639
  $actions = array_merge ($link,$actions);
1640
  }
1641
  return $actions;
1789
  * JS & CSS for admin head
1790
  *
1791
  */
1792
+ add_action('admin_head', 'cerber_admin_head' );
1793
+ function cerber_admin_head(){
1794
  global $assets_url, $crb_assets_url, $crb_ajax_loader;
1795
 
1796
  $assets_url = plugin_dir_url( CERBER_FILE ) . 'assets/';
1874
  //add_some_pointers();
1875
 
1876
  $ajax_nonce = wp_create_nonce( 'crb-ajax-admin' );
1877
+ if (lab_lab()) {
1878
+ $crb_lab_available = 'true';
1879
+ }
1880
+ else {
1881
+ $crb_lab_available = 'false';
1882
+ }
1883
  ?>
1884
  <script type="text/javascript">
1885
  crb_ajax_nonce = '<?php echo $ajax_nonce; ?>';
1886
  crb_ajax_loader = '<?php echo $crb_ajax_loader; ?>';
1887
+ crb_lab_available = <?php echo $crb_lab_available; ?>;
1888
  </script>
1889
+
1890
+ <?php
1891
 
1892
  if ( defined( 'CERBER_BETA' ) && cerber_is_admin_page( false ) ) :
1893
  ?>
1917
  $pr = '';
1918
  $support = '<a target="_blank" href="https://wordpress.org/support/plugin/wp-cerber">Support Forum</a>';
1919
  }
1920
+ return 'WP Cerber Security '.$pr.' '.CERBER_VER.'. | ' . $support;
1921
  }
1922
 
1923
  /*
languages/wp-cerber.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: WP Cerber\n"
6
  "Report-Msgid-Bugs-To: \n"
7
  "POT-Creation-Date: Tue Sep 08 2015 21:38:11 GMT+0300\n"
8
- "POT-Revision-Date: Sat Nov 11 2017 14:50:33 GMT+0300\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -28,15 +28,15 @@ msgstr ""
28
  msgid "Remove"
29
  msgstr ""
30
 
31
- #: ../dashboard.php:93 ../dashboard.php:624 ../wp-cerber.php:3333
32
  msgid "IP"
33
  msgstr ""
34
 
35
- #: ../dashboard.php:94 ../dashboard.php:625
36
  msgid "Hostname"
37
  msgstr ""
38
 
39
- #: ../dashboard.php:95 ../dashboard.php:626
40
  msgid "Country"
41
  msgstr ""
42
 
@@ -44,7 +44,7 @@ msgstr ""
44
  msgid "Expires"
45
  msgstr ""
46
 
47
- #: ../dashboard.php:97 ../wp-cerber.php:2993
48
  msgid "Reason"
49
  msgstr ""
50
 
@@ -69,8 +69,8 @@ msgstr ""
69
  msgid "No lockouts at the moment. The sky is clear."
70
  msgstr ""
71
 
72
- #: ../dashboard.php:131 ../dashboard.php:582 ../dashboard.php:804 ../dashboard.
73
- #: php:1102 ../wp-cerber.php:3465 ../settings.php:61 ../settings.php:201
74
  msgid "White IP Access List"
75
  msgstr ""
76
 
@@ -78,8 +78,8 @@ msgstr ""
78
  msgid "These IPs will never be locked out"
79
  msgstr ""
80
 
81
- #: ../dashboard.php:133 ../dashboard.php:583 ../dashboard.php:806 ../dashboard.
82
- #: php:1103
83
  msgid "Black IP Access List"
84
  msgstr ""
85
 
@@ -91,7 +91,7 @@ msgstr ""
91
  msgid "Your IP"
92
  msgstr ""
93
 
94
- #: ../dashboard.php:157 ../dashboard.php:836
95
  msgid "Check for activity"
96
  msgstr ""
97
 
@@ -121,399 +121,382 @@ msgstr ""
121
  msgid "Address %s was added to Black IP Access List"
122
  msgstr ""
123
 
124
- #: ../dashboard.php:325
 
 
 
 
125
  msgid "unknown"
126
  msgstr ""
127
 
128
- #: ../dashboard.php:349
129
  msgid "Message has been sent to "
130
  msgstr ""
131
 
132
- #: ../dashboard.php:352
133
  msgid "Unable to send notification email"
134
  msgstr ""
135
 
136
- #: ../dashboard.php:360
137
  #, php-format
138
  msgid "Lockout for %s was removed"
139
  msgstr ""
140
 
141
- #: ../dashboard.php:377 ../dashboard.php:1476
142
  msgid "Settings saved"
143
  msgstr ""
144
 
145
- #: ../dashboard.php:449
146
  msgid "IP address"
147
  msgstr ""
148
 
149
- #: ../dashboard.php:449 ../dashboard.php:627
150
  msgid "Date"
151
  msgstr ""
152
 
153
- #: ../dashboard.php:449 ../dashboard.php:628
154
  msgid "Event"
155
  msgstr ""
156
 
157
- #: ../dashboard.php:449 ../dashboard.php:629
158
  msgid "Local User"
159
  msgstr ""
160
 
161
- #: ../dashboard.php:449
162
  msgid "User login"
163
  msgstr ""
164
 
165
- #: ../dashboard.php:449
166
  msgid "User ID"
167
  msgstr ""
168
 
169
- #: ../dashboard.php:449 ../dashboard.php:630 ../wp-cerber.php:3341
170
  msgid "Username used"
171
  msgstr ""
172
 
173
- #: ../dashboard.php:587 ../dashboard.php:809 ../common.php:483
174
  msgid "Locked out"
175
  msgstr ""
176
 
177
- #: ../dashboard.php:647
178
  msgid "Export"
179
  msgstr ""
180
 
181
- #: ../dashboard.php:651
182
  msgid "No activity has been logged."
183
  msgstr ""
184
 
185
- #: ../dashboard.php:657
186
  msgid "All events"
187
  msgstr ""
188
 
189
- #: ../dashboard.php:666
190
  msgid "Search for IP or username"
191
  msgstr ""
192
 
193
- #: ../dashboard.php:666
194
  msgid "Filter"
195
  msgstr ""
196
 
197
- #: ../dashboard.php:832
198
  msgid "Abuse email:"
199
  msgstr ""
200
 
201
- #: ../dashboard.php:836
202
  msgid "Network:"
203
  msgstr ""
204
 
205
- #: ../dashboard.php:850
206
  msgid "Add network to the Black List"
207
  msgstr ""
208
 
209
- #: ../dashboard.php:854
210
  msgid "Add IP to the Black List"
211
  msgstr ""
212
 
213
- #: ../dashboard.php:885 ../settings.php:224
214
  msgid "WP Cerber Security"
215
  msgstr ""
216
 
217
  #. Name of the plugin
218
- #: ../dashboard.php:885 ../dashboard.php:904
219
  msgid "WP Cerber"
220
  msgstr ""
221
 
222
- #: ../dashboard.php:887
223
  msgid "Cerber Dashboard"
224
  msgstr ""
225
 
226
- #: ../dashboard.php:887 ../dashboard.php:1110 ../dashboard.php:1669 ../settings.
227
- #: php:229
228
  msgid "Dashboard"
229
  msgstr ""
230
 
231
- #: ../dashboard.php:890
232
  msgid "Cerber Security Rules"
233
  msgstr ""
234
 
235
- #: ../dashboard.php:890 ../dashboard.php:2002
236
  msgid "Security Rules"
237
  msgstr ""
238
 
239
- #: ../dashboard.php:893
240
  msgid "Cerber antispam settings"
241
  msgstr ""
242
 
243
- #: ../dashboard.php:893 ../wp-cerber.php:3474 ../settings.php:152
244
  msgid "Antispam"
245
  msgstr ""
246
 
247
- #: ../dashboard.php:894
248
  msgid "Cerber tools"
249
  msgstr ""
250
 
251
- #: ../dashboard.php:894 ../cerber-tools.php:43
252
  msgid "Tools"
253
  msgstr ""
254
 
255
- #: ../dashboard.php:966
256
  msgid "Comments"
257
  msgstr ""
258
 
259
- #: ../dashboard.php:967
260
  msgid "Last login"
261
  msgstr ""
262
 
263
- #: ../dashboard.php:968
264
  msgid "Failed login attempts"
265
  msgstr ""
266
 
267
- #: ../dashboard.php:969
268
  msgid "Registered"
269
  msgstr ""
270
 
271
- #: ../dashboard.php:1000 ../dashboard.php:1085
272
  msgid "Never"
273
  msgstr ""
274
 
275
- #: ../dashboard.php:1036
276
  msgid "You"
277
  msgstr ""
278
 
279
- #: ../dashboard.php:1054
280
  msgid "Cerber Quick View"
281
  msgstr ""
282
 
283
- #: ../dashboard.php:1089
284
  msgid "active"
285
  msgstr ""
286
 
287
- #: ../dashboard.php:1089
288
  msgid "deactivate"
289
  msgstr ""
290
 
291
- #: ../dashboard.php:1091
292
  msgid "not active"
293
  msgstr ""
294
 
295
- #: ../dashboard.php:1092
296
  msgid "disabled"
297
  msgstr ""
298
 
299
- #: ../dashboard.php:1097
300
  msgid "failed attempts"
301
  msgstr ""
302
 
303
- #: ../dashboard.php:1097 ../dashboard.php:1098
304
  msgid "in 24 hours"
305
  msgstr ""
306
 
307
- #: ../dashboard.php:1097 ../dashboard.php:1098
308
  msgid "view all"
309
  msgstr ""
310
 
311
- #: ../dashboard.php:1098
312
  msgid "lockouts"
313
  msgstr ""
314
 
315
- #: ../dashboard.php:1100
316
  msgid "Lockouts at the moment"
317
  msgstr ""
318
 
319
- #: ../dashboard.php:1101
320
  msgid "Last lockout"
321
  msgstr ""
322
 
323
- #: ../dashboard.php:1102 ../dashboard.php:1103 ../dashboard.php:1649
324
  msgid "entry"
325
  msgid_plural "entries"
326
  msgstr[0] ""
327
  msgstr[1] ""
328
 
329
- #: ../dashboard.php:1104 ../settings.php:76
330
  msgid "Citadel mode"
331
  msgstr ""
332
 
333
- #: ../dashboard.php:1106 ../settings.php:166
334
  msgid "Push notifications"
335
  msgstr ""
336
 
337
- #: ../dashboard.php:1111 ../dashboard.php:1321 ../wp-cerber.php:3324 ../settings.
338
- #: php:82 ../settings.php:231
339
  msgid "Activity"
340
  msgstr ""
341
 
342
- #: ../dashboard.php:1112 ../settings.php:235
343
  msgid "Lockouts"
344
  msgstr ""
345
 
346
- #: ../dashboard.php:1113 ../dashboard.php:1670 ../wp-cerber.php:3473 ../settings.
347
- #: php:240 ../cerber-tools.php:88 ../cerber-tools.php:97 ../cerber-tools.php:171
348
  msgid "Access Lists"
349
  msgstr ""
350
 
351
- #: ../dashboard.php:1159 ../settings.php:63
352
  msgid "My site is behind a reverse proxy"
353
  msgstr ""
354
 
355
- #: ../dashboard.php:1286
356
- msgid "Malicious activities mitigated"
357
- msgstr ""
358
-
359
- #: ../dashboard.php:1287
360
- msgid "Spam comments denied"
361
- msgstr ""
362
-
363
- #: ../dashboard.php:1288
364
- msgid "Spam form submissions denied"
365
- msgstr ""
366
-
367
- #: ../dashboard.php:1289
368
- msgid "Malicious IP addresses detected"
369
- msgstr ""
370
-
371
- #: ../dashboard.php:1290
372
- msgid "Lockouts occurred"
373
  msgstr ""
374
 
375
- #: ../dashboard.php:1307 ../dashboard.php:1336
376
  msgid "View all"
377
  msgstr ""
378
 
379
- #: ../dashboard.php:1315 ../common.php:438
380
  msgid "User registered"
381
  msgstr ""
382
 
383
- #: ../dashboard.php:1316
384
  msgid "All suspicious activity"
385
  msgstr ""
386
 
387
- #: ../dashboard.php:1337
388
  msgid "Recently locked out IP addresses"
389
  msgstr ""
390
 
391
- #: ../dashboard.php:1360
392
  msgid "Confused about some settings?"
393
  msgstr ""
394
 
395
- #: ../dashboard.php:1361
396
  msgid "You can easily load default recommended settings using button below"
397
  msgstr ""
398
 
399
- #: ../dashboard.php:1363
400
  msgid "Load default settings"
401
  msgstr ""
402
 
403
- #: ../dashboard.php:1365
404
  msgid "Are you sure?"
405
  msgstr ""
406
 
407
- #: ../dashboard.php:1371
408
  msgid "doesn't affect Custom login URL and Access Lists"
409
  msgstr ""
410
 
411
- #: ../dashboard.php:1372 ../wp-cerber.php:3025 ../wp-cerber.php:3467
412
  msgid "Getting Started Guide"
413
  msgstr ""
414
 
415
- #: ../dashboard.php:1461
416
  msgid "Attention! Citadel mode is now active. Nobody is able to log in."
417
  msgstr ""
418
 
419
- #: ../dashboard.php:1462
420
  msgid "Deactivate"
421
  msgstr ""
422
 
423
- #: ../dashboard.php:1463
424
  msgid "View Activity"
425
  msgstr ""
426
 
427
- #: ../dashboard.php:1541
428
- msgid "New version is available"
429
- msgstr ""
430
-
431
- #: ../dashboard.php:1548
432
- #, php-format
433
- msgid "Update to version %s of WP Cerber"
434
- msgstr ""
435
-
436
- #: ../dashboard.php:1582
437
  msgid "Subscribe"
438
  msgstr ""
439
 
440
- #: ../dashboard.php:1583 ../cerber-tools.php:226
441
  msgid "Unsubscribe"
442
  msgstr ""
443
 
444
- #: ../dashboard.php:1611
445
  msgid "You've subscribed"
446
  msgstr ""
447
 
448
- #: ../dashboard.php:1614
449
  msgid "You've unsubscribed"
450
  msgstr ""
451
 
452
- #: ../dashboard.php:2007
 
 
 
 
453
  msgid "Countries"
454
  msgstr ""
455
 
456
- #: ../dashboard.php:2072
457
  #, php-format
458
  msgid "Permitted for one country"
459
  msgid_plural "Permitted for %d countries"
460
  msgstr[0] ""
461
  msgstr[1] ""
462
 
463
- #: ../dashboard.php:2075
464
  #, php-format
465
  msgid "Blocked for one country"
466
  msgid_plural "Blocked for %d countries"
467
  msgstr[0] ""
468
  msgstr[1] ""
469
 
470
- #: ../dashboard.php:2083
471
  msgid "No rule"
472
  msgstr ""
473
 
474
- #: ../dashboard.php:2139
475
  msgid "Start typing here to find a country"
476
  msgstr ""
477
 
478
- #: ../dashboard.php:2220
479
  msgid "Click on a country name to add it to the list of selected countries"
480
  msgstr ""
481
 
482
- #: ../dashboard.php:2224
483
  #, php-format
484
  msgid "Selected countries are allowed to %s other countries are not allowed"
485
  msgstr ""
486
 
487
- #: ../dashboard.php:2227
488
  #, php-format
489
  msgid "Selected countries are not allowed to %s other countries are allowed"
490
  msgstr ""
491
 
492
- #: ../dashboard.php:2239
493
  msgid "Submit forms"
494
  msgstr ""
495
 
496
- #: ../dashboard.php:2240
497
  msgid "Post comments"
498
  msgstr ""
499
 
500
- #: ../dashboard.php:2241
501
  msgid "Log in to the website"
502
  msgstr ""
503
 
504
- #: ../dashboard.php:2242
505
  msgid "Register on the website"
506
  msgstr ""
507
 
508
- #: ../dashboard.php:2243
509
  msgid "Use XML-RPC"
510
  msgstr ""
511
 
512
- #: ../dashboard.php:2244
513
  msgid "Use REST API"
514
  msgstr ""
515
 
516
- #: ../dashboard.php:2284
517
  msgid "Security rules have been updated"
518
  msgstr ""
519
 
@@ -554,10 +537,10 @@ msgstr[0] ""
554
  msgstr[1] ""
555
 
556
  #: ../wp-cerber.php:565 ../wp-cerber.php:577 ../wp-cerber.php:584 ../wp-cerber.
557
- #: php:789 ../wp-cerber.php:1004 ../wp-cerber.php:1010 ../wp-cerber.php:1015 ..
558
- #: /wp-cerber.php:1020 ../wp-cerber.php:1026 ../wp-cerber.php:1033 ../wp-cerber.
559
- #: php:1134 ../wp-cerber.php:1271 ../common.php:131 ../common.php:184 ../common.
560
- #: php:188 ../settings.php:531
561
  msgid "ERROR:"
562
  msgstr ""
563
 
@@ -567,325 +550,376 @@ msgid ""
567
  "block below."
568
  msgstr ""
569
 
570
- #: ../wp-cerber.php:800
 
 
 
 
 
 
571
  #, php-format
572
  msgid ""
573
  "<strong>ERROR</strong>: The password you entered for the username %s is "
574
  "incorrect."
575
  msgstr ""
576
 
577
- #: ../wp-cerber.php:1005 ../wp-cerber.php:1011 ../wp-cerber.php:1027 ../wp-cerber.
578
- #: php:1034
579
  msgid "You are not allowed to register."
580
  msgstr ""
581
 
582
- #: ../wp-cerber.php:1021
583
  msgid "Username is not allowed. Please choose another one."
584
  msgstr ""
585
 
586
- #: ../wp-cerber.php:1271
587
  msgid "Sorry, human verification failed."
588
  msgstr ""
589
 
590
- #: ../wp-cerber.php:2935
591
  msgid "WP Cerber notify"
592
  msgstr ""
593
 
594
- #: ../wp-cerber.php:2957
595
  msgid "Citadel mode is activated"
596
  msgstr ""
597
 
598
- #: ../wp-cerber.php:2959
599
  #, php-format
600
  msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
601
  msgstr ""
602
 
603
- #: ../wp-cerber.php:2960
604
  #, php-format
605
  msgid "Last failed attempt was at %s from IP %s with user login: %s."
606
  msgstr ""
607
 
608
- #: ../wp-cerber.php:2961 ../wp-cerber.php:3365
609
  msgid "View activity in dashboard"
610
  msgstr ""
611
 
612
- #: ../wp-cerber.php:2986
613
  msgid "unspecified"
614
  msgstr ""
615
 
616
- #: ../wp-cerber.php:2989
617
  msgid "Number of lockouts is increasing"
618
  msgstr ""
619
 
620
- #: ../wp-cerber.php:2991
621
  msgid "Number of active lockouts"
622
  msgstr ""
623
 
624
- #: ../wp-cerber.php:2992
625
  #, php-format
626
  msgid "Last lockout was added: %s for IP %s"
627
  msgstr ""
628
 
629
- #: ../wp-cerber.php:2994
630
  msgid "View activity for this IP"
631
  msgstr ""
632
 
633
- #: ../wp-cerber.php:2995
634
  msgid "View lockouts in dashboard"
635
  msgstr ""
636
 
637
- #: ../wp-cerber.php:2998 ../wp-cerber.php:3000
638
  msgid "A new version of WP Cerber is available to install"
639
  msgstr ""
640
 
641
- #: ../wp-cerber.php:2999
642
  msgid "Hi!"
643
  msgstr ""
644
 
645
- #: ../wp-cerber.php:3002 ../wp-cerber.php:3013
646
  msgid "Website"
647
  msgstr ""
648
 
649
- #: ../wp-cerber.php:3005 ../wp-cerber.php:3006
650
  msgid "The WP Cerber security plugin has been deactivated"
651
  msgstr ""
652
 
653
- #: ../wp-cerber.php:3008
654
  msgid "Not logged in"
655
  msgstr ""
656
 
657
- #: ../wp-cerber.php:3014
658
  msgid "By user"
659
  msgstr ""
660
 
661
- #: ../wp-cerber.php:3015
662
  msgid "From IP address"
663
  msgstr ""
664
 
665
- #: ../wp-cerber.php:3018
666
  msgid "From country"
667
  msgstr ""
668
 
669
- #: ../wp-cerber.php:3022
670
  msgid "The WP Cerber security plugin is now active"
671
  msgstr ""
672
 
673
- #: ../wp-cerber.php:3023 ../wp-cerber.php:3464
674
  msgid "WP Cerber is now active and has started protecting your site"
675
  msgstr ""
676
 
677
- #: ../wp-cerber.php:3031
678
  msgid "New Custom login URL"
679
  msgstr ""
680
 
681
- #: ../wp-cerber.php:3035 ../wp-cerber.php:3036
682
  msgid "A new activity has been recorded"
683
  msgstr ""
684
 
685
- #: ../wp-cerber.php:3051
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  msgid "This message was sent by"
687
  msgstr ""
688
 
689
- #: ../wp-cerber.php:3337
 
 
 
 
690
  msgid "User"
691
  msgstr ""
692
 
693
- #: ../wp-cerber.php:3345
694
  msgid "Search string"
695
  msgstr ""
696
 
697
- #: ../wp-cerber.php:3366
698
  msgid "To unsubscribe click here"
699
  msgstr ""
700
 
701
- #: ../wp-cerber.php:3439
702
  #, php-format
703
  msgid "The WP Cerber requires PHP %s or higher. You are running"
704
  msgstr ""
705
 
706
- #: ../wp-cerber.php:3443
707
  #, php-format
708
  msgid "The WP Cerber requires WordPress %s or higher. You are running"
709
  msgstr ""
710
 
711
- #: ../wp-cerber.php:3448
712
  msgid "Can't activate WP Cerber due to a database error."
713
  msgstr ""
714
 
715
- #: ../wp-cerber.php:3465
716
  msgid "Your IP address is added to the"
717
  msgstr ""
718
 
719
- #: ../wp-cerber.php:3472 ../settings.php:237
720
  msgid "Main Settings"
721
  msgstr ""
722
 
723
- #: ../wp-cerber.php:3475 ../settings.php:242
724
  msgid "Hardening"
725
  msgstr ""
726
 
727
- #: ../wp-cerber.php:3476 ../settings.php:62 ../settings.php:80 ../settings.php:247
728
  msgid "Notifications"
729
  msgstr ""
730
 
731
- #: ../wp-cerber.php:3477
732
  msgid "Import settings"
733
  msgstr ""
734
 
735
- #: ../whois.php:221 ../whois.php:252 ../common.php:502
736
- msgid "Unknown"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
737
  msgstr ""
738
 
739
- #: ../common.php:437
740
  msgid "User created"
741
  msgstr ""
742
 
743
- #: ../common.php:439
744
  msgid "Logged in"
745
  msgstr ""
746
 
747
- #: ../common.php:440
748
  msgid "Logged out"
749
  msgstr ""
750
 
751
- #: ../common.php:441
752
  msgid "Login failed"
753
  msgstr ""
754
 
755
- #: ../common.php:444
756
  msgid "IP blocked"
757
  msgstr ""
758
 
759
- #: ../common.php:445
760
  msgid "Subnet blocked"
761
  msgstr ""
762
 
763
- #: ../common.php:447
764
  msgid "Citadel activated!"
765
  msgstr ""
766
 
767
- #: ../common.php:448
768
  msgid "Spam comment denied"
769
  msgstr ""
770
 
771
- #: ../common.php:449
772
  msgid "Spam form submission denied"
773
  msgstr ""
774
 
775
- #: ../common.php:450
776
  msgid "Form submission denied"
777
  msgstr ""
778
 
779
- #: ../common.php:451
780
  msgid "Comment denied"
781
  msgstr ""
782
 
783
- #: ../common.php:462
784
  msgid "Password changed"
785
  msgstr ""
786
 
787
- #: ../common.php:463
788
  msgid "Password reset requested"
789
  msgstr ""
790
 
791
- #: ../common.php:465
792
  msgid "reCAPTCHA verification failed"
793
  msgstr ""
794
 
795
- #: ../common.php:466
796
  msgid "reCAPTCHA settings are incorrect"
797
  msgstr ""
798
 
799
- #: ../common.php:467
800
  msgid "Request to the Google reCAPTCHA service failed"
801
  msgstr ""
802
 
803
- #: ../common.php:469
804
  msgid "Attempt to access prohibited URL"
805
  msgstr ""
806
 
807
- #: ../common.php:470 ../common.php:505
808
  msgid "Attempt to log in with non-existent username"
809
  msgstr ""
810
 
811
- #: ../common.php:471 ../common.php:506
812
  msgid "Attempt to log in with prohibited username"
813
  msgstr ""
814
 
815
- #: ../common.php:473
816
  msgid "Attempt to log in denied"
817
  msgstr ""
818
 
819
- #: ../common.php:474
820
  msgid "Attempt to register denied"
821
  msgstr ""
822
 
823
- #: ../common.php:476
824
  msgid "Request to REST API denied"
825
  msgstr ""
826
 
827
- #: ../common.php:477
828
  msgid "XML-RPC request denied"
829
  msgstr ""
830
 
831
- #: ../common.php:481
832
  msgid "Bot detected"
833
  msgstr ""
834
 
835
- #: ../common.php:482
836
  msgid "Citadel mode is active"
837
  msgstr ""
838
 
839
- #: ../common.php:484
840
  msgid "IP blacklisted"
841
  msgstr ""
842
 
843
- #: ../common.php:487
844
  msgid "Malicious activity detected"
845
  msgstr ""
846
 
847
- #: ../common.php:488
848
  msgid "Blocked by country rule"
849
  msgstr ""
850
 
851
- #: ../common.php:489
852
  msgid "Limit reached"
853
  msgstr ""
854
 
855
- #: ../common.php:490
856
  msgid "Multiple suspicious activities"
857
  msgstr ""
858
 
859
- #: ../common.php:503
860
  msgid "Limit on login attempts is reached"
861
  msgstr ""
862
 
863
- #: ../common.php:504
864
  msgid "Attempt to access"
865
  msgstr ""
866
 
867
- #: ../common.php:507
868
  msgid "Limit on failed reCAPTCHA verifications is reached"
869
  msgstr ""
870
 
871
- #: ../common.php:508
872
  msgid "Bot activity is detected"
873
  msgstr ""
874
 
875
- #: ../common.php:509
876
  msgid "Multiple suspicious activities were detected"
877
  msgstr ""
878
 
879
- #: ../common.php:552
880
  #, php-format
881
  msgid "%s ago"
882
  msgstr ""
883
 
884
- #: ../cerber-lab.php:648
 
 
 
 
 
 
 
 
 
885
  msgid "Want to make WP Cerber even more powerful?"
886
  msgstr ""
887
 
888
- #: ../cerber-lab.php:649
889
  msgid ""
890
  "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. "
891
  "This helps the plugin team to develop new algorithms for WP Cerber that will "
@@ -893,15 +927,15 @@ msgid ""
893
  "everyday. You can disable the sending in the plugin settings at any time."
894
  msgstr ""
895
 
896
- #: ../cerber-lab.php:650
897
  msgid "OK, nail them all"
898
  msgstr ""
899
 
900
- #: ../cerber-lab.php:651
901
  msgid "NO, maybe later"
902
  msgstr ""
903
 
904
- #: ../cerber-lab.php:652 ../settings.php:205
905
  msgid "Know more"
906
  msgstr ""
907
 
@@ -1007,7 +1041,7 @@ msgstr ""
1007
  msgid "Send notification to admin email"
1008
  msgstr ""
1009
 
1010
- #: ../settings.php:80 ../settings.php:385
1011
  msgid "Click to send test"
1012
  msgstr ""
1013
 
@@ -1335,81 +1369,123 @@ msgstr ""
1335
  msgid "Not available"
1336
  msgstr ""
1337
 
1338
- #: ../settings.php:187
1339
- msgid "Make your protection smarter!"
1340
  msgstr ""
1341
 
1342
  #: ../settings.php:191
 
 
 
 
1343
  msgid ""
1344
  "Please enable Permalinks to use this feature. Set Permalink Settings to "
1345
  "something other than Default."
1346
  msgstr ""
1347
 
1348
- #: ../settings.php:194
1349
  msgid ""
1350
  "Be careful when enabling this options. If you forget the custom login URL "
1351
  "you will not be able to login."
1352
  msgstr ""
1353
 
1354
- #: ../settings.php:198
1355
  msgid ""
1356
  "In the Citadel mode nobody is able to log in except IPs from the White IP "
1357
  "Access List. Active user sessions will not be affected."
1358
  msgstr ""
1359
 
1360
- #: ../settings.php:201
1361
  msgid "These settings do not affect hosts from the "
1362
  msgstr ""
1363
 
1364
- #: ../settings.php:204
1365
  msgid ""
1366
  "Before you can start using reCAPTCHA, you have to obtain Site key and Secret "
1367
  "key on the Google website"
1368
  msgstr ""
1369
 
1370
- #: ../settings.php:244
1371
  msgid "Users"
1372
  msgstr ""
1373
 
1374
- #: ../settings.php:249
1375
  msgid "Help"
1376
  msgstr ""
1377
 
1378
- #: ../settings.php:366
1379
  #, php-format
1380
  msgid "%s allowed retries in %s minutes"
1381
  msgstr ""
1382
 
1383
- #: ../settings.php:371
1384
  #, php-format
1385
  msgid "%s allowed registrations in %s minutes from one IP"
1386
  msgstr ""
1387
 
1388
- #: ../settings.php:376
1389
  #, php-format
1390
  msgid "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
1391
  msgstr ""
1392
 
1393
- #: ../settings.php:383
1394
  msgid "Notify admin if the number of active lockouts above"
1395
  msgstr ""
1396
 
1397
- #: ../settings.php:388
1398
  #, php-format
1399
  msgid "Enable after %s failed login attempts in last %s minutes"
1400
  msgstr ""
1401
 
1402
- #: ../settings.php:481 ../settings.php:482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1403
  msgid "Attention! You have changed the login URL! The new login URL is"
1404
  msgstr ""
1405
 
1406
- #: ../settings.php:483 ../settings.php:484
1407
  msgid ""
1408
  "If you use a caching plugin, you have to add your new login URL to the list "
1409
- "of pages not to cache"
1410
  msgstr ""
1411
 
1412
- #: ../settings.php:558
1413
  msgid "<strong>ERROR</strong>: please enter a valid email address."
1414
  msgstr ""
1415
 
@@ -1490,6 +1566,6 @@ msgstr ""
1490
  msgid "Error while parsing file"
1491
  msgstr ""
1492
 
1493
- #: ../cerber-tools.php:296
1494
  msgid "Antispam and bot detection settings"
1495
  msgstr ""
5
  "Project-Id-Version: WP Cerber\n"
6
  "Report-Msgid-Bugs-To: \n"
7
  "POT-Creation-Date: Tue Sep 08 2015 21:38:11 GMT+0300\n"
8
+ "POT-Revision-Date: Mon Nov 20 2017 19:00:01 GMT+0300\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
28
  msgid "Remove"
29
  msgstr ""
30
 
31
+ #: ../dashboard.php:93 ../dashboard.php:632 ../wp-cerber.php:3427
32
  msgid "IP"
33
  msgstr ""
34
 
35
+ #: ../dashboard.php:94 ../dashboard.php:633
36
  msgid "Hostname"
37
  msgstr ""
38
 
39
+ #: ../dashboard.php:95 ../dashboard.php:634
40
  msgid "Country"
41
  msgstr ""
42
 
44
  msgid "Expires"
45
  msgstr ""
46
 
47
+ #: ../dashboard.php:97 ../wp-cerber.php:2981
48
  msgid "Reason"
49
  msgstr ""
50
 
69
  msgid "No lockouts at the moment. The sky is clear."
70
  msgstr ""
71
 
72
+ #: ../dashboard.php:131 ../dashboard.php:590 ../dashboard.php:812 ../dashboard.
73
+ #: php:1110 ../wp-cerber.php:3566 ../settings.php:61 ../settings.php:205
74
  msgid "White IP Access List"
75
  msgstr ""
76
 
78
  msgid "These IPs will never be locked out"
79
  msgstr ""
80
 
81
+ #: ../dashboard.php:133 ../dashboard.php:591 ../dashboard.php:814 ../dashboard.
82
+ #: php:1111
83
  msgid "Black IP Access List"
84
  msgstr ""
85
 
91
  msgid "Your IP"
92
  msgstr ""
93
 
94
+ #: ../dashboard.php:157 ../dashboard.php:844
95
  msgid "Check for activity"
96
  msgstr ""
97
 
121
  msgid "Address %s was added to Black IP Access List"
122
  msgstr ""
123
 
124
+ #: ../dashboard.php:291 ../whois.php:221 ../whois.php:252 ../common.php:552
125
+ msgid "Unknown"
126
+ msgstr ""
127
+
128
+ #: ../dashboard.php:333
129
  msgid "unknown"
130
  msgstr ""
131
 
132
+ #: ../dashboard.php:357
133
  msgid "Message has been sent to "
134
  msgstr ""
135
 
136
+ #: ../dashboard.php:360
137
  msgid "Unable to send notification email"
138
  msgstr ""
139
 
140
+ #: ../dashboard.php:368
141
  #, php-format
142
  msgid "Lockout for %s was removed"
143
  msgstr ""
144
 
145
+ #: ../dashboard.php:385 ../dashboard.php:1470
146
  msgid "Settings saved"
147
  msgstr ""
148
 
149
+ #: ../dashboard.php:457
150
  msgid "IP address"
151
  msgstr ""
152
 
153
+ #: ../dashboard.php:457 ../dashboard.php:635
154
  msgid "Date"
155
  msgstr ""
156
 
157
+ #: ../dashboard.php:457 ../dashboard.php:636
158
  msgid "Event"
159
  msgstr ""
160
 
161
+ #: ../dashboard.php:457 ../dashboard.php:637
162
  msgid "Local User"
163
  msgstr ""
164
 
165
+ #: ../dashboard.php:457
166
  msgid "User login"
167
  msgstr ""
168
 
169
+ #: ../dashboard.php:457
170
  msgid "User ID"
171
  msgstr ""
172
 
173
+ #: ../dashboard.php:457 ../dashboard.php:638 ../wp-cerber.php:3435
174
  msgid "Username used"
175
  msgstr ""
176
 
177
+ #: ../dashboard.php:595 ../dashboard.php:817 ../common.php:523
178
  msgid "Locked out"
179
  msgstr ""
180
 
181
+ #: ../dashboard.php:655
182
  msgid "Export"
183
  msgstr ""
184
 
185
+ #: ../dashboard.php:659
186
  msgid "No activity has been logged."
187
  msgstr ""
188
 
189
+ #: ../dashboard.php:665
190
  msgid "All events"
191
  msgstr ""
192
 
193
+ #: ../dashboard.php:674
194
  msgid "Search for IP or username"
195
  msgstr ""
196
 
197
+ #: ../dashboard.php:674
198
  msgid "Filter"
199
  msgstr ""
200
 
201
+ #: ../dashboard.php:840
202
  msgid "Abuse email:"
203
  msgstr ""
204
 
205
+ #: ../dashboard.php:844
206
  msgid "Network:"
207
  msgstr ""
208
 
209
+ #: ../dashboard.php:858
210
  msgid "Add network to the Black List"
211
  msgstr ""
212
 
213
+ #: ../dashboard.php:862
214
  msgid "Add IP to the Black List"
215
  msgstr ""
216
 
217
+ #: ../dashboard.php:893 ../settings.php:228
218
  msgid "WP Cerber Security"
219
  msgstr ""
220
 
221
  #. Name of the plugin
222
+ #: ../dashboard.php:893 ../dashboard.php:912
223
  msgid "WP Cerber"
224
  msgstr ""
225
 
226
+ #: ../dashboard.php:895
227
  msgid "Cerber Dashboard"
228
  msgstr ""
229
 
230
+ #: ../dashboard.php:895 ../dashboard.php:1118 ../dashboard.php:1637 ../settings.
231
+ #: php:233
232
  msgid "Dashboard"
233
  msgstr ""
234
 
235
+ #: ../dashboard.php:898
236
  msgid "Cerber Security Rules"
237
  msgstr ""
238
 
239
+ #: ../dashboard.php:898 ../dashboard.php:1978
240
  msgid "Security Rules"
241
  msgstr ""
242
 
243
+ #: ../dashboard.php:901
244
  msgid "Cerber antispam settings"
245
  msgstr ""
246
 
247
+ #: ../dashboard.php:901 ../wp-cerber.php:3575 ../settings.php:152
248
  msgid "Antispam"
249
  msgstr ""
250
 
251
+ #: ../dashboard.php:902
252
  msgid "Cerber tools"
253
  msgstr ""
254
 
255
+ #: ../dashboard.php:902 ../cerber-tools.php:43
256
  msgid "Tools"
257
  msgstr ""
258
 
259
+ #: ../dashboard.php:974
260
  msgid "Comments"
261
  msgstr ""
262
 
263
+ #: ../dashboard.php:975
264
  msgid "Last login"
265
  msgstr ""
266
 
267
+ #: ../dashboard.php:976
268
  msgid "Failed login attempts"
269
  msgstr ""
270
 
271
+ #: ../dashboard.php:977
272
  msgid "Registered"
273
  msgstr ""
274
 
275
+ #: ../dashboard.php:1008 ../dashboard.php:1093
276
  msgid "Never"
277
  msgstr ""
278
 
279
+ #: ../dashboard.php:1044
280
  msgid "You"
281
  msgstr ""
282
 
283
+ #: ../dashboard.php:1062
284
  msgid "Cerber Quick View"
285
  msgstr ""
286
 
287
+ #: ../dashboard.php:1097
288
  msgid "active"
289
  msgstr ""
290
 
291
+ #: ../dashboard.php:1097
292
  msgid "deactivate"
293
  msgstr ""
294
 
295
+ #: ../dashboard.php:1099
296
  msgid "not active"
297
  msgstr ""
298
 
299
+ #: ../dashboard.php:1100
300
  msgid "disabled"
301
  msgstr ""
302
 
303
+ #: ../dashboard.php:1105
304
  msgid "failed attempts"
305
  msgstr ""
306
 
307
+ #: ../dashboard.php:1105 ../dashboard.php:1106
308
  msgid "in 24 hours"
309
  msgstr ""
310
 
311
+ #: ../dashboard.php:1105 ../dashboard.php:1106
312
  msgid "view all"
313
  msgstr ""
314
 
315
+ #: ../dashboard.php:1106
316
  msgid "lockouts"
317
  msgstr ""
318
 
319
+ #: ../dashboard.php:1108
320
  msgid "Lockouts at the moment"
321
  msgstr ""
322
 
323
+ #: ../dashboard.php:1109
324
  msgid "Last lockout"
325
  msgstr ""
326
 
327
+ #: ../dashboard.php:1110 ../dashboard.php:1111 ../dashboard.php:1617
328
  msgid "entry"
329
  msgid_plural "entries"
330
  msgstr[0] ""
331
  msgstr[1] ""
332
 
333
+ #: ../dashboard.php:1112 ../settings.php:76
334
  msgid "Citadel mode"
335
  msgstr ""
336
 
337
+ #: ../dashboard.php:1114 ../settings.php:166
338
  msgid "Push notifications"
339
  msgstr ""
340
 
341
+ #: ../dashboard.php:1119 ../dashboard.php:1315 ../wp-cerber.php:3418 ../settings.
342
+ #: php:82 ../settings.php:235
343
  msgid "Activity"
344
  msgstr ""
345
 
346
+ #: ../dashboard.php:1120 ../settings.php:239
347
  msgid "Lockouts"
348
  msgstr ""
349
 
350
+ #: ../dashboard.php:1121 ../wp-cerber.php:3574 ../settings.php:244 ../cerber-
351
+ #: tools.php:88 ../cerber-tools.php:97 ../cerber-tools.php:171
352
  msgid "Access Lists"
353
  msgstr ""
354
 
355
+ #: ../dashboard.php:1167 ../settings.php:63
356
  msgid "My site is behind a reverse proxy"
357
  msgstr ""
358
 
359
+ #: ../dashboard.php:1295
360
+ msgid "in the last 24 hours"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  msgstr ""
362
 
363
+ #: ../dashboard.php:1301 ../dashboard.php:1330
364
  msgid "View all"
365
  msgstr ""
366
 
367
+ #: ../dashboard.php:1309 ../common.php:478
368
  msgid "User registered"
369
  msgstr ""
370
 
371
+ #: ../dashboard.php:1310
372
  msgid "All suspicious activity"
373
  msgstr ""
374
 
375
+ #: ../dashboard.php:1331
376
  msgid "Recently locked out IP addresses"
377
  msgstr ""
378
 
379
+ #: ../dashboard.php:1354
380
  msgid "Confused about some settings?"
381
  msgstr ""
382
 
383
+ #: ../dashboard.php:1355
384
  msgid "You can easily load default recommended settings using button below"
385
  msgstr ""
386
 
387
+ #: ../dashboard.php:1357
388
  msgid "Load default settings"
389
  msgstr ""
390
 
391
+ #: ../dashboard.php:1359
392
  msgid "Are you sure?"
393
  msgstr ""
394
 
395
+ #: ../dashboard.php:1365
396
  msgid "doesn't affect Custom login URL and Access Lists"
397
  msgstr ""
398
 
399
+ #: ../dashboard.php:1366 ../wp-cerber.php:3013 ../wp-cerber.php:3568
400
  msgid "Getting Started Guide"
401
  msgstr ""
402
 
403
+ #: ../dashboard.php:1455
404
  msgid "Attention! Citadel mode is now active. Nobody is able to log in."
405
  msgstr ""
406
 
407
+ #: ../dashboard.php:1456
408
  msgid "Deactivate"
409
  msgstr ""
410
 
411
+ #: ../dashboard.php:1457
412
  msgid "View Activity"
413
  msgstr ""
414
 
415
+ #: ../dashboard.php:1550
 
 
 
 
 
 
 
 
 
416
  msgid "Subscribe"
417
  msgstr ""
418
 
419
+ #: ../dashboard.php:1551 ../cerber-tools.php:236
420
  msgid "Unsubscribe"
421
  msgstr ""
422
 
423
+ #: ../dashboard.php:1579
424
  msgid "You've subscribed"
425
  msgstr ""
426
 
427
+ #: ../dashboard.php:1582
428
  msgid "You've unsubscribed"
429
  msgstr ""
430
 
431
+ #: ../dashboard.php:1638
432
+ msgid "Main settings"
433
+ msgstr ""
434
+
435
+ #: ../dashboard.php:1983
436
  msgid "Countries"
437
  msgstr ""
438
 
439
+ #: ../dashboard.php:2048
440
  #, php-format
441
  msgid "Permitted for one country"
442
  msgid_plural "Permitted for %d countries"
443
  msgstr[0] ""
444
  msgstr[1] ""
445
 
446
+ #: ../dashboard.php:2051
447
  #, php-format
448
  msgid "Blocked for one country"
449
  msgid_plural "Blocked for %d countries"
450
  msgstr[0] ""
451
  msgstr[1] ""
452
 
453
+ #: ../dashboard.php:2059
454
  msgid "No rule"
455
  msgstr ""
456
 
457
+ #: ../dashboard.php:2115
458
  msgid "Start typing here to find a country"
459
  msgstr ""
460
 
461
+ #: ../dashboard.php:2196
462
  msgid "Click on a country name to add it to the list of selected countries"
463
  msgstr ""
464
 
465
+ #: ../dashboard.php:2200
466
  #, php-format
467
  msgid "Selected countries are allowed to %s other countries are not allowed"
468
  msgstr ""
469
 
470
+ #: ../dashboard.php:2203
471
  #, php-format
472
  msgid "Selected countries are not allowed to %s other countries are allowed"
473
  msgstr ""
474
 
475
+ #: ../dashboard.php:2215
476
  msgid "Submit forms"
477
  msgstr ""
478
 
479
+ #: ../dashboard.php:2216
480
  msgid "Post comments"
481
  msgstr ""
482
 
483
+ #: ../dashboard.php:2217
484
  msgid "Log in to the website"
485
  msgstr ""
486
 
487
+ #: ../dashboard.php:2218
488
  msgid "Register on the website"
489
  msgstr ""
490
 
491
+ #: ../dashboard.php:2219
492
  msgid "Use XML-RPC"
493
  msgstr ""
494
 
495
+ #: ../dashboard.php:2220
496
  msgid "Use REST API"
497
  msgstr ""
498
 
499
+ #: ../dashboard.php:2260
500
  msgid "Security rules have been updated"
501
  msgstr ""
502
 
537
  msgstr[1] ""
538
 
539
  #: ../wp-cerber.php:565 ../wp-cerber.php:577 ../wp-cerber.php:584 ../wp-cerber.
540
+ #: php:773 ../wp-cerber.php:988 ../wp-cerber.php:994 ../wp-cerber.php:999 ../wp-
541
+ #: cerber.php:1004 ../wp-cerber.php:1010 ../wp-cerber.php:1017 ../wp-cerber.php:
542
+ #: 1118 ../wp-cerber.php:1255 ../common.php:171 ../common.php:224 ../common.php:
543
+ #: 228 ../settings.php:695
544
  msgid "ERROR:"
545
  msgstr ""
546
 
550
  "block below."
551
  msgstr ""
552
 
553
+ #: ../wp-cerber.php:653
554
+ msgid ""
555
+ "> > > Translator of WP Cerber? To get the PRO license for free, drop your "
556
+ "contacts here: https://wpcerber.com/contact/"
557
+ msgstr ""
558
+
559
+ #: ../wp-cerber.php:784
560
  #, php-format
561
  msgid ""
562
  "<strong>ERROR</strong>: The password you entered for the username %s is "
563
  "incorrect."
564
  msgstr ""
565
 
566
+ #: ../wp-cerber.php:989 ../wp-cerber.php:995 ../wp-cerber.php:1011 ../wp-cerber.
567
+ #: php:1018
568
  msgid "You are not allowed to register."
569
  msgstr ""
570
 
571
+ #: ../wp-cerber.php:1005
572
  msgid "Username is not allowed. Please choose another one."
573
  msgstr ""
574
 
575
+ #: ../wp-cerber.php:1255
576
  msgid "Sorry, human verification failed."
577
  msgstr ""
578
 
579
+ #: ../wp-cerber.php:2923
580
  msgid "WP Cerber notify"
581
  msgstr ""
582
 
583
+ #: ../wp-cerber.php:2945
584
  msgid "Citadel mode is activated"
585
  msgstr ""
586
 
587
+ #: ../wp-cerber.php:2947
588
  #, php-format
589
  msgid "Citadel mode is activated after %d failed login attempts in %d minutes."
590
  msgstr ""
591
 
592
+ #: ../wp-cerber.php:2948
593
  #, php-format
594
  msgid "Last failed attempt was at %s from IP %s with user login: %s."
595
  msgstr ""
596
 
597
+ #: ../wp-cerber.php:2949 ../wp-cerber.php:3459
598
  msgid "View activity in dashboard"
599
  msgstr ""
600
 
601
+ #: ../wp-cerber.php:2974
602
  msgid "unspecified"
603
  msgstr ""
604
 
605
+ #: ../wp-cerber.php:2977
606
  msgid "Number of lockouts is increasing"
607
  msgstr ""
608
 
609
+ #: ../wp-cerber.php:2979
610
  msgid "Number of active lockouts"
611
  msgstr ""
612
 
613
+ #: ../wp-cerber.php:2980
614
  #, php-format
615
  msgid "Last lockout was added: %s for IP %s"
616
  msgstr ""
617
 
618
+ #: ../wp-cerber.php:2982
619
  msgid "View activity for this IP"
620
  msgstr ""
621
 
622
+ #: ../wp-cerber.php:2983
623
  msgid "View lockouts in dashboard"
624
  msgstr ""
625
 
626
+ #: ../wp-cerber.php:2986 ../wp-cerber.php:2988
627
  msgid "A new version of WP Cerber is available to install"
628
  msgstr ""
629
 
630
+ #: ../wp-cerber.php:2987
631
  msgid "Hi!"
632
  msgstr ""
633
 
634
+ #: ../wp-cerber.php:2990 ../wp-cerber.php:3001
635
  msgid "Website"
636
  msgstr ""
637
 
638
+ #: ../wp-cerber.php:2993 ../wp-cerber.php:2994
639
  msgid "The WP Cerber security plugin has been deactivated"
640
  msgstr ""
641
 
642
+ #: ../wp-cerber.php:2996
643
  msgid "Not logged in"
644
  msgstr ""
645
 
646
+ #: ../wp-cerber.php:3002
647
  msgid "By user"
648
  msgstr ""
649
 
650
+ #: ../wp-cerber.php:3003
651
  msgid "From IP address"
652
  msgstr ""
653
 
654
+ #: ../wp-cerber.php:3006
655
  msgid "From country"
656
  msgstr ""
657
 
658
+ #: ../wp-cerber.php:3010
659
  msgid "The WP Cerber security plugin is now active"
660
  msgstr ""
661
 
662
+ #: ../wp-cerber.php:3011 ../wp-cerber.php:3565
663
  msgid "WP Cerber is now active and has started protecting your site"
664
  msgstr ""
665
 
666
+ #: ../wp-cerber.php:3019
667
  msgid "New Custom login URL"
668
  msgstr ""
669
 
670
+ #: ../wp-cerber.php:3023 ../wp-cerber.php:3024
671
  msgid "A new activity has been recorded"
672
  msgstr ""
673
 
674
+ #: ../wp-cerber.php:3029 ../wp-cerber.php:3136
675
+ msgid "Weekly report"
676
+ msgstr ""
677
+
678
+ #: ../wp-cerber.php:3032
679
+ msgid "To change reporting settings visit"
680
+ msgstr ""
681
+
682
+ #: ../wp-cerber.php:3055
683
+ msgid "Your login page:"
684
+ msgstr ""
685
+
686
+ #: ../wp-cerber.php:3059
687
+ msgid "Your license is valid until"
688
+ msgstr ""
689
+
690
+ #: ../wp-cerber.php:3062
691
  msgid "This message was sent by"
692
  msgstr ""
693
 
694
+ #: ../wp-cerber.php:3148
695
+ msgid "Activity details"
696
+ msgstr ""
697
+
698
+ #: ../wp-cerber.php:3431
699
  msgid "User"
700
  msgstr ""
701
 
702
+ #: ../wp-cerber.php:3439
703
  msgid "Search string"
704
  msgstr ""
705
 
706
+ #: ../wp-cerber.php:3460
707
  msgid "To unsubscribe click here"
708
  msgstr ""
709
 
710
+ #: ../wp-cerber.php:3540
711
  #, php-format
712
  msgid "The WP Cerber requires PHP %s or higher. You are running"
713
  msgstr ""
714
 
715
+ #: ../wp-cerber.php:3544
716
  #, php-format
717
  msgid "The WP Cerber requires WordPress %s or higher. You are running"
718
  msgstr ""
719
 
720
+ #: ../wp-cerber.php:3549
721
  msgid "Can't activate WP Cerber due to a database error."
722
  msgstr ""
723
 
724
+ #: ../wp-cerber.php:3566
725
  msgid "Your IP address is added to the"
726
  msgstr ""
727
 
728
+ #: ../wp-cerber.php:3573 ../settings.php:241
729
  msgid "Main Settings"
730
  msgstr ""
731
 
732
+ #: ../wp-cerber.php:3576 ../settings.php:246
733
  msgid "Hardening"
734
  msgstr ""
735
 
736
+ #: ../wp-cerber.php:3577 ../settings.php:62 ../settings.php:80 ../settings.php:251
737
  msgid "Notifications"
738
  msgstr ""
739
 
740
+ #: ../wp-cerber.php:3578
741
  msgid "Import settings"
742
  msgstr ""
743
 
744
+ #: ../common.php:113
745
+ msgid "Malicious activities mitigated"
746
+ msgstr ""
747
+
748
+ #: ../common.php:116
749
+ msgid "Spam comments denied"
750
+ msgstr ""
751
+
752
+ #: ../common.php:117
753
+ msgid "Spam form submissions denied"
754
+ msgstr ""
755
+
756
+ #: ../common.php:118
757
+ msgid "Malicious IP addresses detected"
758
+ msgstr ""
759
+
760
+ #: ../common.php:119
761
+ msgid "Lockouts occurred"
762
  msgstr ""
763
 
764
+ #: ../common.php:477
765
  msgid "User created"
766
  msgstr ""
767
 
768
+ #: ../common.php:479
769
  msgid "Logged in"
770
  msgstr ""
771
 
772
+ #: ../common.php:480
773
  msgid "Logged out"
774
  msgstr ""
775
 
776
+ #: ../common.php:481
777
  msgid "Login failed"
778
  msgstr ""
779
 
780
+ #: ../common.php:484
781
  msgid "IP blocked"
782
  msgstr ""
783
 
784
+ #: ../common.php:485
785
  msgid "Subnet blocked"
786
  msgstr ""
787
 
788
+ #: ../common.php:487
789
  msgid "Citadel activated!"
790
  msgstr ""
791
 
792
+ #: ../common.php:488
793
  msgid "Spam comment denied"
794
  msgstr ""
795
 
796
+ #: ../common.php:489
797
  msgid "Spam form submission denied"
798
  msgstr ""
799
 
800
+ #: ../common.php:490
801
  msgid "Form submission denied"
802
  msgstr ""
803
 
804
+ #: ../common.php:491
805
  msgid "Comment denied"
806
  msgstr ""
807
 
808
+ #: ../common.php:502
809
  msgid "Password changed"
810
  msgstr ""
811
 
812
+ #: ../common.php:503
813
  msgid "Password reset requested"
814
  msgstr ""
815
 
816
+ #: ../common.php:505
817
  msgid "reCAPTCHA verification failed"
818
  msgstr ""
819
 
820
+ #: ../common.php:506
821
  msgid "reCAPTCHA settings are incorrect"
822
  msgstr ""
823
 
824
+ #: ../common.php:507
825
  msgid "Request to the Google reCAPTCHA service failed"
826
  msgstr ""
827
 
828
+ #: ../common.php:509
829
  msgid "Attempt to access prohibited URL"
830
  msgstr ""
831
 
832
+ #: ../common.php:510 ../common.php:555
833
  msgid "Attempt to log in with non-existent username"
834
  msgstr ""
835
 
836
+ #: ../common.php:511 ../common.php:556
837
  msgid "Attempt to log in with prohibited username"
838
  msgstr ""
839
 
840
+ #: ../common.php:513
841
  msgid "Attempt to log in denied"
842
  msgstr ""
843
 
844
+ #: ../common.php:514
845
  msgid "Attempt to register denied"
846
  msgstr ""
847
 
848
+ #: ../common.php:516
849
  msgid "Request to REST API denied"
850
  msgstr ""
851
 
852
+ #: ../common.php:517
853
  msgid "XML-RPC request denied"
854
  msgstr ""
855
 
856
+ #: ../common.php:521
857
  msgid "Bot detected"
858
  msgstr ""
859
 
860
+ #: ../common.php:522
861
  msgid "Citadel mode is active"
862
  msgstr ""
863
 
864
+ #: ../common.php:524
865
  msgid "IP blacklisted"
866
  msgstr ""
867
 
868
+ #: ../common.php:527
869
  msgid "Malicious activity detected"
870
  msgstr ""
871
 
872
+ #: ../common.php:528
873
  msgid "Blocked by country rule"
874
  msgstr ""
875
 
876
+ #: ../common.php:529
877
  msgid "Limit reached"
878
  msgstr ""
879
 
880
+ #: ../common.php:530
881
  msgid "Multiple suspicious activities"
882
  msgstr ""
883
 
884
+ #: ../common.php:553
885
  msgid "Limit on login attempts is reached"
886
  msgstr ""
887
 
888
+ #: ../common.php:554
889
  msgid "Attempt to access"
890
  msgstr ""
891
 
892
+ #: ../common.php:557
893
  msgid "Limit on failed reCAPTCHA verifications is reached"
894
  msgstr ""
895
 
896
+ #: ../common.php:558
897
  msgid "Bot activity is detected"
898
  msgstr ""
899
 
900
+ #: ../common.php:559
901
  msgid "Multiple suspicious activities were detected"
902
  msgstr ""
903
 
904
+ #: ../common.php:602
905
  #, php-format
906
  msgid "%s ago"
907
  msgstr ""
908
 
909
+ #: ../common.php:736
910
+ msgid "New version is available"
911
+ msgstr ""
912
+
913
+ #: ../common.php:743
914
+ #, php-format
915
+ msgid "Update to version %s of WP Cerber"
916
+ msgstr ""
917
+
918
+ #: ../cerber-lab.php:656
919
  msgid "Want to make WP Cerber even more powerful?"
920
  msgstr ""
921
 
922
+ #: ../cerber-lab.php:657
923
  msgid ""
924
  "Allow WP Cerber to send locked out malicious IP addresses to Cerber Lab. "
925
  "This helps the plugin team to develop new algorithms for WP Cerber that will "
927
  "everyday. You can disable the sending in the plugin settings at any time."
928
  msgstr ""
929
 
930
+ #: ../cerber-lab.php:658
931
  msgid "OK, nail them all"
932
  msgstr ""
933
 
934
+ #: ../cerber-lab.php:659
935
  msgid "NO, maybe later"
936
  msgstr ""
937
 
938
+ #: ../cerber-lab.php:660 ../settings.php:209
939
  msgid "Know more"
940
  msgstr ""
941
 
1041
  msgid "Send notification to admin email"
1042
  msgstr ""
1043
 
1044
+ #: ../settings.php:80 ../settings.php:385 ../settings.php:511
1045
  msgid "Click to send test"
1046
  msgstr ""
1047
 
1369
  msgid "Not available"
1370
  msgstr ""
1371
 
1372
+ #: ../settings.php:181
1373
+ msgid "Weekly reports"
1374
  msgstr ""
1375
 
1376
  #: ../settings.php:191
1377
+ msgid "Make your protection smarter!"
1378
+ msgstr ""
1379
+
1380
+ #: ../settings.php:195
1381
  msgid ""
1382
  "Please enable Permalinks to use this feature. Set Permalink Settings to "
1383
  "something other than Default."
1384
  msgstr ""
1385
 
1386
+ #: ../settings.php:198
1387
  msgid ""
1388
  "Be careful when enabling this options. If you forget the custom login URL "
1389
  "you will not be able to login."
1390
  msgstr ""
1391
 
1392
+ #: ../settings.php:202
1393
  msgid ""
1394
  "In the Citadel mode nobody is able to log in except IPs from the White IP "
1395
  "Access List. Active user sessions will not be affected."
1396
  msgstr ""
1397
 
1398
+ #: ../settings.php:205
1399
  msgid "These settings do not affect hosts from the "
1400
  msgstr ""
1401
 
1402
+ #: ../settings.php:208
1403
  msgid ""
1404
  "Before you can start using reCAPTCHA, you have to obtain Site key and Secret "
1405
  "key on the Google website"
1406
  msgstr ""
1407
 
1408
+ #: ../settings.php:248
1409
  msgid "Users"
1410
  msgstr ""
1411
 
1412
+ #: ../settings.php:253
1413
  msgid "Help"
1414
  msgstr ""
1415
 
1416
+ #: ../settings.php:366 ../settings.php:492
1417
  #, php-format
1418
  msgid "%s allowed retries in %s minutes"
1419
  msgstr ""
1420
 
1421
+ #: ../settings.php:371 ../settings.php:497
1422
  #, php-format
1423
  msgid "%s allowed registrations in %s minutes from one IP"
1424
  msgstr ""
1425
 
1426
+ #: ../settings.php:376 ../settings.php:502
1427
  #, php-format
1428
  msgid "Increase lockout duration to %s hours after %s lockouts in the last %s hours"
1429
  msgstr ""
1430
 
1431
+ #: ../settings.php:383 ../settings.php:509
1432
  msgid "Notify admin if the number of active lockouts above"
1433
  msgstr ""
1434
 
1435
+ #: ../settings.php:388 ../settings.php:514
1436
  #, php-format
1437
  msgid "Enable after %s failed login attempts in last %s minutes"
1438
  msgstr ""
1439
 
1440
+ #: ../settings.php:588
1441
+ msgid "Sunday"
1442
+ msgstr ""
1443
+
1444
+ #: ../settings.php:589
1445
+ msgid "Monday"
1446
+ msgstr ""
1447
+
1448
+ #: ../settings.php:590
1449
+ msgid "Tuesday"
1450
+ msgstr ""
1451
+
1452
+ #: ../settings.php:591
1453
+ msgid "Wednesday"
1454
+ msgstr ""
1455
+
1456
+ #: ../settings.php:592
1457
+ msgid "Thursday"
1458
+ msgstr ""
1459
+
1460
+ #: ../settings.php:593
1461
+ msgid "Friday"
1462
+ msgstr ""
1463
+
1464
+ #: ../settings.php:594
1465
+ msgid "Saturday"
1466
+ msgstr ""
1467
+
1468
+ #. translators: preposition of time
1469
+ #: ../settings.php:604
1470
+ msgctxt "preposition of time"
1471
+ msgid "at"
1472
+ msgstr ""
1473
+
1474
+ #: ../settings.php:620
1475
+ msgid "Click to send now"
1476
+ msgstr ""
1477
+
1478
+ #: ../settings.php:645 ../settings.php:646
1479
  msgid "Attention! You have changed the login URL! The new login URL is"
1480
  msgstr ""
1481
 
1482
+ #: ../settings.php:647 ../settings.php:648
1483
  msgid ""
1484
  "If you use a caching plugin, you have to add your new login URL to the list "
1485
+ "of pages not to cache."
1486
  msgstr ""
1487
 
1488
+ #: ../settings.php:722
1489
  msgid "<strong>ERROR</strong>: please enter a valid email address."
1490
  msgstr ""
1491
 
1566
  msgid "Error while parsing file"
1567
  msgstr ""
1568
 
1569
+ #: ../cerber-tools.php:306
1570
  msgid "Antispam and bot detection settings"
1571
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: security, login, custom login, protect, antispam, woocommerce, recaptcha,
5
  Requires at least: 4.4
6
  Requires PHP: 5.3
7
  Tested up to: 4.9
8
- Stable tag: 5.7
9
  License: GPLv2
10
 
11
  Protection against hacker attacks and bots. Restrict access with IP access lists, track user and bot activity. reCAPTCHA. Limit login attempts.
@@ -22,8 +22,8 @@ Hardening WordPress with a set of security settings.
22
 
23
  * Limit login attempts when logging in by IP address or entire subnet.
24
  * Monitors logins made by login forms, XML-RPC requests or auth cookies.
25
- * Permit or restrict access by [White IP Access list and Black IP Access List](http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/) with a single IP, IP range or subnet.
26
- * Create **Custom login URL** ([rename wp-login.php](http://wpcerber.com/how-to-rename-wp-login-php/)).
27
  * Cerber antispam engine for protecting any contact form. Automatically detects and moves spam comments to trash or deny it completely.
28
  * Log user, bot and hacker activities.
29
  * Cool notifications with powerful filters for activities.
@@ -38,14 +38,15 @@ Hardening WordPress with a set of security settings.
38
  * **Stop user enumeration** (block access to pages like /?author=n and user REST API)
39
  * Proactively **block IP subnet class C** for intruder's IP.
40
  * Antispam: **reCAPTCHA** to protect WordPress login, register and comment forms.
41
- * [reCAPTCHA for WooCommerce & WordPress forms](http://wpcerber.com/how-to-setup-recaptcha/).
42
  * Invisible reCAPTCHA for WordPress comments forms
43
  * Citadel mode for **massive brute force attack**.
44
- * [Play nice with **fail2ban**](http://wpcerber.com/how-to-protect-wordpress-with-fail2ban/): write failed attempts to the syslog or a custom log file.
45
  * Filter out and inspect activities by IP address, user, username or a particular activity.
46
  * Filter out activities and export them to a CSV file.
 
47
  * Limit login attempts works on a site/server behind a reverse proxy.
48
- * [Get notifications by email or via mobile push notifications](http://wpcerber.com/wordpress-notifications-made-easy/).
49
  * Trigger and action for the [jetFlow.io automation plugin](http://jetflow.io).
50
 
51
  = Limit login attempts done right =
@@ -89,12 +90,12 @@ It’s compatible with virtually any form you have. Tested with Caldera Forms, G
89
 
90
  **Documentation & Tutorials**
91
 
92
- * [How to set up notifications](http://wpcerber.com/wordpress-notifications-made-easy/)
93
- * [Push notifications with Pushbullet](http://wpcerber.com/wordpress-mobile-and-browser-notifications-pushbullet/)
94
- * [How to set up invisible reCAPTCHA for WooCommerce](http://wpcerber.com/how-to-setup-recaptcha/)
95
- * [Changing default plugin messages](http://wpcerber.com/wordpress-hooks/)
96
- * [Best alternatives to the Clef plugin](http://wpcerber.com/two-factor-authentication-plugins-for-wordpress/)
97
- * [Why reCAPTCHA does not protect WordPress from bots and brute-force attacks](http://wpcerber.com/why-recaptcha-does-not-protect-wordpress/)
98
 
99
  **Translations**
100
 
@@ -135,14 +136,14 @@ Installing the WP Cerber Security & Antispam plugin is the same as other WordPre
135
  2. Activate the WP Cerber through the Plugins > Installed Plugins menu in the WordPress admin dashboard.
136
  3. The plugin is now active and has started protecting your WordPress with default settings.
137
  4. Make sure, that you've got a notification letter to your site admin email.
138
- 5. Read carefully: [Getting Started Guide](http://wpcerber.com/getting-started/)
139
 
140
  **Important notes**
141
 
142
- 1. Before enabling invisible reCAPTCHA, you must get separate keys for the invisible version. [How to enable reCAPTCHA](http://wpcerber.com/how-to-setup-recaptcha/).
143
  2. If you want to test out plugin's features, do this on another computer (or incognito browser window) and remove computer IP address or network from the White Access List. Cerber is smart enough to recognize "the boss".
144
  3. If you've set up the Custom login URL and you use some caching plugin like **W3 Total Cache** or **WP Super Cache**, you have to add a new Custom login URL to the list of pages not to cache.
145
- 4. [Read this if your website is under CloudFlare](http://wpcerber.com/cloudflare-and-wordpress-cerber/)
146
  5. If you use the Jetpack plugin or another plugin that needs to connect to wordpress.com, you need to unlock XML-RPC. To do that go to the Hardening tab, uncheck Disable XML-RPC, and click the Save changes button.
147
 
148
  The following steps are optional but they allow you to reinforce the protection of your WordPress.
@@ -160,7 +161,7 @@ The following steps are optional but they allow you to reinforce the protection
160
 
161
  = Can I use the plugin with CloudFlare? =
162
 
163
- Yes. [WP Cerber settings for CloudFlare](http://wpcerber.com/cloudflare-and-wordpress-cerber/).
164
 
165
  = Is this plugin compatible with WordPress multisite mode? =
166
 
@@ -168,7 +169,7 @@ Yes. All settings apply to all sites in the network simultaneously. You have to
168
 
169
  = Is WP Cerber compatible with bbPress? =
170
 
171
- Yes. [Compatibility notes](http://wpcerber.com/compatibility/).
172
 
173
  = Is this plugin compatible with WooCommerce? =
174
 
@@ -176,15 +177,15 @@ Completely.
176
 
177
  = Is reCAPTCHA for WooCommerce free feature? =
178
 
179
- Yes. [How to set up reCAPTCHA for WooCommerce](http://wpcerber.com/how-to-setup-recaptcha/).
180
 
181
  = Can I change login URL (rename wp-login.php)? =
182
 
183
- Yes, easily. [How to rename wp-login.php](http://wpcerber.com/how-to-rename-wp-login-php/)
184
 
185
  = Can I hide wp-admin? =
186
 
187
- Yes, easily. [How to hide wp-admin and wp-login.php from possible attacks](http://wpcerber.com/how-to-hide-wp-admin-and-wp-login-php-from-possible-attacks/)
188
 
189
  = Can I rename wp-admin folder? =
190
 
@@ -212,7 +213,7 @@ Set Threshold fields to 0 or leave them empty.
212
 
213
  = What is the goal of using Fail2Ban? =
214
 
215
- With Fail2Ban you can protect site on the OS level with iptables firewall. See details here: [http://wpcerber.com/how-to-protect-wordpress-with-fail2ban/](http://wpcerber.com/how-to-protect-wordpress-with-fail2ban/)
216
 
217
  = Do I need using Fail2Ban to get the plugin working? =
218
 
@@ -235,7 +236,7 @@ There is a special version of the plugin called **WP Cerber Reset**. This versio
235
 
236
  To get access to your dashboard you need to copy the WP Cerber Reset folder to the plugins folder. Follow these simple steps.
237
 
238
- 1. Download the wp-cerber-reset.zip archive to your computer using this link: [http://wpcerber.com/downloads/wp-cerber-reset.zip](http://wpcerber.com/downloads/wp-cerber-reset.zip)
239
  2. Unpack wp-cerber folder from the archive.
240
  3. Upload the wp-cerber folder to the **plugins** folder of your site using any FTP client or a file manager from your hosting control panel. If you see a question about overwriting files, click Yes.
241
  4. Log in to your site as usually. Now WP Cerber is disabled completely.
@@ -259,6 +260,14 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
259
 
260
  == Changelog ==
261
 
 
 
 
 
 
 
 
 
262
  = 5.7 =
263
  * New: Limit access to WordPress REST API for logged in users only.
264
  * New: For new users the plugin records the date of registration, the IP address and a user who has added a new user.
@@ -266,13 +275,13 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
266
  * New: User registration monitoring and activity logging functions has been improved.
267
  * Translations has been updated, thanks to Jon Knippen, Wojciech Górski and Francesco.
268
  * Bug fixed: Stop user enumeration via REST API doesn’t work on a multisite WordPress installation.
269
- * [Read more](http://wpcerber.com/wp-cerber-security-5-7/)
270
 
271
  = 5.5 =
272
  * New: White list for the WordPress anti-spam engine.
273
  * New: White list for REST API requests.
274
  * New: Disable access to user data via REST API and stop REST API user enumeration.
275
- * [Read more](http://wpcerber.com/wp-cerber-security-5-5/)
276
 
277
  = 5.2 =
278
  * Bug fixed: Hidden custom login URL may be discovered by using specially formatted URL.
@@ -339,8 +348,8 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
339
  * Fixed bug: The plugin tries to validate reCAPTCHA on WooCommerce login form if the validation enabled for the default WordPress login form only.
340
 
341
  = 4.0 =
342
- * New: reCAPTCHA for WooCommerce forms. [How to set up reCAPTCHA](http://wpcerber.com/how-to-setup-recaptcha/).
343
- * New: IP Access Lists has got support for IP networks in three forms: ability to restrict access with IPv4 ranges, IPv4 CIDR notation and IPv4 subnets: A,B,C has been added. [Access Lists for WordPress](http://wpcerber.com/using-ip-access-lists-to-protect-wordpress/).
344
  * New: Cerber can automatically detect an IP network of an intruder and suggest you to block entire network right from the Activity screen.
345
  * New: Norwegian translation added, thanks to [Eirik Vorland](https://www.facebook.com/KjellDaSensei).
346
  * Update: WP REST API is controlled by Access Lists. While REST API is blocked for the rest of the world, IP addresses from the White Access List can use WP REST API.
@@ -353,7 +362,7 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
353
  * Fixed issue: In some cases the plugin log first digits of an IP address as an ID of existing user.
354
 
355
  = 3.0 =
356
- * New: [reCAPTCHA to protect WordPress forms spam registrations. Also available for lost password and login forms.](http://wpcerber.com/how-to-setup-recaptcha/)
357
  * New: Registration, XML RCP, WP REST API are controlled by IP Access Lists now. If a particular IP address is locked out or blacklisted registration is impossible.
358
  * New: Action Get WHOIS info and trigger IP locked out to create automation scenarios with the [jetFlow.io automation plugin](http://jetflow.io).
359
  * New: Notification emails will contain Reason of a lockout.
@@ -382,7 +391,7 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
382
  = 2.7 =
383
 
384
  * New: Now you can view extra WHOIS information for IP addresses in the activity log including country, network info, abuse contact, etc.
385
- * New: Added ability to disable WP REST API, see [Hardening WordPress](http://wpcerber.com/hardening-wordpress/)
386
  * New: Added ability to add IP address to the Black List from the Activity tab. Nail it!
387
  * New: Added Spanish translation, thanks to Ismael.
388
  * New: Added ability to set numbers of displayed rows (lines) on the Activity and Lockout tabs. Click Screen Options on the top-right.
@@ -463,7 +472,7 @@ To get access to your dashboard you need to copy the WP Cerber Reset folder to t
463
 
464
  1. If you want to test out plugin's features, do this from another computer and remove that computer's network from the White Access List. Cerber is smart enough to recognize "the boss".
465
  2. If you've set up the Custom login URL and you use some caching plugin like **W3 Total Cache** or **WP Super Cache**, you have to add a new Custom login URL to the list of pages not to cache.
466
- 3. [Read this if your website is under CloudFlare](http://wpcerber.com/cloudflare-and-wordpress-cerber/)
467
 
468
  **Deutsche**
469
  Schützt vor Ort gegen Brute-Force-Attacken. Umfassende Kontrolle der Benutzeraktivität. Beschränken Sie die Anzahl der Anmeldeversuche durch die Login-Formular, XML-RPC-Anfragen oder mit Auth-Cookies. Beschränken Sie den Zugriff mit Schwarz-Weiß-Zugriffsliste Zugriffsliste. Track Benutzer und Einbruch Aktivität.
5
  Requires at least: 4.4
6
  Requires PHP: 5.3
7
  Tested up to: 4.9
8
+ Stable tag: 5.8
9
  License: GPLv2
10
 
11
  Protection against hacker attacks and bots. Restrict access with IP access lists, track user and bot activity. reCAPTCHA. Limit login attempts.
22
 
23
  * Limit login attempts when logging in by IP address or entire subnet.
24
  * Monitors logins made by login forms, XML-RPC requests or auth cookies.
25
+ * Permit or restrict access by [White IP Access list and Black IP Access List](https://wpcerber.com/using-ip-access-lists-to-protect-wordpress/) with a single IP, IP range or subnet.
26
+ * Create **Custom login URL** ([rename wp-login.php](https://wpcerber.com/how-to-rename-wp-login-php/)).
27
  * Cerber antispam engine for protecting any contact form. Automatically detects and moves spam comments to trash or deny it completely.
28
  * Log user, bot and hacker activities.
29
  * Cool notifications with powerful filters for activities.
38
  * **Stop user enumeration** (block access to pages like /?author=n and user REST API)
39
  * Proactively **block IP subnet class C** for intruder's IP.
40
  * Antispam: **reCAPTCHA** to protect WordPress login, register and comment forms.
41
+ * [reCAPTCHA for WooCommerce & WordPress forms](https://wpcerber.com/how-to-setup-recaptcha/).
42
  * Invisible reCAPTCHA for WordPress comments forms
43
  * Citadel mode for **massive brute force attack**.
44
+ * [Play nice with **fail2ban**](https://wpcerber.com/how-to-protect-wordpress-with-fail2ban/): write failed attempts to the syslog or a custom log file.
45
  * Filter out and inspect activities by IP address, user, username or a particular activity.
46
  * Filter out activities and export them to a CSV file.
47
+ * Reporting: get weekly reports to specified email addresses.
48
  * Limit login attempts works on a site/server behind a reverse proxy.
49
+ * [Get notifications by email or via mobile push notifications](https://wpcerber.com/wordpress-notifications-made-easy/).
50
  * Trigger and action for the [jetFlow.io automation plugin](http://jetflow.io).
51
 
52
  = Limit login attempts done right =
90
 
91
  **Documentation & Tutorials**
92
 
93
+ * [How to set up notifications](https://wpcerber.com/wordpress-notifications-made-easy/)
94
+ * [Push notifications with Pushbullet](https://wpcerber.com/wordpress-mobile-and-browser-notifications-pushbullet/)
95
+ * [How to set up invisible reCAPTCHA for WooCommerce](https://wpcerber.com/how-to-setup-recaptcha/)
96
+ * [Changing default plugin messages](https://wpcerber.com/wordpress-hooks/)
97
+ * [Best alternatives to the Clef plugin](https://wpcerber.com/two-factor-authentication-plugins-for-wordpress/)
98
+ * [Why reCAPTCHA does not protect WordPress from bots and brute-force attacks](https://wpcerber.com/why-recaptcha-does-not-protect-wordpress/)
99
 
100
  **Translations**
101
 
136
  2. Activate the WP Cerber through the Plugins > Installed Plugins menu in the WordPress admin dashboard.
137
  3. The plugin is now active and has started protecting your WordPress with default settings.
138
  4. Make sure, that you've got a notification letter to your site admin email.
139
+ 5. Read carefully: [Getting Started Guide](https://wpcerber.com/getting-started/)
140
 
141
  **Important notes**
142
 
143
+ 1. Before enabling invisible reCAPTCHA, you must get separate keys for the invisible version. [How to enable reCAPTCHA](https://wpcerber.com/how-to-setup-recaptcha/).
144
  2. If you want to test out plugin's features, do this on another computer (or incognito browser window) and remove computer IP address or network from the White Access List. Cerber is smart enough to recognize "the boss".
145
  3. If you've set up the Custom login URL and you use some caching plugin like **W3 Total Cache** or **WP Super Cache**, you have to add a new Custom login URL to the list of pages not to cache.
146
+ 4. [Read this if your website is under CloudFlare](https://wpcerber.com/cloudflare-and-wordpress-cerber/)
147
  5. If you use the Jetpack plugin or another plugin that needs to connect to wordpress.com, you need to unlock XML-RPC. To do that go to the Hardening tab, uncheck Disable XML-RPC, and click the Save changes button.
148
 
149
  The following steps are optional but they allow you to reinforce the protection of your WordPress.
161
 
162
  = Can I use the plugin with CloudFlare? =
163
 
164
+ Yes. [WP Cerber settings for CloudFlare](https://wpcerber.com/cloudflare-and-wordpress-cerber/).
165
 
166
  = Is this plugin compatible with WordPress multisite mode? =
167
 
169
 
170
  = Is WP Cerber compatible with bbPress? =
171
 
172
+ Yes. [Compatibility notes](https://wpcerber.com/compatibility/).
173
 
174
  = Is this plugin compatible with WooCommerce? =
175
 
177
 
178
  = Is reCAPTCHA for WooCommerce free feature? =
179
 
180
+ Yes. [How to set up reCAPTCHA for WooCommerce](https://wpcerber.com/how-to-setup-recaptcha/).
181
 
182
  = Can I change login URL (rename wp-login.php)? =
183
 
184
+ Yes, easily. [How to rename wp-login.php](https://wpcerber.com/how-to-rename-wp-login-php/)
185
 
186
  = Can I hide wp-admin? =
187
 
188
+ Yes, easily. [How to hide wp-admin and wp-login.php from possible attacks](https://wpcerber.com/how-to-hide-wp-admin-and-wp-login-php-from-possible-attacks/)
189
 
190
  = Can I rename wp-admin folder? =
191
 
213
 
214
  = What is the goal of using Fail2Ban? =
215
 
216
+ With Fail2Ban you can protect site on the OS level with iptables firewall. See details here: [https://wpcerber.com/how-to-protect-wordpress-with-fail2ban/](https://wpcerber.com/how-to-protect-wordpress-with-fail2ban/)
217
 
218
  = Do I need using Fail2Ban to get the plugin working? =
219
 
236
 
237
  To get access to your dashboard you need to copy the WP Cerber Reset folder to the plugins folder. Follow these simple steps.
238
 
239
+ 1. Download the wp-cerber-reset.zip archive to your computer using this link: [https://wpcerber.com/downloads/wp-cerber-reset.zip](https://wpcerber.com/downloads/wp-cerber-reset.zip)
240
  2. Unpack wp-cerber folder from the archive.
241
  3. Upload the wp-cerber folder to the **plugins** folder of your site using any FTP client or a file manager from your hosting control panel. If you see a question about overwriting files, click Yes.
242
  4. Log in to your site as usually. Now WP Cerber is disabled completely.
260
 
261
  == Changelog ==
262
 
263
+ = 5.8 =
264
+ * New: Now the plugin will send a brief performance report (activity for past seven days) to specified email addresses.
265
+ * Plugin admin interface pages: compatibility with screen readers has been improved.
266
+ * REST API: the deprecated rest_enabled filter is used for WordPress older than 4.7.
267
+ * Bug fixed: After updating the plugin to the 5.7 version some disabled checkboxes (and corresponding disabled settings) are set to their default, enabled states.
268
+ * Bug fixed: An IP address in the white access list may be locked out as a suspicious IP.
269
+ * [Read more](https://wpcerber.com/wp-cerber-security-5-8/)
270
+
271
  = 5.7 =
272
  * New: Limit access to WordPress REST API for logged in users only.
273
  * New: For new users the plugin records the date of registration, the IP address and a user who has added a new user.
275
  * New: User registration monitoring and activity logging functions has been improved.
276
  * Translations has been updated, thanks to Jon Knippen, Wojciech Górski and Francesco.
277
  * Bug fixed: Stop user enumeration via REST API doesn’t work on a multisite WordPress installation.
278
+ * [Read more](https://wpcerber.com/wp-cerber-security-5-7/)
279
 
280
  = 5.5 =
281
  * New: White list for the WordPress anti-spam engine.
282
  * New: White list for REST API requests.
283
  * New: Disable access to user data via REST API and stop REST API user enumeration.
284
+ * [Read more](https://wpcerber.com/wp-cerber-security-5-5/)
285
 
286
  = 5.2 =
287
  * Bug fixed: Hidden custom login URL may be discovered by using specially formatted URL.
348
  * Fixed bug: The plugin tries to validate reCAPTCHA on WooCommerce login form if the validation enabled for the default WordPress login form only.
349
 
350
  = 4.0 =
351
+ * New: reCAPTCHA for WooCommerce forms. [How to set up reCAPTCHA](https://wpcerber.com/how-to-setup-recaptcha/).
352
+ * New: IP Access Lists has got support for IP networks in three forms: ability to restrict access with IPv4 ranges, IPv4 CIDR notation and IPv4 subnets: A,B,C has been added. [Access Lists for WordPress](https://wpcerber.com/using-ip-access-lists-to-protect-wordpress/).
353
  * New: Cerber can automatically detect an IP network of an intruder and suggest you to block entire network right from the Activity screen.
354
  * New: Norwegian translation added, thanks to [Eirik Vorland](https://www.facebook.com/KjellDaSensei).
355
  * Update: WP REST API is controlled by Access Lists. While REST API is blocked for the rest of the world, IP addresses from the White Access List can use WP REST API.
362
  * Fixed issue: In some cases the plugin log first digits of an IP address as an ID of existing user.
363
 
364
  = 3.0 =
365
+ * New: [reCAPTCHA to protect WordPress forms spam registrations. Also available for lost password and login forms.](https://wpcerber.com/how-to-setup-recaptcha/)
366
  * New: Registration, XML RCP, WP REST API are controlled by IP Access Lists now. If a particular IP address is locked out or blacklisted registration is impossible.
367
  * New: Action Get WHOIS info and trigger IP locked out to create automation scenarios with the [jetFlow.io automation plugin](http://jetflow.io).
368
  * New: Notification emails will contain Reason of a lockout.
391
  = 2.7 =
392
 
393
  * New: Now you can view extra WHOIS information for IP addresses in the activity log including country, network info, abuse contact, etc.
394
+ * New: Added ability to disable WP REST API, see [Hardening WordPress](https://wpcerber.com/hardening-wordpress/)
395
  * New: Added ability to add IP address to the Black List from the Activity tab. Nail it!
396
  * New: Added Spanish translation, thanks to Ismael.
397
  * New: Added ability to set numbers of displayed rows (lines) on the Activity and Lockout tabs. Click Screen Options on the top-right.
472
 
473
  1. If you want to test out plugin's features, do this from another computer and remove that computer's network from the White Access List. Cerber is smart enough to recognize "the boss".
474
  2. If you've set up the Custom login URL and you use some caching plugin like **W3 Total Cache** or **WP Super Cache**, you have to add a new Custom login URL to the list of pages not to cache.
475
+ 3. [Read this if your website is under CloudFlare](https://wpcerber.com/cloudflare-and-wordpress-cerber/)
476
 
477
  **Deutsche**
478
  Schützt vor Ort gegen Brute-Force-Attacken. Umfassende Kontrolle der Benutzeraktivität. Beschränken Sie die Anzahl der Anmeldeversuche durch die Login-Formular, XML-RPC-Anfragen oder mit Auth-Cookies. Beschränken Sie den Zugriff mit Schwarz-Weiß-Zugriffsliste Zugriffsliste. Track Benutzer und Einbruch Aktivität.
settings.php CHANGED
@@ -77,7 +77,7 @@ function cerber_settings_init(){
77
  add_settings_field('citadel',__('Threshold','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'citadel','type'=>'citadel'));
78
  add_settings_field('ciduration',__('Duration','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'ciduration','type'=>'text','label'=>__('minutes','wp-cerber'),'size'=>3));
79
  //add_settings_field('ciwhite',__('White IP Access List','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'ciwhite','type'=>'checkbox','label'=>__('Permit IPs from the White IP Access List to log in','wp-cerber')));
80
- add_settings_field('cinotify',__('Notifications','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'cinotify','type'=>'checkbox','label'=>__('Send notification to admin email','wp-cerber').' (<a href="'.wp_nonce_url(add_query_arg(array('testnotify'=>'citadel', 'settings-updated' => 0)),'control','cerber_nonce').'">'.__('Click to send test','wp-cerber').'</a>)'));
81
 
82
  add_settings_section('activity', __('Activity','wp-cerber'), 'cerber_sapi_section', 'cerber-' . $tab);
83
  add_settings_field('keeplog',__('Keep records for','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'activity',array('group'=>$tab,'option'=>'keeplog','type'=>'text','label'=>__('days','wp-cerber'),'size'=>3));
@@ -156,15 +156,15 @@ function cerber_settings_init(){
156
 
157
  // Notifications -----------------------------------------------------------------------------
158
 
159
- $tab='notifications'; // 'cerber-notifications' settings
160
- register_setting( 'cerberus-'.$tab, CERBER_OPT_N);
161
- add_settings_section('notify', __('Email notifications','wp-cerber'), 'cerber_sapi_section', 'cerber-' . $tab);
162
  $def_email = '<b>'.get_site_option('admin_email').'</b>';
163
- add_settings_field('email',__('Email Address','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'notify',array('group'=>$tab,'option'=>'email','type'=>'text','placeholder'=>__('Use comma to specify multiple values','wp-cerber'),'size'=>60,'label'=>sprintf(__('if empty, the admin email %s will be used','wp-cerber'),$def_email)));
164
- add_settings_field('emailrate',__('Notification limit','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'notify',array('group'=>$tab,'option'=>'emailrate','type'=>'text','label'=>__('notification letters allowed per hour (0 means unlimited)','wp-cerber'),'size'=>3));
165
 
166
- add_settings_section('pushit', __('Push notifications','wp-cerber'). ' <a class="help-sign" href="'.cerber_admin_link('help').'">?</a>', 'cerber_sapi_section', 'cerber-' . $tab);
167
- add_settings_field('pbtoken','Pushbullet access token','cerberus_field_show','cerber-'.$tab,'pushit',array('group'=>$tab,'option'=>'pbtoken','type'=>'text','size'=>60));
168
 
169
  $set = array();
170
  if (cerber_is_admin_page(false, array('tab'=>'notifications'))){
@@ -175,7 +175,11 @@ function cerber_settings_init(){
175
  }
176
  else $set = array('N' => __('Not available','wp-cerber'));
177
  }
178
- add_settings_field('pbdevice','Pushbullet device','cerberus_field_show','cerber-'.$tab,'pushit',array('group'=>$tab,'option'=>'pbdevice','type'=>'select','set'=>$set));
 
 
 
 
179
 
180
  }
181
  /*
@@ -202,7 +206,7 @@ function cerber_sapi_section($args){
202
  break;
203
  case 'recap':
204
  _e('Before you can start using reCAPTCHA, you have to obtain Site key and Secret key on the Google website','wp-cerber');
205
- echo ' <a href="http://wpcerber.com/how-to-setup-recaptcha/">'.__('Know more','wp-cerber').'</a>';
206
  break;
207
  }
208
  }
@@ -273,7 +277,7 @@ function cerber_settings_page(){
273
  case 'dashboard':
274
  cerber_show_dashboard();
275
  break;
276
- default: cerber_show_settings($tab);
277
  }
278
 
279
  echo '</div>';
@@ -291,14 +295,14 @@ function cerber_settings_page(){
291
  * Display settings screen (one tab)
292
  *
293
  */
294
- function cerber_show_settings($active_tab = null){
295
  if (is_multisite()) $action = ''; // Settings API doesn't work in multisite. Post data will be handled in the cerber_ms_update()
296
  else $action ='options.php';
297
  // Display form with settings fields via Settings API
298
  echo '<form method="post" action="'.$action.'">';
299
 
300
- settings_fields( 'cerberus-'.$active_tab ); // option group name, the same as used in register_setting().
301
- do_settings_sections( 'cerber-'.$active_tab ); // the same as used in add_settings_section() $page
302
  echo '<div style="padding-left: 220px">';
303
  submit_button();
304
  echo '</div>';
@@ -318,6 +322,7 @@ function cerberus_field_show($args){
318
  }
319
  $pre = '';
320
  $value = '';
 
321
  if ( ! empty( $args['label'] ) ) {
322
  $label = $args['label'];
323
  } else {
@@ -330,10 +335,6 @@ function cerberus_field_show($args){
330
  if ( ( $args['option'] == 'loginnowp' || $args['option'] == 'loginpath' ) && ! get_option( 'permalink_structure' ) ) {
331
  $disabled = ' disabled="disabled" ';
332
  }
333
- else {
334
- $disabled = '';
335
- }
336
-
337
  if ( $args['option'] == 'loginpath' ) {
338
  $pre = rtrim( get_home_url(), '/' ) . '/';
339
  $value = urldecode( $value );
@@ -344,7 +345,6 @@ function cerberus_field_show($args){
344
  elseif ( $args['option'] == 'botswhite' || $args['option'] == 'restwhite') {
345
  $value = cerber_array2text($value, "\n");
346
  }
347
-
348
  }
349
 
350
  $name = 'cerber-'.$args['group'].'['.$args['option'].']';
@@ -379,10 +379,10 @@ function cerberus_field_show($args){
379
  '<input type="text" id="aglast" name="cerber-'.$args['group'].'[aglast]" value="'.$settings['aglast'].'" size="3" maxlength="3" />');
380
  break;
381
  case 'notify':
382
- $html= '<label class="switch"><input type="checkbox" id="'.$args['option'].'" name="cerber-'.$args['group'].'['.$args['option'].']" value="1" '.checked(1,$value,false).$disabled.' /><span class="slider round"></span></label>'
383
  .__('Notify admin if the number of active lockouts above','wp-cerber').
384
  ' <input type="text" id="above" name="cerber-'.$args['group'].'[above]" value="'.$settings['above'].'" size="3" maxlength="3" />'.
385
- ' (<a href="' . wp_nonce_url( add_query_arg( array( 'testnotify' => 'lockout', 'settings-updated' => 0 ) ), 'control', 'cerber_nonce' ) . '">' . __( 'Click to send test', 'wp-cerber' ) . '</a>)';
386
  break;
387
  case 'citadel':
388
  $html=sprintf(__('Enable after %s failed login attempts in last %s minutes','wp-cerber'),
@@ -390,9 +390,9 @@ function cerberus_field_show($args){
390
  '<input type="text" id="ciperiod" name="cerber-'.$args['group'].'[ciperiod]" value="'.$settings['ciperiod'].'" size="3" maxlength="3" />');
391
  break;
392
  case 'checkbox':
393
- $html='<label class="switch"><input type="checkbox" id="'.$args['option'].'" name="'.$name.'" value="1" '.checked(1,$value,false).$disabled.' /><span class="slider round"></span></label>';
394
- $html.= $args['label'];
395
- //$html.= ' <label for="'.$args['option'].'">'.$args['label'].'</label>';
396
  break;
397
  case 'textarea':
398
  //$name = 'cerber-'.$args['group'].'['.$args['option'].']';
@@ -427,13 +427,138 @@ function cerberus_field_show($args){
427
  if ( isset( $settings[ $args['option'] . '-enabled' ] ) ) {
428
  $value = $settings[ $args['option'] . '-enabled' ];
429
  }
430
- $checkbox = '<label class="switch"><input type="checkbox" id="' . $args['option'] . '-enabled" name="' . $name . '" value="1" ' . checked( 1, $value, false ) . ' /><span class="slider round"></span></label>' . $args['enabled'];
431
  $html = $checkbox . $html;
432
  }
433
 
434
  echo $html."\n";
435
  }
436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  /**
438
  * @param $name string HTML input name
439
  * @param $list array List of elements
@@ -456,6 +581,45 @@ function cerber_select($name, $list, $selected = null, $class = '' , $multiple =
456
  return ' <select name="'.$name.'" class="crb-select '.$class.'" '.$m.'>'.implode("\n",$options).'</select>';
457
  }
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  /*
460
  Sanitizing users input for Main Settings
461
  */
@@ -480,8 +644,8 @@ function cerber_sanitize_options($new, $old, $option) { // $option added in WP 4
480
  $msg_e = array();
481
  $msg[] = __( 'Attention! You have changed the login URL! The new login URL is', 'wp-cerber' ) . ': <a href="' . $href . '">' . $url . '</a>';
482
  $msg_e[] = __( 'Attention! You have changed the login URL! The new login URL is', 'wp-cerber' ) . ': ' . $url;
483
- $msg[] = __( 'If you use a caching plugin, you have to add your new login URL to the list of pages not to cache', 'wp-cerber' );
484
- $msg_e[] = __( 'If you use a caching plugin, you have to add your new login URL to the list of pages not to cache', 'wp-cerber' );
485
  cerber_admin_notice( $msg );
486
  cerber_send_notify( 'newlurl', $msg_e );
487
  }
@@ -699,7 +863,7 @@ function cerber_get_defaults($field = null) {
699
  'subnet' => 0,
700
  'nonusers' => 1,
701
  'wplogin' => 0,
702
- 'noredirect' => 1,
703
  'page404' => 0,
704
 
705
  'loginpath' => '',
@@ -763,10 +927,12 @@ function cerber_get_defaults($field = null) {
763
  'recaptcha-within' => 30,
764
  ),
765
  CERBER_OPT_N => array(
766
- 'email' => '',
767
- 'emailrate' => 12,
768
  'pbtoken' => '',
769
- 'pbdevice' => '',
 
 
770
  )
771
  );
772
  if ( $field ) {
@@ -782,14 +948,32 @@ function cerber_get_defaults($field = null) {
782
  }
783
 
784
  /**
785
- * Upgrade existing options with default values (for new fields).
786
  *
787
  */
788
  function cerber_upgrade_options() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  foreach ( cerber_get_defaults() as $option_name => $fields ) {
790
  $values = get_site_option( $option_name );
 
 
 
791
  foreach ( $fields as $field_name => $default ) {
792
- if ( ! isset( $values[ $field_name ] ) ) {
793
  $values[ $field_name ] = $default;
794
  }
795
  }
@@ -849,10 +1033,17 @@ function cerber_get_options($option = '') {
849
  *
850
  * @return array|bool|mixed
851
  */
852
- function cerber_get_settings($option = '') {
853
  global $wpdb;
854
  static $united;
855
 
 
 
 
 
 
 
 
856
  if (!isset($united)) {
857
 
858
  $options = array( CERBER_OPT, CERBER_OPT_H, CERBER_OPT_U, CERBER_OPT_C, CERBER_OPT_N );
@@ -883,7 +1074,8 @@ function cerber_get_settings($option = '') {
883
  if ( ! empty( $option ) ) {
884
  if ( isset( $options[ $option ] ) ) {
885
  return $options[ $option ];
886
- } else {
 
887
  return false;
888
  }
889
  }
@@ -905,13 +1097,18 @@ function cerber_load_defaults() {
905
  if (!empty($old['loginpath'])) $save['loginpath'] = $old['loginpath'];
906
  cerber_save_options( $save );
907
  }
908
- /*
909
- Email addresses for notification
910
- */
 
 
911
  function cerber_get_email() {
912
- global $wp_cerber;
913
- if (!$email = $wp_cerber->getSettings('email')) $email = get_site_option('admin_email');
914
- //if (!is_array($email)) $email = array($email);
915
- if (is_array($email)) $email = implode(',',$email); // @since 4.9
 
 
 
916
  return $email;
917
  }
77
  add_settings_field('citadel',__('Threshold','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'citadel','type'=>'citadel'));
78
  add_settings_field('ciduration',__('Duration','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'ciduration','type'=>'text','label'=>__('minutes','wp-cerber'),'size'=>3));
79
  //add_settings_field('ciwhite',__('White IP Access List','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'ciwhite','type'=>'checkbox','label'=>__('Permit IPs from the White IP Access List to log in','wp-cerber')));
80
+ add_settings_field('cinotify',__('Notifications','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'citadel',array('group'=>$tab,'option'=>'cinotify','type'=>'checkbox','label'=>__('Send notification to admin email','wp-cerber').' [ <a href="'.wp_nonce_url(add_query_arg(array('testnotify'=>'citadel', 'settings-updated' => 0)),'control','cerber_nonce').'">'.__('Click to send test','wp-cerber').'</a> ]'));
81
 
82
  add_settings_section('activity', __('Activity','wp-cerber'), 'cerber_sapi_section', 'cerber-' . $tab);
83
  add_settings_field('keeplog',__('Keep records for','wp-cerber'),'cerberus_field_show','cerber-'.$tab,'activity',array('group'=>$tab,'option'=>'keeplog','type'=>'text','label'=>__('days','wp-cerber'),'size'=>3));
156
 
157
  // Notifications -----------------------------------------------------------------------------
158
 
159
+ $group = 'notifications'; // 'cerber-notifications' settings
160
+ register_setting( 'cerberus-'.$group, CERBER_OPT_N);
161
+ add_settings_section('notify', __('Email notifications','wp-cerber'), 'cerber_sapi_section', CERBER_OPT_N);
162
  $def_email = '<b>'.get_site_option('admin_email').'</b>';
163
+ add_settings_field('email',__('Email Address','wp-cerber'),'cerber_field_show', CERBER_OPT_N,'notify',array('group'=>$group,'setting'=>'email','type'=>'text','placeholder'=>__('Use comma to specify multiple values','wp-cerber'),'size'=>60,'label'=>sprintf(__('if empty, the admin email %s will be used','wp-cerber'),$def_email)));
164
+ add_settings_field('emailrate',__('Notification limit','wp-cerber'),'cerber_field_show',CERBER_OPT_N,'notify',array('group'=>$group,'setting'=>'emailrate','type'=>'text','label'=>__('notification letters allowed per hour (0 means unlimited)','wp-cerber'),'size'=>3));
165
 
166
+ add_settings_section('pushit', __('Push notifications','wp-cerber'). ' <a class="help-sign" href="'.cerber_admin_link('help').'">?</a>', 'cerber_sapi_section', CERBER_OPT_N);
167
+ add_settings_field('pbtoken','Pushbullet access token','cerber_field_show',CERBER_OPT_N,'pushit',array('group'=>$group,'setting'=>'pbtoken','type'=>'text','size'=>60));
168
 
169
  $set = array();
170
  if (cerber_is_admin_page(false, array('tab'=>'notifications'))){
175
  }
176
  else $set = array('N' => __('Not available','wp-cerber'));
177
  }
178
+ add_settings_field('pbdevice','Pushbullet device','cerber_field_show',CERBER_OPT_N,'pushit',array('group'=>$group,'setting'=>'pbdevice','type'=>'select','set'=>$set));
179
+
180
+
181
+ add_settings_section('reports', __('Weekly reports','wp-cerber'), 'cerber_sapi_section', CERBER_OPT_N);
182
+ add_settings_field('wreports','Send reports on','cerber_field_show',CERBER_OPT_N,'reports',array('group'=>$group,'setting'=>'wreports','type'=>'reptime'));
183
 
184
  }
185
  /*
206
  break;
207
  case 'recap':
208
  _e('Before you can start using reCAPTCHA, you have to obtain Site key and Secret key on the Google website','wp-cerber');
209
+ echo ' <a href="https://wpcerber.com/how-to-setup-recaptcha/">'.__('Know more','wp-cerber').'</a>';
210
  break;
211
  }
212
  }
277
  case 'dashboard':
278
  cerber_show_dashboard();
279
  break;
280
+ default: cerber_show_settings_page($tab);
281
  }
282
 
283
  echo '</div>';
295
  * Display settings screen (one tab)
296
  *
297
  */
298
+ function cerber_show_settings_page($tab = null){
299
  if (is_multisite()) $action = ''; // Settings API doesn't work in multisite. Post data will be handled in the cerber_ms_update()
300
  else $action ='options.php';
301
  // Display form with settings fields via Settings API
302
  echo '<form method="post" action="'.$action.'">';
303
 
304
+ settings_fields( 'cerberus-'.$tab ); // option group name, the same as used in register_setting().
305
+ do_settings_sections( 'cerber-'.$tab ); // the same as used in add_settings_section() $page
306
  echo '<div style="padding-left: 220px">';
307
  submit_button();
308
  echo '</div>';
322
  }
323
  $pre = '';
324
  $value = '';
325
+ $disabled = '';
326
  if ( ! empty( $args['label'] ) ) {
327
  $label = $args['label'];
328
  } else {
335
  if ( ( $args['option'] == 'loginnowp' || $args['option'] == 'loginpath' ) && ! get_option( 'permalink_structure' ) ) {
336
  $disabled = ' disabled="disabled" ';
337
  }
 
 
 
 
338
  if ( $args['option'] == 'loginpath' ) {
339
  $pre = rtrim( get_home_url(), '/' ) . '/';
340
  $value = urldecode( $value );
345
  elseif ( $args['option'] == 'botswhite' || $args['option'] == 'restwhite') {
346
  $value = cerber_array2text($value, "\n");
347
  }
 
348
  }
349
 
350
  $name = 'cerber-'.$args['group'].'['.$args['option'].']';
379
  '<input type="text" id="aglast" name="cerber-'.$args['group'].'[aglast]" value="'.$settings['aglast'].'" size="3" maxlength="3" />');
380
  break;
381
  case 'notify':
382
+ $html= '<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="'.$args['option'].'" name="cerber-'.$args['group'].'['.$args['option'].']" value="1" '.checked(1,$value,false).$disabled.' /><span class="crb-slider round"></span></label>'
383
  .__('Notify admin if the number of active lockouts above','wp-cerber').
384
  ' <input type="text" id="above" name="cerber-'.$args['group'].'[above]" value="'.$settings['above'].'" size="3" maxlength="3" />'.
385
+ ' [ <a href="' . wp_nonce_url( add_query_arg( array( 'testnotify' => 'lockout', 'settings-updated' => 0 ) ), 'control', 'cerber_nonce' ) . '">' . __( 'Click to send test', 'wp-cerber' ) . '</a> ]';
386
  break;
387
  case 'citadel':
388
  $html=sprintf(__('Enable after %s failed login attempts in last %s minutes','wp-cerber'),
390
  '<input type="text" id="ciperiod" name="cerber-'.$args['group'].'[ciperiod]" value="'.$settings['ciperiod'].'" size="3" maxlength="3" />');
391
  break;
392
  case 'checkbox':
393
+ $html='<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="'.$args['option'].'" name="'.$name.'" value="1" '.checked(1,$value,false).$disabled.' /><span class="crb-slider round"></span></label>';
394
+ //$html.= $args['label'];
395
+ $html.= '<label for="'.$args['option'].'">'.$args['label'].'</label>';
396
  break;
397
  case 'textarea':
398
  //$name = 'cerber-'.$args['group'].'['.$args['option'].']';
427
  if ( isset( $settings[ $args['option'] . '-enabled' ] ) ) {
428
  $value = $settings[ $args['option'] . '-enabled' ];
429
  }
430
+ $checkbox = '<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="' . $args['option'] . '-enabled" name="' . $name . '" value="1" ' . checked( 1, $value, false ) . ' /><span class="crb-slider round"></span></label>' . $args['enabled'];
431
  $html = $checkbox . $html;
432
  }
433
 
434
  echo $html."\n";
435
  }
436
 
437
+ /**
438
+ * A new version of cerberus_field_show()
439
+ *
440
+ * @param $args
441
+ */
442
+ function cerber_field_show($args){
443
+
444
+ $settings = get_site_option('cerber-'.$args['group']);
445
+ if ( is_array( $settings ) ) {
446
+ array_walk_recursive( $settings, 'esc_html' );
447
+ }
448
+ $pre = '';
449
+ $value = '';
450
+ $disabled = '';
451
+ if ( ! empty( $args['label'] ) ) {
452
+ $label = $args['label'];
453
+ }
454
+ else {
455
+ $label = '';
456
+ }
457
+ if ( isset( $args['setting'] ) ) {
458
+ if ( isset( $settings[ $args['setting'] ] ) ) {
459
+ $value = $settings[ $args['setting'] ];
460
+ }
461
+ if ( ( $args['setting'] == 'loginnowp' || $args['setting'] == 'loginpath' ) && ! get_option( 'permalink_structure' ) ) {
462
+ $disabled = ' disabled="disabled" ';
463
+ }
464
+ if ( $args['setting'] == 'loginpath' ) {
465
+ $pre = rtrim( get_home_url(), '/' ) . '/';
466
+ $value = urldecode( $value );
467
+ }
468
+ elseif ( $args['setting'] == 'prohibited' || $args['setting'] == 'email' ) {
469
+ $value = cerber_array2text($value, ', ');
470
+ }
471
+ elseif ( $args['setting'] == 'botswhite' || $args['setting'] == 'restwhite') {
472
+ $value = cerber_array2text($value, "\n");
473
+ }
474
+ }
475
+
476
+ $name = 'cerber-'.$args['group'].'['.$args['setting'].']';
477
+
478
+ switch ($args['type']) {
479
+
480
+ case 'limitz':
481
+ $s1 = $args['group'].'-period';
482
+ $s2 = $args['group'].'-number';
483
+ $s3 = $args['group'].'-within';
484
+
485
+ $html=sprintf( $args['label'] ,
486
+ '<input type="text" name="cerber-'.$args['group'].'['.$s1.']" value="'.$settings[$s1].'" size="3" maxlength="3" />',
487
+ '<input type="text" name="cerber-'.$args['group'].'['.$s2.']" value="'.$settings[$s2].'" size="3" maxlength="3" />',
488
+ '<input type="text" name="cerber-'.$args['group'].'['.$s3.']" value="'.$settings[$s3].'" size="3" maxlength="3" />');
489
+ break;
490
+
491
+ case 'attempts':
492
+ $html=sprintf(__('%s allowed retries in %s minutes','wp-cerber'),
493
+ '<input type="text" id="attempts" name="cerber-'.$args['group'].'[attempts]" value="'.$settings['attempts'].'" size="3" maxlength="3" />',
494
+ '<input type="text" id="period" name="cerber-'.$args['group'].'[period]" value="'.$settings['period'].'" size="3" maxlength="3" />');
495
+ break;
496
+ case 'reglimit':
497
+ $html=sprintf(__('%s allowed registrations in %s minutes from one IP','wp-cerber'),
498
+ '<input type="text" id="reglimit-num" name="cerber-'.$args['group'].'[reglimit_num]" value="'.$settings['reglimit_num'].'" size="3" maxlength="3" />',
499
+ '<input type="text" id="reglimit-min" name="cerber-'.$args['group'].'[reglimit_min]" value="'.$settings['reglimit_min'].'" size="3" maxlength="3" />');
500
+ break;
501
+ case 'aggressive':
502
+ $html=sprintf(__('Increase lockout duration to %s hours after %s lockouts in the last %s hours','wp-cerber'),
503
+ '<input type="text" id="agperiod" name="cerber-'.$args['group'].'[agperiod]" value="'.$settings['agperiod'].'" size="3" maxlength="3" />',
504
+ '<input type="text" id="aglocks" name="cerber-'.$args['group'].'[aglocks]" value="'.$settings['aglocks'].'" size="3" maxlength="3" />',
505
+ '<input type="text" id="aglast" name="cerber-'.$args['group'].'[aglast]" value="'.$settings['aglast'].'" size="3" maxlength="3" />');
506
+ break;
507
+ case 'notify':
508
+ $html= '<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="'.$args['setting'].'" name="cerber-'.$args['group'].'['.$args['setting'].']" value="1" '.checked(1,$value,false).$disabled.' /><span class="crb-slider round"></span></label>'
509
+ .__('Notify admin if the number of active lockouts above','wp-cerber').
510
+ ' <input type="text" id="above" name="cerber-'.$args['group'].'[above]" value="'.$settings['above'].'" size="3" maxlength="3" />'.
511
+ ' [ <a href="' . wp_nonce_url( add_query_arg( array( 'testnotify' => 'lockout', 'settings-updated' => 0 ) ), 'control', 'cerber_nonce' ) . '">' . __( 'Click to send test', 'wp-cerber' ) . '</a> ]';
512
+ break;
513
+ case 'citadel':
514
+ $html=sprintf(__('Enable after %s failed login attempts in last %s minutes','wp-cerber'),
515
+ '<input type="text" id="cilimit" name="cerber-'.$args['group'].'[cilimit]" value="'.$settings['cilimit'].'" size="3" maxlength="3" />',
516
+ '<input type="text" id="ciperiod" name="cerber-'.$args['group'].'[ciperiod]" value="'.$settings['ciperiod'].'" size="3" maxlength="3" />');
517
+ break;
518
+ case 'checkbox':
519
+ $html='<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="'.$args['setting'].'" name="'.$name.'" value="1" '.checked(1,$value,false).$disabled.' /><span class="crb-slider round"></span></label>';
520
+ $html.= '<label for="'.$args['setting'].'">'.$args['label'].'</label>';
521
+ break;
522
+ case 'textarea':
523
+ $html='<textarea class="large-text code" id="'.$args['setting'].'" name="'.$name.'" '.$disabled.' />'.$value.'</textarea>';
524
+ $html.= '<br><label for="'.$args['setting'].'">'.$args['label'].'</label>';
525
+ break;
526
+ case 'select':
527
+ $html=cerber_select($name,$args['set'],$value);
528
+ break;
529
+ case 'reptime':
530
+ $html = cerber_time_select( $args, $settings );
531
+ break;
532
+ case 'text':
533
+ default:
534
+ if ( isset( $args['size'] ) ) {
535
+ $size = ' size="' . $args['size'] . '" maxlength="' . $args['size'] . '" ';
536
+ } else {
537
+ $size = '';
538
+ }
539
+ if ( isset( $args['placeholder'] ) ) {
540
+ $plh = ' placeholder="' . $args['placeholder'] . '"';
541
+ } else {
542
+ $plh = '';
543
+ }
544
+ $html = $pre . '<input type="text" id="' . $args['setting'] . '" name="'.$name.'" value="' . $value . '"' . $disabled . $size . $plh. '/>';
545
+ $html .= ' <label for="' . $args['setting'] . '">' . $label . '</label>';
546
+ break;
547
+ }
548
+
549
+ if (!empty($args['enabled'])){
550
+ $name = 'cerber-'.$args['group'].'['.$args['setting'].'-enabled]';
551
+ $value = 0;
552
+ if ( isset( $settings[ $args['setting'] . '-enabled' ] ) ) {
553
+ $value = $settings[ $args['setting'] . '-enabled' ];
554
+ }
555
+ $checkbox = '<label class="crb-switch"><input class="screen-reader-text" type="checkbox" id="' . $args['setting'] . '-enabled" name="' . $name . '" value="1" ' . checked( 1, $value, false ) . ' /><span class="crb-slider round"></span></label>' . $args['enabled'];
556
+ $html = $checkbox . $html;
557
+ }
558
+
559
+ echo $html."\n";
560
+ }
561
+
562
  /**
563
  * @param $name string HTML input name
564
  * @param $list array List of elements
581
  return ' <select name="'.$name.'" class="crb-select '.$class.'" '.$m.'>'.implode("\n",$options).'</select>';
582
  }
583
 
584
+ function cerber_time_select($args, $settings){
585
+
586
+ // Week
587
+ $php_week = array(
588
+ __( 'Sunday' ),
589
+ __( 'Monday' ),
590
+ __( 'Tuesday' ),
591
+ __( 'Wednesday' ),
592
+ __( 'Thursday' ),
593
+ __( 'Friday' ),
594
+ __( 'Saturday' ),
595
+ );
596
+ $field = $args['setting'].'-day';
597
+ if (isset($settings[ $field ])) {
598
+ $selected = $settings[ $field ];
599
+ }
600
+ else {
601
+ $selected = '';
602
+ }
603
+ $ret = cerber_select( 'cerber-' . $args['group'] . '[' . $field . ']', $php_week, $selected );
604
+ $ret .= ' &nbsp; ' . /* translators: preposition of time */ _x( 'at', 'preposition of time', 'wp-cerber' ) . ' &nbsp; ';
605
+
606
+ // Hours
607
+ $hours = array();
608
+ for($i = 0; $i <= 23; $i++) {
609
+ $hours[] = str_pad( $i, 2, '0', STR_PAD_LEFT ) . ':00';
610
+ }
611
+ $field = $args['setting'].'-time';
612
+ if (isset($settings[ $field ])) {
613
+ $selected = $settings[ $field ];
614
+ }
615
+ else {
616
+ $selected = '';
617
+ }
618
+ $ret .= cerber_select( 'cerber-' . $args['group'] . '[' . $field . ']', $hours, $selected );
619
+
620
+ return $ret.' &nbsp; [ <a href="'.wp_nonce_url(add_query_arg(array('testnotify'=>'report', 'settings-updated' => 0)),'control','cerber_nonce').'">'.__('Click to send now','wp-cerber').'</a> ]';
621
+ }
622
+
623
  /*
624
  Sanitizing users input for Main Settings
625
  */
644
  $msg_e = array();
645
  $msg[] = __( 'Attention! You have changed the login URL! The new login URL is', 'wp-cerber' ) . ': <a href="' . $href . '">' . $url . '</a>';
646
  $msg_e[] = __( 'Attention! You have changed the login URL! The new login URL is', 'wp-cerber' ) . ': ' . $url;
647
+ $msg[] = __( 'If you use a caching plugin, you have to add your new login URL to the list of pages not to cache.', 'wp-cerber' );
648
+ $msg_e[] = __( 'If you use a caching plugin, you have to add your new login URL to the list of pages not to cache.', 'wp-cerber' );
649
  cerber_admin_notice( $msg );
650
  cerber_send_notify( 'newlurl', $msg_e );
651
  }
863
  'subnet' => 0,
864
  'nonusers' => 1,
865
  'wplogin' => 0,
866
+ 'noredirect' => 0,
867
  'page404' => 0,
868
 
869
  'loginpath' => '',
927
  'recaptcha-within' => 30,
928
  ),
929
  CERBER_OPT_N => array(
930
+ 'email' => '',
931
+ 'emailrate' => 12,
932
  'pbtoken' => '',
933
+ 'pbdevice' => '',
934
+ 'wreports-day' => '1', // workaround, see cerber_upgrade_options()
935
+ 'wreports-time' => 9,
936
  )
937
  );
938
  if ( $field ) {
948
  }
949
 
950
  /**
951
+ * Upgrade plugin options
952
  *
953
  */
954
  function cerber_upgrade_options() {
955
+ // @since 4.4, migrating fields to a new option
956
+ $main = get_site_option( CERBER_OPT );
957
+ if (!empty($main['email']) || !empty($main['emailrate'])){
958
+ $new = get_site_option( CERBER_OPT_N, array() );
959
+ $new['email'] = $main['email'];
960
+ $new['emailrate'] = $main['emailrate'];
961
+ update_site_option( CERBER_OPT_N, $new );
962
+ // clean up old values
963
+ $main['email'] = '';
964
+ $main['emailrate'] = '';
965
+ update_site_option( CERBER_OPT, $main );
966
+ }
967
+
968
+ // @since 5.7
969
+ // Upgrade options: add new settings (fields) with their default values
970
  foreach ( cerber_get_defaults() as $option_name => $fields ) {
971
  $values = get_site_option( $option_name );
972
+ if ( ! $values ) {
973
+ continue;
974
+ }
975
  foreach ( $fields as $field_name => $default ) {
976
+ if ( ! isset( $values[ $field_name ] ) && $default !== 1) { // @since 5.7.2 TODO refactor $default === 1 to more obvious
977
  $values[ $field_name ] = $default;
978
  }
979
  }
1033
  *
1034
  * @return array|bool|mixed
1035
  */
1036
+ function crb_get_settings($option = '') {
1037
  global $wpdb;
1038
  static $united;
1039
 
1040
+ /**
1041
+ * For some hostings it might be faster
1042
+ */
1043
+ if ( defined( 'CERBER_WP_OPTIONS' ) ) {
1044
+ return cerber_get_options( $option );
1045
+ }
1046
+
1047
  if (!isset($united)) {
1048
 
1049
  $options = array( CERBER_OPT, CERBER_OPT_H, CERBER_OPT_U, CERBER_OPT_C, CERBER_OPT_N );
1074
  if ( ! empty( $option ) ) {
1075
  if ( isset( $options[ $option ] ) ) {
1076
  return $options[ $option ];
1077
+ }
1078
+ else {
1079
  return false;
1080
  }
1081
  }
1097
  if (!empty($old['loginpath'])) $save['loginpath'] = $old['loginpath'];
1098
  cerber_save_options( $save );
1099
  }
1100
+
1101
+ /**
1102
+ *
1103
+ * @return string Email address(es) for notifications
1104
+ */
1105
  function cerber_get_email() {
1106
+ if ( ! $email = crb_get_settings( 'email' ) ) {
1107
+ $email = get_site_option( 'admin_email' );
1108
+ }
1109
+ if ( is_array( $email ) ) { // @since 4.9
1110
+ $email = implode( ', ', $email );
1111
+ }
1112
+
1113
  return $email;
1114
  }
wp-cerber.php CHANGED
@@ -2,15 +2,15 @@
2
  /*
3
  Plugin Name: WP Cerber Security & Antispam
4
  Plugin URI: https://wpcerber.com
5
- Description: Protects site from brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href="http://wpcerber.com">wpcerber.com</a>.
6
  Author: Gregory
7
  Author URI: https://wpcerber.com
8
- Version: 5.7
9
  Text Domain: wp-cerber
10
  Domain Path: /languages
11
  Network: true
12
 
13
- Copyright (C) 2015-17 CERBER TECH INC., Gregory Markov, http://wpcerber.com
14
  Flag icons - http://www.famfamfam.com
15
 
16
  Licenced under the GNU GPL.
@@ -61,7 +61,7 @@ if ( ! defined( 'WPINC' ) ) {
61
  exit;
62
  }
63
 
64
- define( 'CERBER_VER', '5.7' );
65
  define( 'CERBER_LOG_TABLE', 'cerber_log' );
66
  define( 'CERBER_ACL_TABLE', 'cerber_acl' );
67
  define( 'CERBER_BLOCKS_TABLE', 'cerber_blocks' );
@@ -621,13 +621,12 @@ global $wp_cerber;
621
  $wp_cerber = new WP_Cerber();
622
 
623
 
624
- /*
625
- *
626
- * Initialize Cerber
627
- *
628
  */
629
- add_action( 'plugins_loaded', 'cerber_init', 1000 );
630
- function cerber_init() {
631
  global $wpdb, $wp_cerber;
632
 
633
  load_plugin_textdomain( 'wp-cerber', false, basename( dirname( __FILE__ ) ) . '/languages' );
@@ -640,12 +639,7 @@ function cerber_init() {
640
  wp_clear_auth_cookie();
641
  }
642
 
643
- if ( ! wp_next_scheduled( 'cerber_hourly' ) ) {
644
- wp_schedule_event( time(), 'hourly', 'cerber_hourly' );
645
- }
646
- if ( ! wp_next_scheduled( 'cerber_daily' ) ) {
647
- wp_schedule_event( time(), 'daily', 'cerber_daily' );
648
- }
649
 
650
  if ( isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET' ){
651
  $antibot = get_site_option( 'cerber-antibot', null );
@@ -656,7 +650,9 @@ function cerber_init() {
656
  }
657
  }
658
 
659
- }
 
 
660
 
661
  /**
662
  * Some additional tasks...
@@ -670,8 +666,8 @@ add_action( 'shutdown', function () {
670
  }
671
 
672
  // Multiple different malicious activities
673
- $black = crb_black_activities();
674
- $no_good = array_intersect( crb_black_activities(), $cerber_logged );
675
  if ( ! empty( $no_good ) && cerber_is_allowed() ) {
676
  $ip = $wp_cerber->getRemoteIp();
677
  $in = implode( ',', $black );
@@ -694,24 +690,16 @@ add_action( 'init', 'cerber_wp_login_page', 20 );
694
  function cerber_wp_login_page() {
695
  global $wp_cerber;
696
  if ( $path = $wp_cerber->getSettings( 'loginpath' ) ) {
697
- $request = $_SERVER['REQUEST_URI'];
698
- if ( $pos = strpos( $request, '?' ) ) {
699
- //$request = explode( '?', $request );
700
- //$request = array_shift( $request );
701
- $request = substr( $request, 0, $pos - 1 ); // @since 4.8
702
- }
703
- $request = explode( '/', rtrim( $request, '/' ) );
704
- //$request = array_pop( $request );
705
- $request = end($request); // @since 4.8
706
- if ( $path == $request && !cerber_is_rest_url() ) {
707
- require( ABSPATH . WP_LOGIN_SCRIPT ); // load default wp-login form
708
  exit;
709
  }
710
  }
711
  }
712
 
713
  /**
714
- * Check if the current request is a login page / form request
715
  *
716
  * @return bool
717
  */
@@ -720,19 +708,15 @@ function cerber_is_login_request() {
720
  if ( $path = $wp_cerber->getSettings( 'loginpath' ) ) {
721
  $request = $_SERVER['REQUEST_URI'];
722
  if ( $pos = strpos( $request, '?' ) ) {
723
- //$request = explode( '?', $request );
724
- //$request = array_shift( $request );
725
  $request = substr( $request, 0, $pos - 1 ); // @since 4.8
726
  }
727
  $request = explode( '/', rtrim( $request, '/' ) );
728
- //$request = array_pop( $request );
729
- $request = end($request); // @since 4.8
730
- if ( $path == $request && !cerber_is_rest_url() ) {
731
- return true;
732
  }
733
  }
734
- //elseif ( 0 === strpos( trim( $_SERVER['REQUEST_URI'], '/' ), WP_LOGIN_SCRIPT ) ) {
735
- elseif ( strtolower( cerber_get_last_in_uri( true ) ) == WP_LOGIN_SCRIPT ) {
736
  return true;
737
  }
738
 
@@ -1159,7 +1143,7 @@ function cerber_lost_show_msg() {
1159
  *
1160
  */
1161
  add_filter( 'pre_comment_approved', function ( $approved, $commentdata ) {
1162
- if ( 1 == cerber_get_options( 'spamcomm' ) && ! cerber_is_comment_allowed() ) {
1163
  $approved = 'spam';
1164
  }
1165
 
@@ -1175,7 +1159,7 @@ add_action( 'pre_comment_on_post', function ( $comment_post_ID ) {
1175
 
1176
  $deny = false;
1177
 
1178
- if ( 1 != cerber_get_options( 'spamcomm' ) && ! cerber_is_comment_allowed() ) {
1179
  $deny = true;
1180
  }
1181
  elseif ( ! cerber_geo_allowed( 'geo_comment' ) ) {
@@ -1572,11 +1556,14 @@ function cerber_pingback_url( $output, $show ) {
1572
  *
1573
  */
1574
  function cerber_block_rest() {
 
1575
  // OLD WP
1576
  add_filter( 'json_enabled', '__return_false' );
1577
  add_filter( 'json_jsonp_enabled', '__return_false' );
1578
- // WP 4.4
1579
- add_filter( 'rest_enabled', '__return_false', 9999 );
 
 
1580
  // WP 4.7
1581
  add_filter( 'rest_jsonp_enabled', '__return_false' );
1582
  // Links
@@ -1590,7 +1577,7 @@ function cerber_block_rest() {
1590
  remove_action( 'parse_request', 'rest_api_loaded' );
1591
 
1592
  if ( cerber_is_rest_url() ) {
1593
- cerber_log(70);
1594
  cerber_404_page();
1595
  }
1596
  }
@@ -2163,9 +2150,9 @@ function cerber_block_add( $ip = '', $reason_id = 1, $details = '', $duration =
2163
  return false;
2164
  }
2165
 
2166
- /*if ( $check_acl && cerber_acl_check( $ip ) ) {
2167
  return false;
2168
- }*/
2169
 
2170
  $ip_address = $ip;
2171
 
@@ -2931,6 +2918,7 @@ function cerber_send_notify( $type = '', $msg = '', $ip = '' ) {
2931
  }
2932
 
2933
  $to = cerber_get_email();
 
2934
 
2935
  $subj = '[' . get_option( 'blogname' ) . '] ' . __( 'WP Cerber notify', 'wp-cerber' ) . ': ';
2936
  $body = '';
@@ -3036,6 +3024,16 @@ function cerber_send_notify( $type = '', $msg = '', $ip = '' ) {
3036
  $body = __( 'A new activity has been recorded', 'wp-cerber' ) . "\n\n";
3037
  $body .= $msg;
3038
  break;
 
 
 
 
 
 
 
 
 
 
3039
  }
3040
 
3041
  $body_filtered = apply_filters( 'cerber_notify_body', $body, array( 'type' => $type,
@@ -3047,18 +3045,46 @@ function cerber_send_notify( $type = '', $msg = '', $ip = '' ) {
3047
  $body = $body_filtered;
3048
  }
3049
 
3050
- //$body .= __('This message was sent by','wp-cerber').' <a href="http://wpcerber.com">WP Cerber security plugin</a>.'."\n";
3051
- $body .= "\n\n\n" . __( 'This message was sent by', 'wp-cerber' ) . " WP Cerber.\n";
3052
- $body .= 'http://wpcerber.com';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3053
 
3054
  if ( $to && $subj && $body ) {
3055
- cerber_pb_send($subj, $body);
 
 
 
 
 
3056
  $result = wp_mail( $to, $subj, $body );
3057
  }
3058
  else {
3059
  $result = false;
3060
  }
3061
 
 
 
3062
  $params = array( 'type' => $type, 'IP' => $ip, 'to' => $to, 'subject' => $subj );
3063
  if ( $result ) {
3064
  do_action( 'cerber_notify_sent', $body, $params );
@@ -3070,35 +3096,103 @@ function cerber_send_notify( $type = '', $msg = '', $ip = '' ) {
3070
  return $result;
3071
  }
3072
 
 
 
 
3073
 
3074
- /*
3075
- TODO: Return themed page with message instead of login form.
3076
- */
3077
- /*
3078
- function cerber_info_page(){
3079
- global $wp_query;
3080
- $wp_query->is_page = true;
3081
- add_filter('the_content', 'cerber_info_page_content');
3082
- if(!include(TEMPLATEPATH.'/page.php')) { // wow, theme does not have page.php file?
3083
- echo '<html><head><title>Login not permited</title></head><body><h1>Login not permited</h1><p>You not allowed to login to this site.</p></body></html>';
3084
- }
3085
- exit;
3086
- }
3087
- function cerber_info_page_content(){
3088
- return 'Login not permited.';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3089
  }
3090
- */
3091
 
3092
  // Maintenance routines ----------------------------------------------------------------
3093
 
3094
- add_action( 'cerber_hourly', 'cerber_do_hourly' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3095
  function cerber_do_hourly($force = false) {
3096
  global $wpdb, $wp_cerber;
3097
 
3098
- if ( !$force && get_site_transient( 'cerber_multisite' ) ) {
3099
- return;
 
 
 
 
 
 
 
3100
  }
3101
- set_site_transient( 'cerber_multisite', 'executed', 3600 );
3102
 
3103
  $days = absint( $wp_cerber->getSettings( 'keeplog' ) );
3104
  $time = time();
@@ -3106,6 +3200,7 @@ function cerber_do_hourly($force = false) {
3106
  if ( $days > 0 ) {
3107
  $wpdb->query( 'DELETE FROM ' . CERBER_LOG_TABLE . ' WHERE stamp < ' . ( $time - $days * 24 * 3600 ) );
3108
  }
 
3109
  if ( $wp_cerber->getSettings( 'cerberlab' ) ) {
3110
  cerber_push_lab();
3111
  }
@@ -3127,6 +3222,28 @@ function cerber_do_hourly($force = false) {
3127
  cerber_up_data();
3128
  }
3129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3130
  add_action( 'cerber_daily', 'cerber_do_daily' );
3131
  function cerber_do_daily() {
3132
  global $wpdb, $wp_cerber;
@@ -3135,11 +3252,7 @@ function cerber_do_daily() {
3135
 
3136
  $time = time();
3137
 
3138
- if ( $wp_cerber->getSettings( 'cerberlab' ) ) {
3139
- lab_check_nodes();
3140
- }
3141
-
3142
- lab_trunc_push();
3143
 
3144
  lab_validate_lic();
3145
 
@@ -3152,18 +3265,20 @@ function cerber_do_daily() {
3152
  $wpdb->query( 'OPTIMIZE TABLE ' . CERBER_LAB_IP_TABLE );
3153
  $wpdb->query( 'OPTIMIZE TABLE ' . CERBER_LAB_NET_TABLE );
3154
 
3155
- if ( $new = cerber_update_check() ) {
3156
  $history = get_site_option( '_cerber_notify_new' );
3157
  if ( ! $history || ! is_array( $history ) ) {
3158
  $history = array();
3159
  }
3160
- if ( ! in_array( $new['ver'], $history ) ) {
3161
  cerber_send_notify( 'new_version', 'Read more: https://wpcerber.com/?plugin_version=' . $new['ver'] );
3162
  $history[] = $new['ver'];
3163
  update_site_option( '_cerber_notify_new', $history );
3164
  }
3165
  }
3166
 
 
 
3167
  }
3168
 
3169
  /*
@@ -3187,27 +3302,6 @@ function cerber_plugin_file() {
3187
  return __FILE__;
3188
  }
3189
 
3190
- /**
3191
- * Format date according to user settings and timezone
3192
- *
3193
- * @param $timestamp int Unix timestamp
3194
- *
3195
- * @return string
3196
- */
3197
- function cerber_date( $timestamp ) {
3198
- global $wp_cerber;
3199
- $timestamp = absint( $timestamp );
3200
- $gmt_offset = get_option( 'gmt_offset' ) * 3600;
3201
- if ($df = $wp_cerber->getSettings('dateformat')){
3202
- return date_i18n( $df, $gmt_offset + $timestamp );
3203
- }
3204
- else {
3205
- $tf = get_option( 'time_format' );
3206
- $df = get_option( 'date_format' );
3207
- return date_i18n( $df, $gmt_offset + $timestamp ) . ', ' . date_i18n( $tf, $gmt_offset + $timestamp );
3208
- }
3209
- }
3210
-
3211
  /**
3212
  * Log activity
3213
  *
@@ -3378,11 +3472,18 @@ function cerber_log( $activity, $login = '', $user_id = 0, $ip = null ) {
3378
  return $ret;
3379
  }
3380
 
3381
- function cerber_count_log($activity = array()) {
3382
  global $wpdb;
3383
 
 
 
 
 
 
 
 
3384
  // TODO: replace with SELECT COUNT(DISTINCT session_id)
3385
- $ret = $wpdb->get_var('SELECT COUNT(ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN ('.implode(',',$activity).') AND stamp > '.(time() - 24 * 3600));
3386
  if (!$ret) $ret = 0;
3387
 
3388
  return $ret;
@@ -3514,29 +3615,11 @@ function cerber_upgrade_all() {
3514
  if ( ! $ver || $ver['v'] != CERBER_VER ) {
3515
  cerber_create_db();
3516
  cerber_upgrade_db();
3517
-
3518
  cerber_push_the_news( CERBER_VER );
3519
  cerber_acl_fixer();
3520
  cerber_antibot_gene();
3521
-
3522
- // Updating the plugin settings ----------------------------------------------
3523
-
3524
- // @since 4.4, migrating fields to a new option
3525
- $main = get_site_option( CERBER_OPT );
3526
- if (!empty($main['email']) || !empty($main['emailrate'])){
3527
- $new = get_site_option( CERBER_OPT_N, array() );
3528
- $new['email'] = $main['email'];
3529
- $new['emailrate'] = $main['emailrate'];
3530
- update_site_option( CERBER_OPT_N, $new );
3531
- // clean up old values
3532
- $main['email'] = '';
3533
- $main['emailrate'] = '';
3534
- update_site_option( CERBER_OPT, $main );
3535
- }
3536
-
3537
- // @since 5.6
3538
  cerber_upgrade_options();
3539
-
3540
  update_site_option( '_cerber_up', array( 'v' => CERBER_VER, 't' => time() ) );
3541
  }
3542
  }
2
  /*
3
  Plugin Name: WP Cerber Security & Antispam
4
  Plugin URI: https://wpcerber.com
5
+ Description: Protects site from brute force attacks, bots and hackers. Antispam protection with the Cerber antispam engine and reCAPTCHA. Comprehensive control of user activity. Restrict login by IP access lists. Limit login attempts. Know more: <a href="https://wpcerber.com">wpcerber.com</a>.
6
  Author: Gregory
7
  Author URI: https://wpcerber.com
8
+ Version: 5.8
9
  Text Domain: wp-cerber
10
  Domain Path: /languages
11
  Network: true
12
 
13
+ Copyright (C) 2015-17 CERBER TECH INC., Gregory Markov, https://wpcerber.com
14
  Flag icons - http://www.famfamfam.com
15
 
16
  Licenced under the GNU GPL.
61
  exit;
62
  }
63
 
64
+ define( 'CERBER_VER', '5.8' );
65
  define( 'CERBER_LOG_TABLE', 'cerber_log' );
66
  define( 'CERBER_ACL_TABLE', 'cerber_acl' );
67
  define( 'CERBER_BLOCKS_TABLE', 'cerber_blocks' );
621
  $wp_cerber = new WP_Cerber();
622
 
623
 
624
+ /**
625
+ *
626
+ * Initialize Cerber Security
627
+ *
628
  */
629
+ add_action( 'plugins_loaded', function () {
 
630
  global $wpdb, $wp_cerber;
631
 
632
  load_plugin_textdomain( 'wp-cerber', false, basename( dirname( __FILE__ ) ) . '/languages' );
639
  wp_clear_auth_cookie();
640
  }
641
 
642
+ cerber_init_cron();
 
 
 
 
 
643
 
644
  if ( isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET' ){
645
  $antibot = get_site_option( 'cerber-antibot', null );
650
  }
651
  }
652
 
653
+ __('> > > Translator of WP Cerber? To get the PRO license for free, drop your contacts here: https://wpcerber.com/contact/','wp-cerber');
654
+
655
+ }, 1000 );
656
 
657
  /**
658
  * Some additional tasks...
666
  }
667
 
668
  // Multiple different malicious activities
669
+ $black = crb_get_activity_set('black');
670
+ $no_good = array_intersect( $black, $cerber_logged );
671
  if ( ! empty( $no_good ) && cerber_is_allowed() ) {
672
  $ip = $wp_cerber->getRemoteIp();
673
  $in = implode( ',', $black );
690
  function cerber_wp_login_page() {
691
  global $wp_cerber;
692
  if ( $path = $wp_cerber->getSettings( 'loginpath' ) ) {
693
+ if ( cerber_is_login_request() ) {
694
+ define( 'DONOTCACHEPAGE', true ); // @since 5.7.6
695
+ require( ABSPATH . WP_LOGIN_SCRIPT ); // load default wp-login.php form
 
 
 
 
 
 
 
 
696
  exit;
697
  }
698
  }
699
  }
700
 
701
  /**
702
+ * Check if the current HTTP request is a login/register/lost password page request
703
  *
704
  * @return bool
705
  */
708
  if ( $path = $wp_cerber->getSettings( 'loginpath' ) ) {
709
  $request = $_SERVER['REQUEST_URI'];
710
  if ( $pos = strpos( $request, '?' ) ) {
 
 
711
  $request = substr( $request, 0, $pos - 1 ); // @since 4.8
712
  }
713
  $request = explode( '/', rtrim( $request, '/' ) );
714
+ $request = end( $request ); // @since 4.8
715
+ if ( $path == $request && ! cerber_is_rest_url() ) {
716
+ return true;
 
717
  }
718
  }
719
+ elseif ( strtolower( cerber_get_last_in_uri( true ) ) == WP_LOGIN_SCRIPT ) {
 
720
  return true;
721
  }
722
 
1143
  *
1144
  */
1145
  add_filter( 'pre_comment_approved', function ( $approved, $commentdata ) {
1146
+ if ( 1 == crb_get_settings( 'spamcomm' ) && ! cerber_is_comment_allowed() ) {
1147
  $approved = 'spam';
1148
  }
1149
 
1159
 
1160
  $deny = false;
1161
 
1162
+ if ( 1 != crb_get_settings( 'spamcomm' ) && ! cerber_is_comment_allowed() ) {
1163
  $deny = true;
1164
  }
1165
  elseif ( ! cerber_geo_allowed( 'geo_comment' ) ) {
1556
  *
1557
  */
1558
  function cerber_block_rest() {
1559
+ global $wp_version;
1560
  // OLD WP
1561
  add_filter( 'json_enabled', '__return_false' );
1562
  add_filter( 'json_jsonp_enabled', '__return_false' );
1563
+ // WP 4.4, deprecated since 4.7
1564
+ if ( version_compare( $wp_version, '4.7', '<' ) ) {
1565
+ add_filter( 'rest_enabled', '__return_false', 9999 );
1566
+ }
1567
  // WP 4.7
1568
  add_filter( 'rest_jsonp_enabled', '__return_false' );
1569
  // Links
1577
  remove_action( 'parse_request', 'rest_api_loaded' );
1578
 
1579
  if ( cerber_is_rest_url() ) {
1580
+ cerber_log( 70 );
1581
  cerber_404_page();
1582
  }
1583
  }
2150
  return false;
2151
  }
2152
 
2153
+ if ( cerber_acl_check( $ip ) ) {
2154
  return false;
2155
+ }
2156
 
2157
  $ip_address = $ip;
2158
 
2918
  }
2919
 
2920
  $to = cerber_get_email();
2921
+ $html_mode = false;
2922
 
2923
  $subj = '[' . get_option( 'blogname' ) . '] ' . __( 'WP Cerber notify', 'wp-cerber' ) . ': ';
2924
  $body = '';
3024
  $body = __( 'A new activity has been recorded', 'wp-cerber' ) . "\n\n";
3025
  $body .= $msg;
3026
  break;
3027
+ case 'report':
3028
+ $html_mode = true;
3029
+ $subj = '[' . get_option( 'blogname' ) . '] WP Cerber Security: ' . __( 'Weekly report', 'wp-cerber' );
3030
+ $body = cerber_generate_report();
3031
+ $link = cerber_admin_link( 'notifications' );
3032
+ $body .= '<br/>' . __( 'To change reporting settings visit', 'wp-cerber' ) . ' <a href="' . $link . '">' . $link . '</a>';
3033
+ if ($msg) {
3034
+ $body .= nl2br($msg);
3035
+ }
3036
+ break;
3037
  }
3038
 
3039
  $body_filtered = apply_filters( 'cerber_notify_body', $body, array( 'type' => $type,
3045
  $body = $body_filtered;
3046
  }
3047
 
3048
+ $footer = '';
3049
+
3050
+ if ( $lolink = cerber_get_login_url() ) {
3051
+ $lourl = urldecode( $lolink );
3052
+ if ( $html_mode ) {
3053
+ $lourl = '<a href="' . $lolink . '">' . $lourl . '</a>';
3054
+ }
3055
+ $footer .= "\n\n" . __( 'Your login page:', 'wp-cerber' ) . ' ' . $lourl;
3056
+ }
3057
+
3058
+ if ( $type == 'report' && $date = lab_lab() ) {
3059
+ $footer .= "\n\n" . __( 'Your license is valid until', 'wp-cerber' ) . ' ' . $date;
3060
+ }
3061
+
3062
+ $footer .= "\n\n\n" . __( 'This message was sent by', 'wp-cerber' ) . ' WP Cerber Security ' . CERBER_VER . "\n";
3063
+ $footer .= 'https://wpcerber.com';
3064
+
3065
+ if ( $html_mode ) {
3066
+ add_filter( 'wp_mail_content_type', 'cerber_enable_html' );
3067
+ //$footer = nl2br($footer);
3068
+ $footer = str_replace( "\n", '<br/>', $footer );
3069
+ }
3070
+
3071
+ $body .= $footer;
3072
 
3073
  if ( $to && $subj && $body ) {
3074
+ if ( ! $html_mode ) {
3075
+ cerber_pb_send( $subj, $body );
3076
+ }
3077
+ else {
3078
+ $body = '<html>' . $body . '</html>';
3079
+ }
3080
  $result = wp_mail( $to, $subj, $body );
3081
  }
3082
  else {
3083
  $result = false;
3084
  }
3085
 
3086
+ remove_filter('wp_mail_content_type', 'cerber_enable_html');
3087
+
3088
  $params = array( 'type' => $type, 'IP' => $ip, 'to' => $to, 'subject' => $subj );
3089
  if ( $result ) {
3090
  do_action( 'cerber_notify_sent', $body, $params );
3096
  return $result;
3097
  }
3098
 
3099
+ function cerber_enable_html() {
3100
+ return 'text/html';
3101
+ }
3102
 
3103
+ /**
3104
+ * Generates a performance report
3105
+ *
3106
+ * @param int $period Days to look back
3107
+ *
3108
+ * @return string
3109
+ */
3110
+ function cerber_generate_report($period = 7){
3111
+ global $wpdb;
3112
+
3113
+ $period = absint( $period );
3114
+
3115
+ if ( ! $period ) {
3116
+ $period = 7;
3117
+ }
3118
+
3119
+ $ret = '';
3120
+ $rows = array();
3121
+ $stamp = time() - $period * 24 * 3600;
3122
+ //$in = implode( ',', crb_get_activity_set( 'malicious' ) );
3123
+ //$link_base = '<a href="' . cerber_activity_link( array( 2 ) ) . '">';
3124
+ $base_url = cerber_admin_link( 'activity' );
3125
+ $css_table = 'width: 95%; max-width: 1000px; margin:0 auto; margin-bottom: 10px; background-color: #f5f5f5; text-align: center;';
3126
+ $css_td = 'padding: 0.5em 0.5em 0.5em 1em; text-align: left;';
3127
+ $css_boder = 'border-bottom: solid 2px #f9f9f9;';
3128
+
3129
+ if (is_multisite()) {
3130
+ $site_name = get_site_option( 'site_name' );
3131
+ }
3132
+ else {
3133
+ $site_name = get_option( 'blogname' );
3134
+ }
3135
+
3136
+ $ret .= '<div style="' . $css_table . '"><div style="margin:0 auto; text-align: center;"><p style="font-size: 130%; padding-top: 0.5em;">' . $site_name .'</p><p style="padding-bottom: 1em;">'. __('Weekly report','wp-cerber'). '</p></div></div>';
3137
+
3138
+ $kpi_list = cerber_calculate_kpi( $period );
3139
+
3140
+ foreach ($kpi_list as $kpi){
3141
+ $rows[] = '<td style="'.$css_td.' text-align: right;">'.$kpi[1].'</td><td style="padding: 0.5em; text-align: left;">'.$kpi[0].'</td>';
3142
+ }
3143
+
3144
+ $ret .= '<div style="text-align: center; '.$css_table.'"><table style="font-size: 130%; margin:0 auto;"><tr>' . implode( '</tr><tr>', $rows ) . '</tr></table></div>';
3145
+
3146
+ // Activities counters
3147
+ $rows = array();
3148
+ $rows[] = '<td style="'.$css_td.$css_boder.'" colspan="2"><p style="margin-bottom: 2em; font-weight: bold;">'.__('Activity details','wp-cerber').'</p></td>';
3149
+ $activites = $wpdb->get_results( 'SELECT activity, COUNT(activity) cnt FROM ' . CERBER_LOG_TABLE . ' WHERE stamp > ' . $stamp . ' GROUP by activity ORDER BY cnt DESC' );
3150
+ if ( $activites ) {
3151
+ $lables = cerber_get_labels();
3152
+ foreach ( $activites as $a ) {
3153
+ $rows[] = '<td style="'.$css_boder.$css_td.'">' . $lables[ $a->activity ] . '</td><td style="padding: 0.5em; text-align: center; '.$css_boder.'"><a href="'.$base_url.'&filter_activity='.$a->activity.'">' . $a->cnt . '</a></td>';
3154
+ }
3155
+ }
3156
+ $ret .= '<table style="border-collapse: collapse; '.$css_table.'"><tr>' . implode( '</tr><tr>', $rows ) . '</tr></table>';
3157
+
3158
+ $ret = '<div style="width:100%; padding: 1em; text-align: center; background-color: #f9f9f9;">' . $ret . '</div>';
3159
+
3160
+ return $ret;
3161
  }
3162
+
3163
 
3164
  // Maintenance routines ----------------------------------------------------------------
3165
 
3166
+ function cerber_init_cron(){
3167
+ $next_hour = floor( ( time() + 3600 ) / 3600 ) * 3600;
3168
+
3169
+ if ( ! wp_next_scheduled( 'cerber_hourly_1' ) ) {
3170
+ wp_schedule_event( $next_hour + 600, 'hourly', 'cerber_hourly_1' );
3171
+ }
3172
+
3173
+ if ( ! wp_next_scheduled( 'cerber_hourly_2' ) ) {
3174
+ wp_schedule_event( $next_hour , 'hourly', 'cerber_hourly_2' );
3175
+ }
3176
+
3177
+ if ( ! wp_next_scheduled( 'cerber_daily' ) ) {
3178
+ wp_schedule_event( $next_hour + 3600, 'daily', 'cerber_daily' );
3179
+ }
3180
+ }
3181
+
3182
+ add_action( 'cerber_hourly_1', 'cerber_do_hourly' );
3183
  function cerber_do_hourly($force = false) {
3184
  global $wpdb, $wp_cerber;
3185
 
3186
+ if (is_multisite()) {
3187
+ if ( ! $force && get_site_transient( 'cerber_multisite' ) ) {
3188
+ return;
3189
+ }
3190
+ set_site_transient( 'cerber_multisite', 'executed', 3600 );
3191
+ }
3192
+
3193
+ if ( $wp_cerber->getSettings( 'cerberlab' ) ) {
3194
+ lab_check_nodes();
3195
  }
 
3196
 
3197
  $days = absint( $wp_cerber->getSettings( 'keeplog' ) );
3198
  $time = time();
3200
  if ( $days > 0 ) {
3201
  $wpdb->query( 'DELETE FROM ' . CERBER_LOG_TABLE . ' WHERE stamp < ' . ( $time - $days * 24 * 3600 ) );
3202
  }
3203
+
3204
  if ( $wp_cerber->getSettings( 'cerberlab' ) ) {
3205
  cerber_push_lab();
3206
  }
3222
  cerber_up_data();
3223
  }
3224
 
3225
+ add_action( 'cerber_hourly_2', function () {
3226
+
3227
+ if (is_multisite()) {
3228
+ if ( get_site_transient( 'cerber_multisite2' ) ) {
3229
+ return;
3230
+ }
3231
+ set_site_transient( 'cerber_multisite2', 'executed', 3600 );
3232
+ }
3233
+
3234
+ $gmt_offset = get_option( 'gmt_offset' ) * 3600;
3235
+
3236
+ if ( date( 'w', time() + $gmt_offset ) == crb_get_settings( 'wreports-day' )
3237
+ && date( 'G', time() + $gmt_offset ) == crb_get_settings( 'wreports-time' )
3238
+ //&& ! get_site_transient( 'cerber_wreport' )
3239
+ ) {
3240
+ $result = cerber_send_notify( 'report' );
3241
+ //set_site_transient( 'cerber_wreport', 'sent', 7200 );
3242
+ update_site_option( '_cerber_report', array( time(), $result ) );
3243
+ }
3244
+
3245
+ });
3246
+
3247
  add_action( 'cerber_daily', 'cerber_do_daily' );
3248
  function cerber_do_daily() {
3249
  global $wpdb, $wp_cerber;
3252
 
3253
  $time = time();
3254
 
3255
+ lab_trunc_push();
 
 
 
 
3256
 
3257
  lab_validate_lic();
3258
 
3265
  $wpdb->query( 'OPTIMIZE TABLE ' . CERBER_LAB_IP_TABLE );
3266
  $wpdb->query( 'OPTIMIZE TABLE ' . CERBER_LAB_NET_TABLE );
3267
 
3268
+ if ( $new = cerber_check_version() ) {
3269
  $history = get_site_option( '_cerber_notify_new' );
3270
  if ( ! $history || ! is_array( $history ) ) {
3271
  $history = array();
3272
  }
3273
+ if ( !in_array( $new['ver'], $history ) ) {
3274
  cerber_send_notify( 'new_version', 'Read more: https://wpcerber.com/?plugin_version=' . $new['ver'] );
3275
  $history[] = $new['ver'];
3276
  update_site_option( '_cerber_notify_new', $history );
3277
  }
3278
  }
3279
 
3280
+ // TODO: implement holding previous values for a while
3281
+ // cerber_antibot_gene();
3282
  }
3283
 
3284
  /*
3302
  return __FILE__;
3303
  }
3304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3305
  /**
3306
  * Log activity
3307
  *
3472
  return $ret;
3473
  }
3474
 
3475
+ function cerber_count_log($activity = array(), $period = 1) {
3476
  global $wpdb;
3477
 
3478
+ $period = absint( $period );
3479
+ if ( ! $period ) {
3480
+ $period = 1;
3481
+ }
3482
+
3483
+ $stamp = time() - $period * 24 * 3600;
3484
+
3485
  // TODO: replace with SELECT COUNT(DISTINCT session_id)
3486
+ $ret = $wpdb->get_var('SELECT COUNT(ip) FROM '. CERBER_LOG_TABLE .' WHERE activity IN ('.implode(',',$activity).') AND stamp > '. $stamp);
3487
  if (!$ret) $ret = 0;
3488
 
3489
  return $ret;
3615
  if ( ! $ver || $ver['v'] != CERBER_VER ) {
3616
  cerber_create_db();
3617
  cerber_upgrade_db();
 
3618
  cerber_push_the_news( CERBER_VER );
3619
  cerber_acl_fixer();
3620
  cerber_antibot_gene();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3621
  cerber_upgrade_options();
3622
+ wp_clear_scheduled_hook( 'cerber_hourly' ); // @since 5.8
3623
  update_site_option( '_cerber_up', array( 'v' => CERBER_VER, 't' => time() ) );
3624
  }
3625
  }