Version Description
- Improvement: Improvement: IPv6 support for both whitelisting and blacklisting, requires IPv6 support on the server.
- Improvement: Better UI/UX for Two-factor authentication.
- Fix: Security tweak "Prevent PHP Execution" and "Protect Information" now support Apache 2.4 htaccess rules.
- Other minor enhancements/fixes
Download this release
Release Info
Developer | hoang1213 |
Plugin | Defender Security – Malware Scanner, Login Security & Firewall |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- app/behavior/blacklist-free.php +5 -5
- app/behavior/report-free.php +12 -12
- app/behavior/utils.php +7 -7
- app/controller/dashboard.php +8 -8
- app/controller/debug.php +1 -1
- app/controller/requirement.php +8 -8
- app/module/advanced-tools/behavior/at-widget.php +30 -11
- app/module/advanced-tools/controller/main.php +18 -17
- app/module/advanced-tools/view/disabled.php +3 -3
- app/module/advanced-tools/view/layouts/layout.php +3 -3
- app/module/advanced-tools/view/login/disabled.php +13 -13
- app/module/advanced-tools/view/login/enabled.php +6 -6
- app/module/advanced-tools/view/login/otp.php +3 -3
- app/module/advanced-tools/view/main.php +40 -17
- app/module/audit/behavior/audit-free.php +4 -4
- app/module/audit/controller/main-free.php +1 -1
- app/module/audit/view/free.php +4 -4
- app/module/audit/view/pro-feature.php +12 -12
- app/module/hardener/behavior/widget.php +5 -5
- app/module/hardener/component/change-admin-service.php +4 -4
- app/module/hardener/component/change-admin.php +2 -2
- app/module/hardener/component/db-prefix-service.php +8 -8
- app/module/hardener/component/db-prefix.php +1 -1
- app/module/hardener/component/disable-file-editor-service.php +3 -3
- app/module/hardener/component/disable-file-editor.php +1 -1
- app/module/hardener/component/disable-trackback.php +1 -1
- app/module/hardener/component/hide-error-service.php +4 -4
- app/module/hardener/component/hide-error.php +1 -1
- app/module/hardener/component/login-duration.php +3 -3
- app/module/hardener/component/php-version.php +1 -1
- app/module/hardener/component/prevent-php-service.php +2 -3
- app/module/hardener/component/prevent-php.php +15 -12
- app/module/hardener/component/protect-information-service.php +43 -23
- app/module/hardener/component/protect-information.php +1 -1
- app/module/hardener/component/security-key-service.php +2 -2
- app/module/hardener/component/security-key.php +2 -2
- app/module/hardener/component/servers/apache-service.php +63 -30
- app/module/hardener/component/servers/iis-service.php +1 -1
- app/module/hardener/component/wp-version.php +1 -1
- app/module/hardener/controller/main.php +6 -6
- app/module/hardener/rule.php +2 -2
- app/module/hardener/view/ignore.php +3 -3
- app/module/hardener/view/issues.php +3 -3
- app/module/hardener/view/layouts/layout.php +14 -14
- app/module/hardener/view/resolved.php +2 -2
- app/module/hardener/view/rules/change-admin.php +8 -8
- app/module/hardener/view/rules/db-prefix.php +8 -8
- app/module/hardener/view/rules/disable-file-editor.php +8 -8
- app/module/hardener/view/rules/disable-trackback.php +10 -10
- app/module/hardener/view/rules/hide-error.php +8 -8
- app/module/hardener/view/rules/login-duration.php +8 -8
- app/module/hardener/view/rules/php-version.php +9 -9
- app/module/hardener/view/rules/prevent-php-executed.php +25 -25
- app/module/hardener/view/rules/protect-information.php +19 -24
- app/module/hardener/view/rules/security-key.php +14 -14
- app/module/hardener/view/rules/wp-version.php +8 -8
- app/module/ip-lockout.php +4 -4
- app/module/ip-lockout/behavior/widget.php +10 -10
- app/module/ip-lockout/component/ip-api.php +51 -9
- app/module/ip-lockout/component/login-protection-api.php +9 -9
- app/module/ip-lockout/component/logs-table.php +17 -17
- app/module/ip-lockout/controller/main.php +26 -25
- app/module/ip-lockout/model/log-model-legacy.php +6 -6
- app/module/ip-lockout/model/log-model.php +6 -6
- app/module/ip-lockout/model/settings.php +45 -24
- app/module/ip-lockout/view/blacklist/enabled.php +20 -20
- app/module/ip-lockout/view/detect-404/disabled.php +3 -3
- app/module/ip-lockout/view/detect-404/enabled.php +25 -25
- app/module/ip-lockout/view/emails/404-lockout.php +16 -16
- app/module/ip-lockout/view/emails/login-lockout.php +17 -17
- app/module/ip-lockout/view/emails/login-username-ban.php +17 -17
- app/module/ip-lockout/view/emails/report.php +22 -22
- app/module/ip-lockout/view/layouts/layout.php +20 -20
- app/module/ip-lockout/view/locked.php +3 -3
- app/module/ip-lockout/view/logging/enabled.php +2 -2
- app/module/ip-lockout/view/login-lockouts/disabled.php +3 -3
- app/module/ip-lockout/view/login-lockouts/enabled.php +20 -20
- app/module/ip-lockout/view/migration.php +2 -2
- app/module/ip-lockout/view/notification/enabled.php +28 -28
- app/module/ip-lockout/view/notification/report-free.php +15 -15
- app/module/ip-lockout/view/notification/report.php +16 -16
- app/module/ip-lockout/view/pro-feature.php +12 -12
- app/module/ip-lockout/view/settings.php +10 -10
- app/module/scan.php +4 -4
- app/module/scan/behavior/core-result.php +25 -25
- app/module/scan/behavior/scan.php +20 -20
- app/module/scan/component/result-table.php +14 -14
- app/module/scan/component/scan-api.php +6 -6
- app/module/scan/controller/main.php +26 -25
- app/module/scan/model/settings.php +3 -3
- app/module/scan/view/automation-free.php +13 -13
- app/module/scan/view/automation.php +14 -14
- app/module/scan/view/cleaned.php +2 -2
- app/module/scan/view/email-template.php +8 -8
- app/module/scan/view/ignored.php +3 -3
- app/module/scan/view/issues.php +8 -8
- app/module/scan/view/layouts/layout.php +23 -23
- app/module/scan/view/new.php +3 -3
- app/module/scan/view/pro-feature.php +12 -12
- app/module/scan/view/scanning.php +5 -5
- app/module/scan/view/setting-free.php +32 -32
- app/module/scan/view/setting.php +31 -31
- app/view/activator-free.php +9 -9
- app/view/activator.php +13 -13
- app/view/dashboard.php +13 -13
- app/view/pro-feature.php +12 -12
- app/view/requirement.php +1 -1
- app/view/settings.php +39 -39
- assets/css/styles.css +20 -1
- changelog.txt +7 -0
- languages/wpdef-default.pot +144 -103
- main-activator.php +6 -6
- readme.txt +9 -3
- vendor/email-search.php +6 -6
- wp-defender.php +8 -3
app/behavior/blacklist-free.php
CHANGED
@@ -18,19 +18,19 @@ class Blacklist_Free extends Behavior {
|
|
18 |
<div class="dev-box">
|
19 |
<div class="box-title">
|
20 |
<span class="span-icon icon-blacklist"></span>
|
21 |
-
<h3><?php _e( "BLACKLIST MONITOR",
|
22 |
<a href="#pro-feature" rel="dialog"
|
23 |
class="button button-small button-pre"
|
24 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
25 |
-
<?php _e( "PRO FEATURE",
|
26 |
</div>
|
27 |
<div class="box-content">
|
28 |
<div class="line">
|
29 |
<?php _e( "Automatically check if you’re on Google’s blacklist every 6 hours. If something’s
|
30 |
-
wrong, we’ll let you know via email.",
|
31 |
</div>
|
32 |
<a href="#pro-feature" rel="dialog"
|
33 |
-
class="button button-green button-small"><?php esc_html_e( "Upgrade to Pro",
|
34 |
</div>
|
35 |
</div>
|
36 |
<?php
|
18 |
<div class="dev-box">
|
19 |
<div class="box-title">
|
20 |
<span class="span-icon icon-blacklist"></span>
|
21 |
+
<h3><?php _e( "BLACKLIST MONITOR", "defender-security" ) ?></h3>
|
22 |
<a href="#pro-feature" rel="dialog"
|
23 |
class="button button-small button-pre"
|
24 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>">
|
25 |
+
<?php _e( "PRO FEATURE", "defender-security" ) ?></a>
|
26 |
</div>
|
27 |
<div class="box-content">
|
28 |
<div class="line">
|
29 |
<?php _e( "Automatically check if you’re on Google’s blacklist every 6 hours. If something’s
|
30 |
+
wrong, we’ll let you know via email.", "defender-security" ) ?>
|
31 |
</div>
|
32 |
<a href="#pro-feature" rel="dialog"
|
33 |
+
class="button button-green button-small"><?php esc_html_e( "Upgrade to Pro", "defender-security" ) ?></a>
|
34 |
</div>
|
35 |
</div>
|
36 |
<?php
|
app/behavior/report-free.php
CHANGED
@@ -14,19 +14,19 @@ class Report_Free extends Behavior {
|
|
14 |
<div class="dev-box reporting-sale">
|
15 |
<div class="box-title">
|
16 |
<span class="span-icon icon-report"></span>
|
17 |
-
<h3><?php _e( "REPORTING",
|
18 |
</div>
|
19 |
<div class="box-content">
|
20 |
<div class="line">
|
21 |
<?php _e( "Get tailored security reports delivered to your inbox so you don’t have to worry
|
22 |
-
about checking in.",
|
23 |
</div>
|
24 |
<div class="row is_multiline">
|
25 |
<div class="col-half">
|
26 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>">
|
27 |
<div class="report-status with-corner">
|
28 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/scanning-pre.svg">
|
29 |
-
<strong><?php _e( "FILE SCANNING",
|
30 |
<div class="corner">
|
31 |
Pro
|
32 |
</div>
|
@@ -37,7 +37,7 @@ class Report_Free extends Behavior {
|
|
37 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-logging&view=report' ) ?>">
|
38 |
<div class="report-status with-corner">
|
39 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/audit-pre.svg">
|
40 |
-
<strong><?php _e( "AUDIT LOGGING",
|
41 |
<div class="corner">
|
42 |
Pro
|
43 |
</div>
|
@@ -48,7 +48,7 @@ class Report_Free extends Behavior {
|
|
48 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>">
|
49 |
<div class="report-status with-corner">
|
50 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/lockout-pre.svg">
|
51 |
-
<strong><?php _e( "IP LOCKOUTS",
|
52 |
<div class="corner">
|
53 |
Pro
|
54 |
</div>
|
@@ -60,7 +60,7 @@ class Report_Free extends Behavior {
|
|
60 |
<div>
|
61 |
<?php printf( __( " Automated reports are included in a WPMU DEV membership along with 100+ plugins
|
62 |
& themes, 24/7 support and lots of handy site management tools – <a target='_blank' href=\"%s\">Try
|
63 |
-
it all absolutely FREE</a>",
|
64 |
</div>
|
65 |
</div>
|
66 |
<div class="clear"></div>
|
@@ -80,7 +80,7 @@ class Report_Free extends Behavior {
|
|
80 |
return null;
|
81 |
}
|
82 |
|
83 |
-
$toolstip = sprintf( __( "Scan reports are active scheduled to send %s",
|
84 |
$settings->frequency == 1 ? $this->frequencyToText( $settings->frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) : $this->frequencyToText( $settings->frequency ) . '/' . $settings->day . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) );
|
85 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
86 |
|
@@ -95,7 +95,7 @@ class Report_Free extends Behavior {
|
|
95 |
return null;
|
96 |
}
|
97 |
|
98 |
-
$toolstip = sprintf( __( "Audit reports are active scheduled to send %s",
|
99 |
$settings->frequency == 1 ? $this->frequencyToText( $settings->frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) : $this->frequencyToText( $settings->frequency ) . '/' . $settings->day . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) );
|
100 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
101 |
|
@@ -110,7 +110,7 @@ class Report_Free extends Behavior {
|
|
110 |
return null;
|
111 |
}
|
112 |
|
113 |
-
$toolstip = sprintf( __( "Lockout reports are active scheduled to send %s",
|
114 |
$settings->report_frequency == 1 ? $this->frequencyToText( $settings->report_frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->report_time ) ) : $this->frequencyToText( $settings->report_frequency ) . '/' . $settings->report_day . '/' . strftime( '%I:%M %p', strtotime( $settings->report_time ) ) );
|
115 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
116 |
|
@@ -126,13 +126,13 @@ class Report_Free extends Behavior {
|
|
126 |
$text = '';
|
127 |
switch ( $freq ) {
|
128 |
case 1:
|
129 |
-
$text = __( "daily",
|
130 |
break;
|
131 |
case 7:
|
132 |
-
$text = __( "weekly",
|
133 |
break;
|
134 |
case 30:
|
135 |
-
$text = __( "monthly",
|
136 |
break;
|
137 |
}
|
138 |
|
14 |
<div class="dev-box reporting-sale">
|
15 |
<div class="box-title">
|
16 |
<span class="span-icon icon-report"></span>
|
17 |
+
<h3><?php _e( "REPORTING", "defender-security" ) ?></h3>
|
18 |
</div>
|
19 |
<div class="box-content">
|
20 |
<div class="line">
|
21 |
<?php _e( "Get tailored security reports delivered to your inbox so you don’t have to worry
|
22 |
+
about checking in.", "defender-security" ) ?>
|
23 |
</div>
|
24 |
<div class="row is_multiline">
|
25 |
<div class="col-half">
|
26 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>">
|
27 |
<div class="report-status with-corner">
|
28 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/scanning-pre.svg">
|
29 |
+
<strong><?php _e( "FILE SCANNING", "defender-security" ) ?></strong>
|
30 |
<div class="corner">
|
31 |
Pro
|
32 |
</div>
|
37 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-logging&view=report' ) ?>">
|
38 |
<div class="report-status with-corner">
|
39 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/audit-pre.svg">
|
40 |
+
<strong><?php _e( "AUDIT LOGGING", "defender-security" ) ?></strong>
|
41 |
<div class="corner">
|
42 |
Pro
|
43 |
</div>
|
48 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>">
|
49 |
<div class="report-status with-corner">
|
50 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/lockout-pre.svg">
|
51 |
+
<strong><?php _e( "IP LOCKOUTS", "defender-security" ) ?></strong>
|
52 |
<div class="corner">
|
53 |
Pro
|
54 |
</div>
|
60 |
<div>
|
61 |
<?php printf( __( " Automated reports are included in a WPMU DEV membership along with 100+ plugins
|
62 |
& themes, 24/7 support and lots of handy site management tools – <a target='_blank' href=\"%s\">Try
|
63 |
+
it all absolutely FREE</a>", "defender-security" ), 'https://premium.wpmudev.org/project/wp-defender/' ) ?>
|
64 |
</div>
|
65 |
</div>
|
66 |
<div class="clear"></div>
|
80 |
return null;
|
81 |
}
|
82 |
|
83 |
+
$toolstip = sprintf( __( "Scan reports are active scheduled to send %s", "defender-security" ),
|
84 |
$settings->frequency == 1 ? $this->frequencyToText( $settings->frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) : $this->frequencyToText( $settings->frequency ) . '/' . $settings->day . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) );
|
85 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
86 |
|
95 |
return null;
|
96 |
}
|
97 |
|
98 |
+
$toolstip = sprintf( __( "Audit reports are active scheduled to send %s", "defender-security" ),
|
99 |
$settings->frequency == 1 ? $this->frequencyToText( $settings->frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) : $this->frequencyToText( $settings->frequency ) . '/' . $settings->day . '/' . strftime( '%I:%M %p', strtotime( $settings->time ) ) );
|
100 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
101 |
|
110 |
return null;
|
111 |
}
|
112 |
|
113 |
+
$toolstip = sprintf( __( "Lockout reports are active scheduled to send %s", "defender-security" ),
|
114 |
$settings->report_frequency == 1 ? $this->frequencyToText( $settings->report_frequency ) . '/' . strftime( '%I:%M %p', strtotime( $settings->report_time ) ) : $this->frequencyToText( $settings->report_frequency ) . '/' . $settings->report_day . '/' . strftime( '%I:%M %p', strtotime( $settings->report_time ) ) );
|
115 |
$toolstip = strlen( $toolstip ) ? ' tooltip="' . esc_attr( $toolstip ) . '" ' : null;
|
116 |
|
126 |
$text = '';
|
127 |
switch ( $freq ) {
|
128 |
case 1:
|
129 |
+
$text = __( "daily", "defender-security" );
|
130 |
break;
|
131 |
case 7:
|
132 |
+
$text = __( "weekly", "defender-security" );
|
133 |
break;
|
134 |
case 30:
|
135 |
+
$text = __( "monthly", "defender-security" );
|
136 |
break;
|
137 |
}
|
138 |
|
app/behavior/utils.php
CHANGED
@@ -75,7 +75,7 @@ class Utils extends Behavior {
|
|
75 |
}
|
76 |
} else {
|
77 |
return new \WP_Error( 'dashboard_required',
|
78 |
-
sprintf( esc_html__( "WPMU DEV Dashboard will be required for this action. Please visit <a href=\"%s\">here</a> and install the WPMU DEV Dashboard",
|
79 |
, 'https://premium.wpmudev.org/project/wpmu-dev-dashboard/' ) );
|
80 |
}
|
81 |
}
|
@@ -176,7 +176,7 @@ class Utils extends Behavior {
|
|
176 |
*/
|
177 |
public function getDisplayName( $user_id = null ) {
|
178 |
if ( ! is_user_logged_in() && is_null( $user_id ) ) {
|
179 |
-
return esc_html__( "Guest",
|
180 |
}
|
181 |
|
182 |
if ( is_null( $user_id ) ) {
|
@@ -185,7 +185,7 @@ class Utils extends Behavior {
|
|
185 |
|
186 |
$userdata = get_userdata( $user_id );
|
187 |
if ( ! is_object( $userdata ) ) {
|
188 |
-
return __( "Guest",
|
189 |
}
|
190 |
|
191 |
$fullname = trim( $userdata->first_name . ' ' . $userdata->last_name );
|
@@ -636,7 +636,7 @@ class Utils extends Behavior {
|
|
636 |
$meet = false;
|
637 |
$result['php'] = array(
|
638 |
'status' => $this->getPHPVersion(),
|
639 |
-
'message' => __( "Please upgrade to 5.3 or later",
|
640 |
);
|
641 |
}
|
642 |
|
@@ -653,13 +653,13 @@ class Utils extends Behavior {
|
|
653 |
$text = '';
|
654 |
switch ( $freq ) {
|
655 |
case 1:
|
656 |
-
$text = __( "daily",
|
657 |
break;
|
658 |
case 7:
|
659 |
-
$text = __( "weekly",
|
660 |
break;
|
661 |
case 30:
|
662 |
-
$text = __( "monthly",
|
663 |
break;
|
664 |
}
|
665 |
|
75 |
}
|
76 |
} else {
|
77 |
return new \WP_Error( 'dashboard_required',
|
78 |
+
sprintf( esc_html__( "WPMU DEV Dashboard will be required for this action. Please visit <a href=\"%s\">here</a> and install the WPMU DEV Dashboard", "defender-security" )
|
79 |
, 'https://premium.wpmudev.org/project/wpmu-dev-dashboard/' ) );
|
80 |
}
|
81 |
}
|
176 |
*/
|
177 |
public function getDisplayName( $user_id = null ) {
|
178 |
if ( ! is_user_logged_in() && is_null( $user_id ) ) {
|
179 |
+
return esc_html__( "Guest", "defender-security" );
|
180 |
}
|
181 |
|
182 |
if ( is_null( $user_id ) ) {
|
185 |
|
186 |
$userdata = get_userdata( $user_id );
|
187 |
if ( ! is_object( $userdata ) ) {
|
188 |
+
return __( "Guest", "defender-security" );
|
189 |
}
|
190 |
|
191 |
$fullname = trim( $userdata->first_name . ' ' . $userdata->last_name );
|
636 |
$meet = false;
|
637 |
$result['php'] = array(
|
638 |
'status' => $this->getPHPVersion(),
|
639 |
+
'message' => __( "Please upgrade to 5.3 or later", "defender-security" )
|
640 |
);
|
641 |
}
|
642 |
|
653 |
$text = '';
|
654 |
switch ( $freq ) {
|
655 |
case 1:
|
656 |
+
$text = __( "daily", "defender-security" );
|
657 |
break;
|
658 |
case 7:
|
659 |
+
$text = __( "weekly", "defender-security" );
|
660 |
break;
|
661 |
case 30:
|
662 |
+
$text = __( "monthly", "defender-security" );
|
663 |
break;
|
664 |
}
|
665 |
|
app/controller/dashboard.php
CHANGED
@@ -57,7 +57,7 @@ class Dashboard extends Controller {
|
|
57 |
if ( isset( $submenu['wp-defender'] ) ) {
|
58 |
$defender_menu = $submenu['wp-defender'];
|
59 |
//$defender_menu[6][4] = 'wd-menu-hide';
|
60 |
-
$defender_menu[0][0] = esc_html__( "Dashboard",
|
61 |
$defender_menu = array_values( $defender_menu );
|
62 |
$submenu['wp-defender'] = $defender_menu;
|
63 |
}
|
@@ -303,9 +303,9 @@ class Dashboard extends Controller {
|
|
303 |
*/
|
304 |
public function admin_menu() {
|
305 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
306 |
-
$menu_title = esc_html__( "Defender",
|
307 |
//$menu_title = sprintf( $menu_title, $indicator );
|
308 |
-
add_menu_page( esc_html__( "Defender",
|
309 |
&$this,
|
310 |
'actionIndex'
|
311 |
), $this->get_menu_icon() );
|
@@ -337,11 +337,11 @@ class Dashboard extends Controller {
|
|
337 |
\WDEV_Plugin_Ui::load( wp_defender()->getPluginUrl() . 'shared-ui/' );
|
338 |
wp_enqueue_script( 'defender' );
|
339 |
$data = array(
|
340 |
-
'activator_title' => __( "QUICK SETUP",
|
341 |
-
'activate_scan' => __( "Activating File Scanning...",
|
342 |
-
'activate_audit' => __( "Activating Audit Module...",
|
343 |
-
'activate_lockout' => __( "Activating IP Lockouts Module...",
|
344 |
-
'activate_blacklist' => __( "Activating Blacklist Monitoring...",
|
345 |
);
|
346 |
wp_enqueue_style( 'defender' );
|
347 |
wp_localize_script( 'defender', 'dashboard', $data );
|
57 |
if ( isset( $submenu['wp-defender'] ) ) {
|
58 |
$defender_menu = $submenu['wp-defender'];
|
59 |
//$defender_menu[6][4] = 'wd-menu-hide';
|
60 |
+
$defender_menu[0][0] = esc_html__( "Dashboard", "defender-security" );
|
61 |
$defender_menu = array_values( $defender_menu );
|
62 |
$submenu['wp-defender'] = $defender_menu;
|
63 |
}
|
303 |
*/
|
304 |
public function admin_menu() {
|
305 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
306 |
+
$menu_title = esc_html__( "Defender", "defender-security" );
|
307 |
//$menu_title = sprintf( $menu_title, $indicator );
|
308 |
+
add_menu_page( esc_html__( "Defender", "defender-security" ), $menu_title, $cap, 'wp-defender', array(
|
309 |
&$this,
|
310 |
'actionIndex'
|
311 |
), $this->get_menu_icon() );
|
337 |
\WDEV_Plugin_Ui::load( wp_defender()->getPluginUrl() . 'shared-ui/' );
|
338 |
wp_enqueue_script( 'defender' );
|
339 |
$data = array(
|
340 |
+
'activator_title' => __( "QUICK SETUP", "defender-security" ) . '<form method="post" class="skip-activator float-r"><input type="hidden" name="action" value="skipActivator"/>' . wp_nonce_field( 'skipActivator', '_wpnonce', true, false ) . '<button type="submit" class="button button-small button-secondary">' . __( "Skip", "defender-security" ) . '</button></form>',
|
341 |
+
'activate_scan' => __( "Activating File Scanning...", "defender-security" ),
|
342 |
+
'activate_audit' => __( "Activating Audit Module...", "defender-security" ),
|
343 |
+
'activate_lockout' => __( "Activating IP Lockouts Module...", "defender-security" ),
|
344 |
+
'activate_blacklist' => __( "Activating Blacklist Monitoring...", "defender-security" )
|
345 |
);
|
346 |
wp_enqueue_style( 'defender' );
|
347 |
wp_localize_script( 'defender', 'dashboard', $data );
|
app/controller/debug.php
CHANGED
@@ -28,7 +28,7 @@ class Debug extends Controller {
|
|
28 |
*/
|
29 |
public function adminMenu() {
|
30 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
31 |
-
add_submenu_page( 'wp-defender', esc_html__( "Debug",
|
32 |
&$this,
|
33 |
'actionIndex'
|
34 |
) );
|
28 |
*/
|
29 |
public function adminMenu() {
|
30 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
31 |
+
add_submenu_page( 'wp-defender', esc_html__( "Debug", "defender-security" ), esc_html__( "Debug", "defender-security" ), $cap, $this->slug, array(
|
32 |
&$this,
|
33 |
'actionIndex'
|
34 |
) );
|
app/controller/requirement.php
CHANGED
@@ -34,22 +34,22 @@ class WD_Requirement {
|
|
34 |
</h2>
|
35 |
</div>
|
36 |
</div>
|
37 |
-
<dialog id="requirement" title="<?php esc_attr_e( "Required Modules",
|
38 |
<div class="line">
|
39 |
-
<?php _e( "It looks like some required PHP modules are missing or outdated. We recommend you get in touch with your web hosting service to update the modules listed below.",
|
40 |
</div>
|
41 |
<table class="table">
|
42 |
<thead>
|
43 |
<tr>
|
44 |
-
<th><?php _e( "Module",
|
45 |
-
<th><?php _e( "Version",
|
46 |
</tr>
|
47 |
</thead>
|
48 |
<tbody>
|
49 |
<tr>
|
50 |
-
<td><?php _e( "PHP version",
|
51 |
<td>
|
52 |
-
<span class="def-tag tag-yellow"><?php echo phpversion() ?></span> <?php _e( "Please upgrade to 5.3 or later.",
|
53 |
</td>
|
54 |
</tr>
|
55 |
</tbody>
|
@@ -64,9 +64,9 @@ class WD_Requirement {
|
|
64 |
*/
|
65 |
public function admin_menu() {
|
66 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
67 |
-
$menu_title = esc_html__( "Defender%s",
|
68 |
$menu_title = sprintf( $menu_title, ' <span class="update-plugins wd-issue-indicator-sidebar"></span>' );
|
69 |
-
add_menu_page( esc_html__( "Defender",
|
70 |
&$this,
|
71 |
'actionIndex'
|
72 |
), $this->get_menu_icon() );
|
34 |
</h2>
|
35 |
</div>
|
36 |
</div>
|
37 |
+
<dialog id="requirement" title="<?php esc_attr_e( "Required Modules", "defender-security" ) ?>">
|
38 |
<div class="line">
|
39 |
+
<?php _e( "It looks like some required PHP modules are missing or outdated. We recommend you get in touch with your web hosting service to update the modules listed below.", "defender-security" ) ?>
|
40 |
</div>
|
41 |
<table class="table">
|
42 |
<thead>
|
43 |
<tr>
|
44 |
+
<th><?php _e( "Module", "defender-security" ) ?></th>
|
45 |
+
<th><?php _e( "Version", "defender-security" ) ?></th>
|
46 |
</tr>
|
47 |
</thead>
|
48 |
<tbody>
|
49 |
<tr>
|
50 |
+
<td><?php _e( "PHP version", "defender-security" ) ?></td>
|
51 |
<td>
|
52 |
+
<span class="def-tag tag-yellow"><?php echo phpversion() ?></span> <?php _e( "Please upgrade to 5.3 or later.", "defender-security" ) ?>
|
53 |
</td>
|
54 |
</tr>
|
55 |
</tbody>
|
64 |
*/
|
65 |
public function admin_menu() {
|
66 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
67 |
+
$menu_title = esc_html__( "Defender%s", "defender-security" );
|
68 |
$menu_title = sprintf( $menu_title, ' <span class="update-plugins wd-issue-indicator-sidebar"></span>' );
|
69 |
+
add_menu_page( esc_html__( "Defender", "defender-security" ), $menu_title, $cap, 'wp-defender', array(
|
70 |
&$this,
|
71 |
'actionIndex'
|
72 |
), $this->get_menu_icon() );
|
app/module/advanced-tools/behavior/at-widget.php
CHANGED
@@ -14,38 +14,57 @@ class AT_Widget extends Behavior {
|
|
14 |
<div class="dev-box advanced-tools">
|
15 |
<div class="box-title">
|
16 |
<span class="span-icon icon-scan"></span>
|
17 |
-
<h3><?php _e( "Advanced Tools",
|
18 |
</h3>
|
19 |
|
20 |
</div>
|
21 |
<div class="box-content">
|
22 |
<p class="line end">
|
23 |
-
<?php _e( "Enable advanced tools for enhanced protection against even the most aggressive of hackers and bots.",
|
24 |
</p>
|
25 |
<div class="at-line">
|
26 |
<strong>
|
27 |
-
<?php _e( "
|
28 |
</strong>
|
29 |
<span>
|
30 |
<?php
|
31 |
-
_e( "
|
32 |
?>
|
33 |
</span>
|
34 |
<?php
|
35 |
$settings = Auth_Settings::instance();
|
36 |
if ( $settings->enabled ):
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<?php else: ?>
|
43 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
44 |
<input type="hidden" name="action" value="saveAdvancedSettings"/>
|
45 |
-
|
46 |
<input type="hidden" name="enabled" value="1"/>
|
47 |
<button type="submit" class="button button-primary button-small">
|
48 |
-
|
49 |
</button>
|
50 |
</form>
|
51 |
<?php endif; ?>
|
14 |
<div class="dev-box advanced-tools">
|
15 |
<div class="box-title">
|
16 |
<span class="span-icon icon-scan"></span>
|
17 |
+
<h3><?php _e( "Advanced Tools", "defender-security" ) ?>
|
18 |
</h3>
|
19 |
|
20 |
</div>
|
21 |
<div class="box-content">
|
22 |
<p class="line end">
|
23 |
+
<?php _e( "Enable advanced tools for enhanced protection against even the most aggressive of hackers and bots.", "defender-security" ) ?>
|
24 |
</p>
|
25 |
<div class="at-line">
|
26 |
<strong>
|
27 |
+
<?php _e( "Two-Factor Authentication", "defender-security" ) ?>
|
28 |
</strong>
|
29 |
<span>
|
30 |
<?php
|
31 |
+
_e( "Add an extra layer of security to your WordPress account to ensure that you’re the only person who can log in, even if someone else knows your password", "defender-security" )
|
32 |
?>
|
33 |
</span>
|
34 |
<?php
|
35 |
$settings = Auth_Settings::instance();
|
36 |
if ( $settings->enabled ):
|
37 |
+
$enabledRoles = $settings->userRoles;
|
38 |
+
if ( count( $enabledRoles ) ):
|
39 |
+
?>
|
40 |
+
<div class="well well-small well-green with-cap">
|
41 |
+
<i class="def-icon icon-tick"></i>
|
42 |
+
<span>
|
43 |
+
<?php printf( __( "<strong>Two-factor authentication is now active.</strong> To turn on this feature for your account, go to <a href='%s'>Your Profile</a> to complete setup and sync your account with the Authenticator app.", "defender-security" ),
|
44 |
+
admin_url( 'profile.php' ) ) ?>
|
45 |
+
</span>
|
46 |
+
</div>
|
47 |
+
<?php else: ?>
|
48 |
+
<div class="well well-small well-yellow with-cap">
|
49 |
+
<i class="def-icon icon-warning"></i>
|
50 |
+
<span>
|
51 |
+
<?php _e( "Two-factor authentication is currently inactive. Configure and save your settings to finish setup. ", "defender-security" ) ?>
|
52 |
+
</span>
|
53 |
+
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-advanced-tools' ) ?>"><?php _e( "Finish Setup", "defender-security" ) ?></a>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
<p>
|
57 |
+
<span>
|
58 |
+
<?php _e( "Note: Each user on your website must individually enable two-factor authentication via their user profile in order to enable and use this security feature.", "defender-security" ) ?>
|
59 |
+
</span>
|
60 |
+
</p>
|
61 |
<?php else: ?>
|
62 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
63 |
<input type="hidden" name="action" value="saveAdvancedSettings"/>
|
64 |
+
<?php wp_nonce_field( 'saveAdvancedSettings' ) ?>
|
65 |
<input type="hidden" name="enabled" value="1"/>
|
66 |
<button type="submit" class="button button-primary button-small">
|
67 |
+
<?php _e( "Activate", "defender-security" ) ?>
|
68 |
</button>
|
69 |
</form>
|
70 |
<?php endif; ?>
|
app/module/advanced-tools/controller/main.php
CHANGED
@@ -55,10 +55,10 @@ class Main extends Controller {
|
|
55 |
*/
|
56 |
} else {
|
57 |
if ( $isJetpackSSO ) {
|
58 |
-
wp_defender()->global['compatibility'][] = __( "You enabled Jetpack WordPress.com login, so Defender will disable the
|
59 |
}
|
60 |
if ( $isTML ) {
|
61 |
-
wp_defender()->global['compatibility'][] = __( "You enabled the plugin Theme My Login, so Defender will disable the
|
62 |
}
|
63 |
}
|
64 |
$this->add_filter( 'ms_shortcode_ajax_login', 'm2NoAjax' );
|
@@ -132,7 +132,7 @@ class Main extends Controller {
|
|
132 |
*/
|
133 |
public function alterUsersTable( $columns ) {
|
134 |
$columns = array_slice( $columns, 0, count( $columns ) - 1 ) + array(
|
135 |
-
'defAuth' => __( "
|
136 |
) + array_slice( $columns, count( $columns ) - 1 );
|
137 |
|
138 |
return $columns;
|
@@ -155,7 +155,7 @@ class Main extends Controller {
|
|
155 |
if ( empty( $res ) ) {
|
156 |
//no user
|
157 |
wp_send_json_error( array(
|
158 |
-
'message' => __( "Your token is invalid",
|
159 |
) );
|
160 |
}
|
161 |
|
@@ -167,7 +167,7 @@ class Main extends Controller {
|
|
167 |
//send
|
168 |
wp_mail( $backupEmail, 'Your OTP code', $code );
|
169 |
wp_send_json_success( array(
|
170 |
-
'message' => __( "Your code has been sent to your email.",
|
171 |
) );
|
172 |
}
|
173 |
|
@@ -211,7 +211,7 @@ class Main extends Controller {
|
|
211 |
$otp = trim( $otp );
|
212 |
if ( strlen( $otp ) == 0 ) {
|
213 |
wp_send_json_error( array(
|
214 |
-
'message' => __( "Please input a valid OTP code",
|
215 |
) );
|
216 |
}
|
217 |
|
@@ -225,7 +225,7 @@ class Main extends Controller {
|
|
225 |
} else {
|
226 |
//now need to check if the current user have backup otp
|
227 |
wp_send_json_error( array(
|
228 |
-
'message' => __( "Your OTP code is incorrect. Please try again.",
|
229 |
) );
|
230 |
}
|
231 |
}
|
@@ -286,7 +286,7 @@ class Main extends Controller {
|
|
286 |
if ( ( $otp = HTTP_Helper::retrieve_post( 'otp', null ) ) != null ) {
|
287 |
$params = array();
|
288 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieve_post( '_wpnonce' ), 'DefOtpCheck' ) ) {
|
289 |
-
$params['error'] = new \WP_Error( 'security_fail', __( "Some error happen",
|
290 |
}
|
291 |
|
292 |
$login_token = HTTP_Helper::retrieve_post( 'login_token' );
|
@@ -303,6 +303,7 @@ class Main extends Controller {
|
|
303 |
$user = $res[0];
|
304 |
$secret = Auth_API::getUserSecret( $user->ID );
|
305 |
$redirect = HTTP_Helper::retrieve_post( 'redirect_to', admin_url() );
|
|
|
306 |
if ( empty( $redirect ) ) {
|
307 |
$redirect = admin_url();
|
308 |
}
|
@@ -323,7 +324,7 @@ class Main extends Controller {
|
|
323 |
wp_redirect( $redirect );
|
324 |
exit;
|
325 |
} else {
|
326 |
-
$params['error'] = new \WP_Error( 'opt_fail', __( "Whoops, the passcode you entered was incorrect or expired.",
|
327 |
$this->showOTPScreen( $user, $params );
|
328 |
}
|
329 |
}
|
@@ -389,7 +390,7 @@ class Main extends Controller {
|
|
389 |
*/
|
390 |
public function adminMenu() {
|
391 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
392 |
-
add_submenu_page( 'wp-defender', esc_html__( "Advanced Tools",
|
393 |
&$this,
|
394 |
'actionIndex'
|
395 |
) );
|
@@ -445,18 +446,18 @@ class Main extends Controller {
|
|
445 |
return;
|
446 |
}
|
447 |
|
448 |
-
$data
|
|
|
|
|
|
|
449 |
$setting = Auth_Settings::instance();
|
450 |
-
$tmp = $setting->enabled;
|
451 |
$setting->import( $data );
|
452 |
$setting->save();
|
453 |
|
454 |
-
$res
|
455 |
-
'message' => __( "Your settings have been updated.",
|
456 |
);
|
457 |
-
|
458 |
-
$res['reload'] = 1;
|
459 |
-
}
|
460 |
|
461 |
wp_send_json_success( $res );
|
462 |
}
|
55 |
*/
|
56 |
} else {
|
57 |
if ( $isJetpackSSO ) {
|
58 |
+
wp_defender()->global['compatibility'][] = __( "You enabled Jetpack WordPress.com login, so Defender will disable the two factors login for avoiding conflict", "defender-security" );
|
59 |
}
|
60 |
if ( $isTML ) {
|
61 |
+
wp_defender()->global['compatibility'][] = __( "You enabled the plugin Theme My Login, so Defender will disable the two factors login for avoiding conflict", "defender-security" );
|
62 |
}
|
63 |
}
|
64 |
$this->add_filter( 'ms_shortcode_ajax_login', 'm2NoAjax' );
|
132 |
*/
|
133 |
public function alterUsersTable( $columns ) {
|
134 |
$columns = array_slice( $columns, 0, count( $columns ) - 1 ) + array(
|
135 |
+
'defAuth' => __( "Two Factor", "defender-security" )
|
136 |
) + array_slice( $columns, count( $columns ) - 1 );
|
137 |
|
138 |
return $columns;
|
155 |
if ( empty( $res ) ) {
|
156 |
//no user
|
157 |
wp_send_json_error( array(
|
158 |
+
'message' => __( "Your token is invalid", "defender-security" )
|
159 |
) );
|
160 |
}
|
161 |
|
167 |
//send
|
168 |
wp_mail( $backupEmail, 'Your OTP code', $code );
|
169 |
wp_send_json_success( array(
|
170 |
+
'message' => __( "Your code has been sent to your email.", "defender-security" )
|
171 |
) );
|
172 |
}
|
173 |
|
211 |
$otp = trim( $otp );
|
212 |
if ( strlen( $otp ) == 0 ) {
|
213 |
wp_send_json_error( array(
|
214 |
+
'message' => __( "Please input a valid OTP code", "defender-security" )
|
215 |
) );
|
216 |
}
|
217 |
|
225 |
} else {
|
226 |
//now need to check if the current user have backup otp
|
227 |
wp_send_json_error( array(
|
228 |
+
'message' => __( "Your OTP code is incorrect. Please try again.", "defender-security" )
|
229 |
) );
|
230 |
}
|
231 |
}
|
286 |
if ( ( $otp = HTTP_Helper::retrieve_post( 'otp', null ) ) != null ) {
|
287 |
$params = array();
|
288 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieve_post( '_wpnonce' ), 'DefOtpCheck' ) ) {
|
289 |
+
$params['error'] = new \WP_Error( 'security_fail', __( "Some error happen", "defender-security" ) );
|
290 |
}
|
291 |
|
292 |
$login_token = HTTP_Helper::retrieve_post( 'login_token' );
|
303 |
$user = $res[0];
|
304 |
$secret = Auth_API::getUserSecret( $user->ID );
|
305 |
$redirect = HTTP_Helper::retrieve_post( 'redirect_to', admin_url() );
|
306 |
+
$redirect = apply_filters( 'login_redirect', $redirect );
|
307 |
if ( empty( $redirect ) ) {
|
308 |
$redirect = admin_url();
|
309 |
}
|
324 |
wp_redirect( $redirect );
|
325 |
exit;
|
326 |
} else {
|
327 |
+
$params['error'] = new \WP_Error( 'opt_fail', __( "Whoops, the passcode you entered was incorrect or expired.", "defender-security" ) );
|
328 |
$this->showOTPScreen( $user, $params );
|
329 |
}
|
330 |
}
|
390 |
*/
|
391 |
public function adminMenu() {
|
392 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
393 |
+
add_submenu_page( 'wp-defender', esc_html__( "Advanced Tools", "defender-security" ), esc_html__( "Advanced Tools", "defender-security" ), $cap, $this->slug, array(
|
394 |
&$this,
|
395 |
'actionIndex'
|
396 |
) );
|
446 |
return;
|
447 |
}
|
448 |
|
449 |
+
$data = $_POST;
|
450 |
+
if ( ! isset( $data['userRoles'] ) ) {
|
451 |
+
$data['userRoles'] = array();
|
452 |
+
}
|
453 |
$setting = Auth_Settings::instance();
|
|
|
454 |
$setting->import( $data );
|
455 |
$setting->save();
|
456 |
|
457 |
+
$res = array(
|
458 |
+
'message' => __( "Your settings have been updated.", "defender-security" )
|
459 |
);
|
460 |
+
$res['reload'] = 1;
|
|
|
|
|
461 |
|
462 |
wp_send_json_success( $res );
|
463 |
}
|
app/module/advanced-tools/view/disabled.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
-
<?php _e( "
|
5 |
</h3>
|
6 |
</div>
|
7 |
<div class="box-content issues-box-content tc">
|
8 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/2factor-disabled.svg' ?>"/>
|
9 |
<p>
|
10 |
-
<?php _e( "Beef up your website’s security with
|
11 |
</p>
|
12 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
13 |
|
@@ -16,7 +16,7 @@
|
|
16 |
<?php wp_nonce_field( 'saveAdvancedSettings' ) ?>
|
17 |
<input type="hidden" name="enabled" value="1"/>
|
18 |
<button type="submit" class="button button-primary">
|
19 |
-
<?php _e( "Activate",
|
20 |
</button>
|
21 |
<div class="clear"></div>
|
22 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
+
<?php _e( "Two Factor Authentication", "defender-security" ) ?>
|
5 |
</h3>
|
6 |
</div>
|
7 |
<div class="box-content issues-box-content tc">
|
8 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/2factor-disabled.svg' ?>"/>
|
9 |
<p>
|
10 |
+
<?php _e( "Beef up your website’s security with two-factor authentication. Add an extra step in the login process so that users are required to enter a password and an app-generated passcode using their phone – the best protection against brute force attacks.", "defender-security" ) ?>
|
11 |
</p>
|
12 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
13 |
|
16 |
<?php wp_nonce_field( 'saveAdvancedSettings' ) ?>
|
17 |
<input type="hidden" name="enabled" value="1"/>
|
18 |
<button type="submit" class="button button-primary">
|
19 |
+
<?php _e( "Activate", "defender-security" ) ?>
|
20 |
</button>
|
21 |
<div class="clear"></div>
|
22 |
</form>
|
app/module/advanced-tools/view/layouts/layout.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="advanced-tools">
|
4 |
<h2 class="title">
|
5 |
-
<?php _e( "Advanced Tools",
|
6 |
</h2>
|
7 |
<div class="row">
|
8 |
<div class="col-third">
|
@@ -10,14 +10,14 @@
|
|
10 |
<li class="issues-nav">
|
11 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
12 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-advanced-tools' ) ?>">
|
13 |
-
<?php _e( "
|
14 |
</a>
|
15 |
</li>
|
16 |
</ul>
|
17 |
<div class="is-hidden-tablet mline">
|
18 |
<select class="mobile-nav">
|
19 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
20 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-advanced-tools' ) ?>"><?php _e( "
|
21 |
</select>
|
22 |
</div>
|
23 |
</div>
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="advanced-tools">
|
4 |
<h2 class="title">
|
5 |
+
<?php _e( "Advanced Tools", "defender-security" ) ?>
|
6 |
</h2>
|
7 |
<div class="row">
|
8 |
<div class="col-third">
|
10 |
<li class="issues-nav">
|
11 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
12 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-advanced-tools' ) ?>">
|
13 |
+
<?php _e( "Two-Factor Authentication", "defender-security" ) ?>
|
14 |
</a>
|
15 |
</li>
|
16 |
</ul>
|
17 |
<div class="is-hidden-tablet mline">
|
18 |
<select class="mobile-nav">
|
19 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
20 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-advanced-tools' ) ?>"><?php _e( "Two Factor Authentication", "defender-security" ) ?></option>
|
21 |
</select>
|
22 |
</div>
|
23 |
</div>
|
app/module/advanced-tools/view/login/disabled.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2><?php _e( "Security",
|
3 |
<table class="form-table">
|
4 |
<tbody>
|
5 |
<tr class="user-sessions-wrap hide-if-no-js">
|
6 |
-
<th><?php _e( "
|
7 |
<td aria-live="assertive">
|
8 |
<div id="def2">
|
9 |
<div class="destroy-sessions">
|
10 |
<button type="button" class="button" id="show2AuthActivator">
|
11 |
-
<?php _e( "Enable",
|
12 |
</button>
|
13 |
</div>
|
14 |
<p class="description">
|
15 |
-
<?php _e( "Use the Google Authenticator app to sign in with a separate passcode.",
|
16 |
</p>
|
17 |
</div>
|
18 |
<div id="def2qr">
|
19 |
<button type="button" id="hide2AuthActivator"
|
20 |
-
class="button"><?php _e( "Cancel",
|
21 |
-
<p><?php _e( "Use the Google Authenticator app to sign in with a separate passcode.",
|
22 |
<div class="card">
|
23 |
<p>
|
24 |
-
<strong><?php _e( "1. Install the Verification app",
|
25 |
</p>
|
26 |
<p>
|
27 |
-
<?php _e( "Download and install the Google Authenticator app on your device using the links below.",
|
28 |
</p>
|
29 |
<a href="https://itunes.apple.com/vn/app/google-authenticator/id388497605?mt=8">
|
30 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/ios-download.svg' ?>"/>
|
@@ -33,20 +33,20 @@
|
|
33 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/android-download.svg' ?>"/>
|
34 |
</a>
|
35 |
<div class="line"></div>
|
36 |
-
<p><strong><?php _e( "2. Scan the barcode",
|
37 |
-
<p><?php _e( "Open the Google Authenticator app you just downloaded, tap the “+” symbol and then use your phone’s camera to scan the barcode below.",
|
38 |
<img class="barcode"
|
39 |
src="<?php echo \WP_Defender\Module\Advanced_Tools\Component\Auth_API::generateQRCode( get_site_url(), $secretKey, 149, 149, 'wp-defender' ) ?>"/>
|
40 |
<div class="line"></div>
|
41 |
-
<p><strong><?php _e( "3. Enter passcode",
|
42 |
<p>
|
43 |
-
<?php _e( "Enter the 6 digit passcode that is shown on your device into the input field below and hit “Verify”.",
|
44 |
</p>
|
45 |
<div class="well">
|
46 |
<p class="error"></p>
|
47 |
<input type="text" id="otpCode" class="def-small-text">
|
48 |
<button type="button" class="button button-primary" id="verifyOTP">
|
49 |
-
<?php _e( "Verify",
|
50 |
</button>
|
51 |
<input type="hidden" id="defNonce" value="<?php echo wp_create_nonce( 'defVerifyOTP' ) ?>"/>
|
52 |
</div>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php _e( "Security", "defender-security" ) ?></h2>
|
3 |
<table class="form-table">
|
4 |
<tbody>
|
5 |
<tr class="user-sessions-wrap hide-if-no-js">
|
6 |
+
<th><?php _e( "Two Factor Authentication", "defender-security" ) ?></th>
|
7 |
<td aria-live="assertive">
|
8 |
<div id="def2">
|
9 |
<div class="destroy-sessions">
|
10 |
<button type="button" class="button" id="show2AuthActivator">
|
11 |
+
<?php _e( "Enable", "defender-security" ) ?>
|
12 |
</button>
|
13 |
</div>
|
14 |
<p class="description">
|
15 |
+
<?php _e( "Use the Google Authenticator app to sign in with a separate passcode.", "defender-security" ) ?>
|
16 |
</p>
|
17 |
</div>
|
18 |
<div id="def2qr">
|
19 |
<button type="button" id="hide2AuthActivator"
|
20 |
+
class="button"><?php _e( "Cancel", "defender-security" ) ?></button>
|
21 |
+
<p><?php _e( "Use the Google Authenticator app to sign in with a separate passcode.", "defender-security" ) ?></p>
|
22 |
<div class="card">
|
23 |
<p>
|
24 |
+
<strong><?php _e( "1. Install the Verification app", "defender-security" ) ?></strong>
|
25 |
</p>
|
26 |
<p>
|
27 |
+
<?php _e( "Download and install the Google Authenticator app on your device using the links below.", "defender-security" ) ?>
|
28 |
</p>
|
29 |
<a href="https://itunes.apple.com/vn/app/google-authenticator/id388497605?mt=8">
|
30 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/ios-download.svg' ?>"/>
|
33 |
<img src="<?php echo wp_defender()->getPluginUrl() . 'assets/img/android-download.svg' ?>"/>
|
34 |
</a>
|
35 |
<div class="line"></div>
|
36 |
+
<p><strong><?php _e( "2. Scan the barcode", "defender-security" ) ?></strong></p>
|
37 |
+
<p><?php _e( "Open the Google Authenticator app you just downloaded, tap the “+” symbol and then use your phone’s camera to scan the barcode below.", "defender-security" ) ?></p>
|
38 |
<img class="barcode"
|
39 |
src="<?php echo \WP_Defender\Module\Advanced_Tools\Component\Auth_API::generateQRCode( get_site_url(), $secretKey, 149, 149, 'wp-defender' ) ?>"/>
|
40 |
<div class="line"></div>
|
41 |
+
<p><strong><?php _e( "3. Enter passcode", "defender-security" ) ?></strong></p>
|
42 |
<p>
|
43 |
+
<?php _e( "Enter the 6 digit passcode that is shown on your device into the input field below and hit “Verify”.", "defender-security" ) ?>
|
44 |
</p>
|
45 |
<div class="well">
|
46 |
<p class="error"></p>
|
47 |
<input type="text" id="otpCode" class="def-small-text">
|
48 |
<button type="button" class="button button-primary" id="verifyOTP">
|
49 |
+
<?php _e( "Verify", "defender-security" ) ?>
|
50 |
</button>
|
51 |
<input type="hidden" id="defNonce" value="<?php echo wp_create_nonce( 'defVerifyOTP' ) ?>"/>
|
52 |
</div>
|
app/module/advanced-tools/view/login/enabled.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
<div class="wrap">
|
2 |
-
<h2><?php _e( "Security",
|
3 |
<table class="form-table">
|
4 |
<tbody>
|
5 |
<tr class="user-sessions-wrap hide-if-no-js">
|
6 |
-
<th><?php _e( "
|
7 |
<td aria-live="assertive">
|
8 |
<div class="def-notification">
|
9 |
-
<?php _e( "
|
10 |
</div>
|
11 |
<button type="button" class="button" id="disableOTP">
|
12 |
-
<?php _e( "Disabled",
|
13 |
</button>
|
14 |
</td>
|
15 |
</tr>
|
16 |
<tr class="user-sessions-wrap hide-if-no-js">
|
17 |
-
<th><?php _e( "Fallback email address",
|
18 |
<td aria-live="assertive">
|
19 |
<input type="text" class="regular-text" name="def_backup_email" value="<?php echo $email ?>"/>
|
20 |
<p class="description">
|
21 |
-
<?php _e( "If you ever lose your device, you can send a fallback passcode to this email address.",
|
22 |
</p>
|
23 |
</td>
|
24 |
</tr>
|
1 |
<div class="wrap">
|
2 |
+
<h2><?php _e( "Security", "defender-security" ) ?></h2>
|
3 |
<table class="form-table">
|
4 |
<tbody>
|
5 |
<tr class="user-sessions-wrap hide-if-no-js">
|
6 |
+
<th><?php _e( "Two Factor Authentication", "defender-security" ) ?></th>
|
7 |
<td aria-live="assertive">
|
8 |
<div class="def-notification">
|
9 |
+
<?php _e( "Two factor authentication is active.", "defender-security" ) ?>
|
10 |
</div>
|
11 |
<button type="button" class="button" id="disableOTP">
|
12 |
+
<?php _e( "Disabled", "defender-security" ) ?>
|
13 |
</button>
|
14 |
</td>
|
15 |
</tr>
|
16 |
<tr class="user-sessions-wrap hide-if-no-js">
|
17 |
+
<th><?php _e( "Fallback email address", "defender-security" ) ?></th>
|
18 |
<td aria-live="assertive">
|
19 |
<input type="text" class="regular-text" name="def_backup_email" value="<?php echo $email ?>"/>
|
20 |
<p class="description">
|
21 |
+
<?php _e( "If you ever lose your device, you can send a fallback passcode to this email address.", "defender-security" ) ?>
|
22 |
</p>
|
23 |
</td>
|
24 |
</tr>
|
app/module/advanced-tools/view/login/otp.php
CHANGED
@@ -221,10 +221,10 @@ do_action( 'login_header' );
|
|
221 |
?>
|
222 |
<form method="post"
|
223 |
action="<?php echo esc_url( add_query_arg( 'action', 'defenderVerifyOTP', site_url( 'wp-login.php', 'login_post' ) ) ); ?>">
|
224 |
-
<p><?php _e( "Open the Google Authenticator app and enter the 6 digit passcode.",
|
225 |
<input type="text" value="" name="otp">
|
226 |
<button class="button button-primary float-r"
|
227 |
-
type="submit"><?php _e( "Authenticate",
|
228 |
<input type="hidden" name="login_token" value="<?php echo $loginToken ?>"/>
|
229 |
<input type="hidden" name="redirect_to" value="<?php echo $redirect_to ?>"/>
|
230 |
<?php wp_nonce_field( 'DefOtpCheck' ) ?>
|
@@ -233,7 +233,7 @@ do_action( 'login_header' );
|
|
233 |
<p id="nav">
|
234 |
<a id="lostPhone"
|
235 |
href="<?php echo admin_url( 'admin-ajax.php?action=defRetrieveOTP&token=' . $loginToken . '&nonce=' . wp_create_nonce( 'defRetrieveOTP' ) ) ?>">
|
236 |
-
<?php _e( "Lost your device?",
|
237 |
<img class="def-ajaxloader" src="<?php echo wp_defender()->getPluginUrl().'app/module/advanced-tools/img/spinner.svg' ?>"/>
|
238 |
<strong class="notification">
|
239 |
|
221 |
?>
|
222 |
<form method="post"
|
223 |
action="<?php echo esc_url( add_query_arg( 'action', 'defenderVerifyOTP', site_url( 'wp-login.php', 'login_post' ) ) ); ?>">
|
224 |
+
<p><?php _e( "Open the Google Authenticator app and enter the 6 digit passcode.", "defender-security" ) ?></p>
|
225 |
<input type="text" value="" name="otp">
|
226 |
<button class="button button-primary float-r"
|
227 |
+
type="submit"><?php _e( "Authenticate", "defender-security" ) ?></button>
|
228 |
<input type="hidden" name="login_token" value="<?php echo $loginToken ?>"/>
|
229 |
<input type="hidden" name="redirect_to" value="<?php echo $redirect_to ?>"/>
|
230 |
<?php wp_nonce_field( 'DefOtpCheck' ) ?>
|
233 |
<p id="nav">
|
234 |
<a id="lostPhone"
|
235 |
href="<?php echo admin_url( 'admin-ajax.php?action=defRetrieveOTP&token=' . $loginToken . '&nonce=' . wp_create_nonce( 'defRetrieveOTP' ) ) ?>">
|
236 |
+
<?php _e( "Lost your device?", "defender-security" ) ?></a>
|
237 |
<img class="def-ajaxloader" src="<?php echo wp_defender()->getPluginUrl().'app/module/advanced-tools/img/spinner.svg' ?>"/>
|
238 |
<strong class="notification">
|
239 |
|
app/module/advanced-tools/view/main.php
CHANGED
@@ -1,30 +1,53 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
-
<?php _e( "
|
5 |
</h3>
|
6 |
</div>
|
7 |
<div class="box-content issues-box-content">
|
8 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
<?php if ( isset( wp_defender()->global['compatibility'] ) ): ?>
|
11 |
<div class="well well-error with-cap">
|
12 |
<i class="def-icon icon-warning icon-yellow "></i>
|
13 |
<?php echo implode( '<br/>', wp_defender()->global['compatibility'] ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</div>
|
15 |
<?php endif; ?>
|
16 |
<div class="columns">
|
17 |
<div class="column is-one-third">
|
18 |
-
<label><?php _e( "User Roles",
|
19 |
<span class="sub">
|
20 |
-
<?php _e( "Choose
|
21 |
</span>
|
22 |
</div>
|
23 |
<div class="column">
|
24 |
<ul class="dev-list marginless">
|
25 |
<li class="list-header">
|
26 |
<div>
|
27 |
-
<span class="list-label"><?php _e( "User role",
|
28 |
</div>
|
29 |
</li>
|
30 |
<?php
|
@@ -56,9 +79,9 @@
|
|
56 |
</div>
|
57 |
<div class="columns">
|
58 |
<div class="column is-one-third">
|
59 |
-
<label><?php _e( "Lost Phone",
|
60 |
<span class="sub">
|
61 |
-
<?php _e( "If a user is unable to access their phone, you can allow an option to send the one time password to their registered email.",
|
62 |
</span>
|
63 |
</div>
|
64 |
<div class="column">
|
@@ -68,14 +91,14 @@
|
|
68 |
class="toggle-checkbox" id="toggle_lost_phone"/>
|
69 |
<label class="toggle-label" for="toggle_lost_phone"></label>
|
70 |
</span>
|
71 |
-
<span><?php _e( "Enable lost phone option",
|
72 |
</div>
|
73 |
</div>
|
74 |
<div class="columns">
|
75 |
<div class="column is-one-third">
|
76 |
-
<label><?php _e( "App Download",
|
77 |
<span class="sub">
|
78 |
-
<?php _e( "Need the app? Here’s links to the official Google Authenticator apps.",
|
79 |
</span>
|
80 |
</div>
|
81 |
<div class="column">
|
@@ -89,25 +112,25 @@
|
|
89 |
</div>
|
90 |
<div class="columns">
|
91 |
<div class="column is-one-third">
|
92 |
-
<label><?php _e( "Active Users",
|
93 |
<span class="sub">
|
94 |
-
<?php _e( "Here’s a quick link to see which of your users have enabled
|
95 |
</span>
|
96 |
</div>
|
97 |
<div class="column">
|
98 |
-
<?php printf( __( "<a href=\"%s\">View users</a> who have enabled this feature.",
|
99 |
</div>
|
100 |
</div>
|
101 |
<div class="columns mline">
|
102 |
<div class="column is-one-third">
|
103 |
-
<label><?php _e( "Deactivate",
|
104 |
<span class="sub">
|
105 |
-
<?php _e( "
|
106 |
</span>
|
107 |
</div>
|
108 |
<div class="column">
|
109 |
<button type="button" class="button button-secondary deactivate-2factor">
|
110 |
-
<?php _e( "Deactivate",
|
111 |
</button>
|
112 |
</div>
|
113 |
</div>
|
@@ -115,7 +138,7 @@
|
|
115 |
<input type="hidden" name="action" value="saveAdvancedSettings"/>
|
116 |
<?php wp_nonce_field( 'saveAdvancedSettings' ) ?>
|
117 |
<button type="submit" class="button button-primary float-r">
|
118 |
-
<?php _e( "SAVE SETTINGS",
|
119 |
</button>
|
120 |
<div class="clear"></div>
|
121 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
+
<?php _e( "Two-Factor Authentication", "defender-security" ) ?>
|
5 |
</h3>
|
6 |
</div>
|
7 |
<div class="box-content issues-box-content">
|
8 |
<form method="post" id="advanced-settings-frm" class="advanced-settings-frm">
|
9 |
+
<?php
|
10 |
+
$class = 'line';
|
11 |
+
$enabledRoles = $settings->userRoles;
|
12 |
+
|
13 |
+
?>
|
14 |
+
<p class="<?php echo $class ?>"><?php _e( "Configure your two-factor authentication settings. Our recommendations are enabled by default.", "defender-security" ) ?></p>
|
15 |
<?php if ( isset( wp_defender()->global['compatibility'] ) ): ?>
|
16 |
<div class="well well-error with-cap">
|
17 |
<i class="def-icon icon-warning icon-yellow "></i>
|
18 |
<?php echo implode( '<br/>', wp_defender()->global['compatibility'] ); ?>
|
19 |
+
</div>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php
|
22 |
+
if ( count( $enabledRoles ) ):
|
23 |
+
?>
|
24 |
+
<div class="well well-green with-cap">
|
25 |
+
<i class="def-icon icon-tick"></i>
|
26 |
+
<?php
|
27 |
+
printf( __( "<strong>Two-factor authentication is now active.</strong> User roles with this feature enabled must visit their <a href='%s'>Profile page</a> to complete setup and sync their account with the Authenticator app.", "defender-security" ),
|
28 |
+
admin_url( 'profile.php' ) );
|
29 |
+
?>
|
30 |
+
</div>
|
31 |
+
<?php else: ?>
|
32 |
+
<div class="well well-yellow with-cap">
|
33 |
+
<i class="def-icon icon-warning"></i>
|
34 |
+
<?php
|
35 |
+
_e( "<strong>Two-factor authentication is currently inactive.</strong> Configure and save your settings to complete setup.", "defender-security" )
|
36 |
+
?>
|
37 |
</div>
|
38 |
<?php endif; ?>
|
39 |
<div class="columns">
|
40 |
<div class="column is-one-third">
|
41 |
+
<label><?php _e( "User Roles", "defender-security" ) ?></label>
|
42 |
<span class="sub">
|
43 |
+
<?php _e( "Choose the user roles you want to enable two-factor authentication for. Users with those roles will then be required to use the Google Authenticator app to login.", "defender-security" ) ?>
|
44 |
</span>
|
45 |
</div>
|
46 |
<div class="column">
|
47 |
<ul class="dev-list marginless">
|
48 |
<li class="list-header">
|
49 |
<div>
|
50 |
+
<span class="list-label"><?php _e( "User role", "defender-security" ) ?></span>
|
51 |
</div>
|
52 |
</li>
|
53 |
<?php
|
79 |
</div>
|
80 |
<div class="columns">
|
81 |
<div class="column is-one-third">
|
82 |
+
<label><?php _e( "Lost Phone", "defender-security" ) ?></label>
|
83 |
<span class="sub">
|
84 |
+
<?php _e( "If a user is unable to access their phone, you can allow an option to send the one time password to their registered email.", "defender-security" ) ?>
|
85 |
</span>
|
86 |
</div>
|
87 |
<div class="column">
|
91 |
class="toggle-checkbox" id="toggle_lost_phone"/>
|
92 |
<label class="toggle-label" for="toggle_lost_phone"></label>
|
93 |
</span>
|
94 |
+
<span><?php _e( "Enable lost phone option", "defender-security" ) ?></span>
|
95 |
</div>
|
96 |
</div>
|
97 |
<div class="columns">
|
98 |
<div class="column is-one-third">
|
99 |
+
<label><?php _e( "App Download", "defender-security" ) ?></label>
|
100 |
<span class="sub">
|
101 |
+
<?php _e( "Need the app? Here’s links to the official Google Authenticator apps.", "defender-security" ) ?>
|
102 |
</span>
|
103 |
</div>
|
104 |
<div class="column">
|
112 |
</div>
|
113 |
<div class="columns">
|
114 |
<div class="column is-one-third">
|
115 |
+
<label><?php _e( "Active Users", "defender-security" ) ?></label>
|
116 |
<span class="sub">
|
117 |
+
<?php _e( "Here’s a quick link to see which of your users have enabled two-factor verification.", "defender-security" ) ?>
|
118 |
</span>
|
119 |
</div>
|
120 |
<div class="column">
|
121 |
+
<?php printf( __( "<a href=\"%s\">View users</a> who have enabled this feature.", "defender-security" ), network_admin_url( 'users.php' ) ) ?>
|
122 |
</div>
|
123 |
</div>
|
124 |
<div class="columns mline">
|
125 |
<div class="column is-one-third">
|
126 |
+
<label><?php _e( "Deactivate", "defender-security" ) ?></label>
|
127 |
<span class="sub">
|
128 |
+
<?php _e( "Disable two-factor authentication on your website.", "defender-security" ) ?>
|
129 |
</span>
|
130 |
</div>
|
131 |
<div class="column">
|
132 |
<button type="button" class="button button-secondary deactivate-2factor">
|
133 |
+
<?php _e( "Deactivate", "defender-security" ) ?>
|
134 |
</button>
|
135 |
</div>
|
136 |
</div>
|
138 |
<input type="hidden" name="action" value="saveAdvancedSettings"/>
|
139 |
<?php wp_nonce_field( 'saveAdvancedSettings' ) ?>
|
140 |
<button type="submit" class="button button-primary float-r">
|
141 |
+
<?php _e( "SAVE SETTINGS", "defender-security" ) ?>
|
142 |
</button>
|
143 |
<div class="clear"></div>
|
144 |
</form>
|
app/module/audit/behavior/audit-free.php
CHANGED
@@ -15,20 +15,20 @@ class Audit_Free extends Behavior {
|
|
15 |
<div class="dev-box reporting-sale audit-widget">
|
16 |
<div class="box-title">
|
17 |
<span class="span-icon icon-blacklist"></span>
|
18 |
-
<h3><?php _e( "AUDIT LOGGING",
|
19 |
<a href="#pro-feature" rel="dialog" class="button button-small button-pre"
|
20 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
21 |
</div>
|
22 |
<div class="box-content">
|
23 |
<div class="line">
|
24 |
<?php
|
25 |
-
esc_html_e( "Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes.",
|
26 |
?>
|
27 |
</div>
|
28 |
<div class="presale-text">
|
29 |
<div>
|
30 |
<?php printf( __( "Audit logging is a pro feature included in a WPMU DEV membership along with 100+ plugins &
|
31 |
-
themes, 24/7 support and lots of handy site management tools – <a target='_blank' href=\"%s\">Try it all absolutely FREE</a>",
|
32 |
</a>
|
33 |
</div>
|
34 |
</div>
|
15 |
<div class="dev-box reporting-sale audit-widget">
|
16 |
<div class="box-title">
|
17 |
<span class="span-icon icon-blacklist"></span>
|
18 |
+
<h3><?php _e( "AUDIT LOGGING", "defender-security" ) ?></h3>
|
19 |
<a href="#pro-feature" rel="dialog" class="button button-small button-pre"
|
20 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>"><?php _e( "PRO FEATURE", "defender-security" ) ?></a>
|
21 |
</div>
|
22 |
<div class="box-content">
|
23 |
<div class="line">
|
24 |
<?php
|
25 |
+
esc_html_e( "Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes.", "defender-security" )
|
26 |
?>
|
27 |
</div>
|
28 |
<div class="presale-text">
|
29 |
<div>
|
30 |
<?php printf( __( "Audit logging is a pro feature included in a WPMU DEV membership along with 100+ plugins &
|
31 |
+
themes, 24/7 support and lots of handy site management tools – <a target='_blank' href=\"%s\">Try it all absolutely FREE</a>", "defender-security" ), "https://premium.wpmudev.org/project/wp-defender/" ) ?>
|
32 |
</a>
|
33 |
</div>
|
34 |
</div>
|
app/module/audit/controller/main-free.php
CHANGED
@@ -33,7 +33,7 @@ class Main_Free extends \WP_Defender\Controller {
|
|
33 |
*/
|
34 |
public function adminMenu() {
|
35 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
36 |
-
add_submenu_page( 'wp-defender', esc_html__( "Audit Logging",
|
37 |
&$this,
|
38 |
'actionIndex'
|
39 |
) );
|
33 |
*/
|
34 |
public function adminMenu() {
|
35 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
36 |
+
add_submenu_page( 'wp-defender', esc_html__( "Audit Logging", "defender-security" ), esc_html__( "Audit Logging", "defender-security" ), $cap, $this->slug, array(
|
37 |
&$this,
|
38 |
'actionIndex'
|
39 |
) );
|
app/module/audit/view/free.php
CHANGED
@@ -2,19 +2,19 @@
|
|
2 |
<div class="wp-defender">
|
3 |
<div class="auditing">
|
4 |
<h2 class="title">
|
5 |
-
<?php _e( "AUDIT LOGGING",
|
6 |
</h2>
|
7 |
<div class="dev-box">
|
8 |
<div class="box-title">
|
9 |
-
<h3><?php _e( "Upgrade",
|
10 |
</div>
|
11 |
<div class="box-content tc">
|
12 |
<img class="mline" src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/audit-free.svg"/>
|
13 |
<div class="line max-600">
|
14 |
-
<?php _e( "Track and log each and every event when changes are made to your website and get details reports on everything from what your users are doing to hacking attempts. This is a pro feature that requires an active WPMU DEV membership. Try it free today!",
|
15 |
</div>
|
16 |
<a href="#pro-feature" rel="dialog"
|
17 |
-
class="button button-green"><?php esc_html_e( "Upgrade to Pro",
|
18 |
</div>
|
19 |
</div>
|
20 |
</div>
|
2 |
<div class="wp-defender">
|
3 |
<div class="auditing">
|
4 |
<h2 class="title">
|
5 |
+
<?php _e( "AUDIT LOGGING", "defender-security" ) ?>
|
6 |
</h2>
|
7 |
<div class="dev-box">
|
8 |
<div class="box-title">
|
9 |
+
<h3><?php _e( "Upgrade", "defender-security" ) ?></h3>
|
10 |
</div>
|
11 |
<div class="box-content tc">
|
12 |
<img class="mline" src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/audit-free.svg"/>
|
13 |
<div class="line max-600">
|
14 |
+
<?php _e( "Track and log each and every event when changes are made to your website and get details reports on everything from what your users are doing to hacking attempts. This is a pro feature that requires an active WPMU DEV membership. Try it free today!", "defender-security" ) ?>
|
15 |
</div>
|
16 |
<a href="#pro-feature" rel="dialog"
|
17 |
+
class="button button-green"><?php esc_html_e( "Upgrade to Pro", "defender-security" ) ?></a>
|
18 |
</div>
|
19 |
</div>
|
20 |
</div>
|
app/module/audit/view/pro-feature.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features",
|
2 |
<div class="wp-defender">
|
3 |
-
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;",
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
-
<strong><?php _e( "Automatic Full File Scans & Notifications",
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
-
issues arise.",
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
-
<strong><?php _e( "Advanced File Scanning",
|
16 |
<p class="sub">
|
17 |
-
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.",
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
-
<strong><?php _e( "Audit Logging",
|
23 |
<p class="sub">
|
24 |
-
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.",
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
-
<strong><?php _e( "Tailored Reporting",
|
30 |
<p class="sub">
|
31 |
-
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.",
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
-
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free",
|
36 |
-
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.",
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
1 |
+
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features", "defender-security" ) ?>">
|
2 |
<div class="wp-defender">
|
3 |
+
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;", "defender-security" ) ?></p>
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
+
<strong><?php _e( "Automatic Full File Scans & Notifications", "defender-security" ) ?></strong>
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
+
issues arise.", "defender-security" ) ?>
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
+
<strong><?php _e( "Advanced File Scanning", "defender-security" ) ?></strong>
|
16 |
<p class="sub">
|
17 |
+
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.", "defender-security" ) ?>
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
+
<strong><?php _e( "Audit Logging", "defender-security" ) ?></strong>
|
23 |
<p class="sub">
|
24 |
+
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.", "defender-security" ) ?>
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
+
<strong><?php _e( "Tailored Reporting", "defender-security" ) ?></strong>
|
30 |
<p class="sub">
|
31 |
+
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.", "defender-security" ) ?>
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
+
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free", "defender-security" ) ?></a>
|
36 |
+
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.", "defender-security" ) ?></p>
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
app/module/hardener/behavior/widget.php
CHANGED
@@ -16,12 +16,12 @@ class Widget extends Behavior {
|
|
16 |
<div class="dev-box hardener-widget">
|
17 |
<div class="box-title">
|
18 |
<span class="span-icon hardener-icon" aria-hidden="true"></span>
|
19 |
-
<h3><?php _e( "Security Tweaks",
|
20 |
<?php
|
21 |
$hardener_issues = count( Settings::instance()->issues );
|
22 |
if ( $hardener_issues ): ?>
|
23 |
<span class="def-tag tag-yellow"
|
24 |
-
tooltip="<?php esc_attr_e( sprintf( __('You have %d security tweak(s) needing attention.',
|
25 |
<?php
|
26 |
echo $hardener_issues ?>
|
27 |
</span>
|
@@ -32,7 +32,7 @@ class Widget extends Behavior {
|
|
32 |
<?php $count = count( $issues ); ?>
|
33 |
<div class="line <?php echo $count ? 'end' : null ?>">
|
34 |
<?php _e( "Defender checks for security tweaks you can make to enhance your website’s
|
35 |
-
defense against hackers and bots.",
|
36 |
</div>
|
37 |
<?php if ( $count ): ?>
|
38 |
<ul class="dev-list end">
|
@@ -54,13 +54,13 @@ class Widget extends Behavior {
|
|
54 |
<?php else: ?>
|
55 |
<div class="well well-green with-cap mline">
|
56 |
<i class="def-icon icon-tick"></i>
|
57 |
-
<?php _e( "You have actioned all available security tweaks. Great work!",
|
58 |
</div>
|
59 |
<?php endif; ?>
|
60 |
<div class="row">
|
61 |
<div class="col-third tl">
|
62 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>"
|
63 |
-
class="button button-small button-secondary"><?php _e( "VIEW ALL",
|
64 |
</div>
|
65 |
</div>
|
66 |
</div>
|
16 |
<div class="dev-box hardener-widget">
|
17 |
<div class="box-title">
|
18 |
<span class="span-icon hardener-icon" aria-hidden="true"></span>
|
19 |
+
<h3><?php _e( "Security Tweaks", "defender-security" ) ?>
|
20 |
<?php
|
21 |
$hardener_issues = count( Settings::instance()->issues );
|
22 |
if ( $hardener_issues ): ?>
|
23 |
<span class="def-tag tag-yellow"
|
24 |
+
tooltip="<?php esc_attr_e( sprintf( __('You have %d security tweak(s) needing attention.', "defender-security" ), $hardener_issues ) ); ?>">
|
25 |
<?php
|
26 |
echo $hardener_issues ?>
|
27 |
</span>
|
32 |
<?php $count = count( $issues ); ?>
|
33 |
<div class="line <?php echo $count ? 'end' : null ?>">
|
34 |
<?php _e( "Defender checks for security tweaks you can make to enhance your website’s
|
35 |
+
defense against hackers and bots.", "defender-security" ) ?>
|
36 |
</div>
|
37 |
<?php if ( $count ): ?>
|
38 |
<ul class="dev-list end">
|
54 |
<?php else: ?>
|
55 |
<div class="well well-green with-cap mline">
|
56 |
<i class="def-icon icon-tick"></i>
|
57 |
+
<?php _e( "You have actioned all available security tweaks. Great work!", "defender-security" ) ?>
|
58 |
</div>
|
59 |
<?php endif; ?>
|
60 |
<div class="row">
|
61 |
<div class="col-third tl">
|
62 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>"
|
63 |
+
class="button button-small button-secondary"><?php _e( "VIEW ALL", "defender-security" ) ?></a>
|
64 |
</div>
|
65 |
</div>
|
66 |
</div>
|
app/module/hardener/component/change-admin-service.php
CHANGED
@@ -87,19 +87,19 @@ class Change_Admin_Service extends Rule_Service implements IRule_Service {
|
|
87 |
$username = $this->username;
|
88 |
}
|
89 |
if ( strlen( $username ) == 0 ) {
|
90 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "The username can't be empty!",
|
91 |
}
|
92 |
if ( strtolower( $username ) == 'admin' ) {
|
93 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "You can't use admin as a username again!",
|
94 |
}
|
95 |
|
96 |
if ( ! validate_username( $username ) ) {
|
97 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "The username is invalid!",
|
98 |
}
|
99 |
|
100 |
//now check if the username unique
|
101 |
if ( username_exists( $username ) ) {
|
102 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "The username already exists!",
|
103 |
}
|
104 |
|
105 |
return true;
|
87 |
$username = $this->username;
|
88 |
}
|
89 |
if ( strlen( $username ) == 0 ) {
|
90 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "The username can't be empty!", "defender-security" ) );
|
91 |
}
|
92 |
if ( strtolower( $username ) == 'admin' ) {
|
93 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "You can't use admin as a username again!", "defender-security" ) );
|
94 |
}
|
95 |
|
96 |
if ( ! validate_username( $username ) ) {
|
97 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "The username is invalid!", "defender-security" ) );
|
98 |
}
|
99 |
|
100 |
//now check if the username unique
|
101 |
if ( username_exists( $username ) ) {
|
102 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "The username already exists!", "defender-security" ) );
|
103 |
}
|
104 |
|
105 |
return true;
|
app/module/hardener/component/change-admin.php
CHANGED
@@ -33,7 +33,7 @@ class Change_Admin extends Rule {
|
|
33 |
* @return string
|
34 |
*/
|
35 |
public function getTitle() {
|
36 |
-
return __( "Change default admin user account",
|
37 |
}
|
38 |
|
39 |
/**
|
@@ -53,7 +53,7 @@ class Change_Admin extends Rule {
|
|
53 |
} else {
|
54 |
Settings::instance()->addToResolved( self::$slug );
|
55 |
wp_send_json_success( array(
|
56 |
-
'message' => sprintf( __( "Your admin name has changed. You will need to <a href='" . wp_login_url() . "'><strong>%s</strong></a>.<br/>This will auto reload after <span class='hardener-timer'>10</span> seconds.",
|
57 |
'reload' => 10
|
58 |
) );
|
59 |
}
|
33 |
* @return string
|
34 |
*/
|
35 |
public function getTitle() {
|
36 |
+
return __( "Change default admin user account", "defender-security" );
|
37 |
}
|
38 |
|
39 |
/**
|
53 |
} else {
|
54 |
Settings::instance()->addToResolved( self::$slug );
|
55 |
wp_send_json_success( array(
|
56 |
+
'message' => sprintf( __( "Your admin name has changed. You will need to <a href='" . wp_login_url() . "'><strong>%s</strong></a>.<br/>This will auto reload after <span class='hardener-timer'>10</span> seconds.", "defender-security" ), "re-login" ),
|
57 |
'reload' => 10
|
58 |
) );
|
59 |
}
|
app/module/hardener/component/db-prefix-service.php
CHANGED
@@ -29,12 +29,12 @@ class DB_Prefix_Service extends Rule_Service implements IRule_Service {
|
|
29 |
$config_path = $this->retrieveWPConfigPath();
|
30 |
if ( ! is_writeable( $config_path ) ) {
|
31 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
32 |
-
sprintf( __( "The file %s is not writeable",
|
33 |
}
|
34 |
|
35 |
$hook_line = $this->findDefaultHookLine( file( $config_path ) );
|
36 |
if ( $hook_line === false ) {
|
37 |
-
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Your wp-config.php was modified by a 3rd party, this will cause conflict with Defender. Please revert it to original for updating your database prefix",
|
38 |
}
|
39 |
|
40 |
if ( ! Utils::instance()->isActivatedSingle() ) {
|
@@ -44,7 +44,7 @@ class DB_Prefix_Service extends Rule_Service implements IRule_Service {
|
|
44 |
) );
|
45 |
|
46 |
if ( $sites >= 100 ) {
|
47 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "Unfortunately it's not safe to do this via a plugin for larger WordPress Multisite installs. You can ignore this step, or follow a tutorial online on how to use a scalable tool like WP-CLI.",
|
48 |
}
|
49 |
}
|
50 |
if ( is_wp_error( $is_valid = $this->validatePrefix() ) ) {
|
@@ -92,7 +92,7 @@ class DB_Prefix_Service extends Rule_Service implements IRule_Service {
|
|
92 |
if ( ! file_put_contents( $config_path, implode( null, $config ), LOCK_EX ) ) {
|
93 |
//should not happen
|
94 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
95 |
-
sprintf( __( "The file %s is not writeable",
|
96 |
}
|
97 |
|
98 |
return true;
|
@@ -184,19 +184,19 @@ class DB_Prefix_Service extends Rule_Service implements IRule_Service {
|
|
184 |
|
185 |
global $wpdb;
|
186 |
if ( $new_prefix == $wpdb->prefix ) {
|
187 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "You are currently using this prefix.",
|
188 |
}
|
189 |
|
190 |
if ( strlen( $new_prefix ) == 0 ) {
|
191 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "Your prefix can't be empty!",
|
192 |
}
|
193 |
|
194 |
if ( preg_match( '|[^a-z0-9_]|i', $new_prefix ) ) {
|
195 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "Table prefix can only contain numbers, letters, and underscores.",
|
196 |
}
|
197 |
|
198 |
if ( count( $tables = $this->getTables( $new_prefix ) ) ) {
|
199 |
-
return new \WP_Error( Error_Code::VALIDATE, __( "This prefix is already in use. Please choose a different prefix.",
|
200 |
}
|
201 |
|
202 |
$this->new_prefix = $new_prefix;
|
29 |
$config_path = $this->retrieveWPConfigPath();
|
30 |
if ( ! is_writeable( $config_path ) ) {
|
31 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
32 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
33 |
}
|
34 |
|
35 |
$hook_line = $this->findDefaultHookLine( file( $config_path ) );
|
36 |
if ( $hook_line === false ) {
|
37 |
+
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Your wp-config.php was modified by a 3rd party, this will cause conflict with Defender. Please revert it to original for updating your database prefix", "defender-security" ) );
|
38 |
}
|
39 |
|
40 |
if ( ! Utils::instance()->isActivatedSingle() ) {
|
44 |
) );
|
45 |
|
46 |
if ( $sites >= 100 ) {
|
47 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "Unfortunately it's not safe to do this via a plugin for larger WordPress Multisite installs. You can ignore this step, or follow a tutorial online on how to use a scalable tool like WP-CLI.", "defender-security" ) );
|
48 |
}
|
49 |
}
|
50 |
if ( is_wp_error( $is_valid = $this->validatePrefix() ) ) {
|
92 |
if ( ! file_put_contents( $config_path, implode( null, $config ), LOCK_EX ) ) {
|
93 |
//should not happen
|
94 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
95 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
96 |
}
|
97 |
|
98 |
return true;
|
184 |
|
185 |
global $wpdb;
|
186 |
if ( $new_prefix == $wpdb->prefix ) {
|
187 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "You are currently using this prefix.", "defender-security" ) );
|
188 |
}
|
189 |
|
190 |
if ( strlen( $new_prefix ) == 0 ) {
|
191 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "Your prefix can't be empty!", "defender-security" ) );
|
192 |
}
|
193 |
|
194 |
if ( preg_match( '|[^a-z0-9_]|i', $new_prefix ) ) {
|
195 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "Table prefix can only contain numbers, letters, and underscores.", "defender-security" ) );
|
196 |
}
|
197 |
|
198 |
if ( count( $tables = $this->getTables( $new_prefix ) ) ) {
|
199 |
+
return new \WP_Error( Error_Code::VALIDATE, __( "This prefix is already in use. Please choose a different prefix.", "defender-security" ) );
|
200 |
}
|
201 |
|
202 |
$this->new_prefix = $new_prefix;
|
app/module/hardener/component/db-prefix.php
CHANGED
@@ -30,7 +30,7 @@ class DB_Prefix extends Rule {
|
|
30 |
}
|
31 |
|
32 |
public function getTitle() {
|
33 |
-
return __( "Change default database prefix",
|
34 |
}
|
35 |
|
36 |
function process() {
|
30 |
}
|
31 |
|
32 |
public function getTitle() {
|
33 |
+
return __( "Change default database prefix", "defender-security" );
|
34 |
}
|
35 |
|
36 |
function process() {
|
app/module/hardener/component/disable-file-editor-service.php
CHANGED
@@ -29,7 +29,7 @@ class Disable_File_Editor_Service extends Rule_Service implements IRule_Service
|
|
29 |
$config_path = $this->retrieveWPConfigPath();
|
30 |
if ( ! is_writeable( $config_path ) ) {
|
31 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
32 |
-
sprintf( __( "The file %s is not writeable",
|
33 |
}
|
34 |
$config = file( $config_path );
|
35 |
$line = $this->findLine( $config );
|
@@ -37,7 +37,7 @@ class Disable_File_Editor_Service extends Rule_Service implements IRule_Service
|
|
37 |
//no defined, we just need to inject
|
38 |
$hook_line = $this->findDefaultHookLine( $config );
|
39 |
if ( $hook_line === false ) {
|
40 |
-
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.",
|
41 |
}
|
42 |
$config = Array_Helper::injectLine( $config, $hook_line + 1, PHP_EOL . "define( 'DISALLOW_FILE_EDIT', true );" . PHP_EOL );
|
43 |
|
@@ -63,7 +63,7 @@ class Disable_File_Editor_Service extends Rule_Service implements IRule_Service
|
|
63 |
$config_path = $this->retrieveWPConfigPath();
|
64 |
if ( ! is_writeable( $config_path ) ) {
|
65 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
66 |
-
sprintf( __( "The file %s is not writeable",
|
67 |
}
|
68 |
$config = file( $config_path );
|
69 |
$line = $this->findLine( $config );
|
29 |
$config_path = $this->retrieveWPConfigPath();
|
30 |
if ( ! is_writeable( $config_path ) ) {
|
31 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
32 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
33 |
}
|
34 |
$config = file( $config_path );
|
35 |
$line = $this->findLine( $config );
|
37 |
//no defined, we just need to inject
|
38 |
$hook_line = $this->findDefaultHookLine( $config );
|
39 |
if ( $hook_line === false ) {
|
40 |
+
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.", "defender-security" ) );
|
41 |
}
|
42 |
$config = Array_Helper::injectLine( $config, $hook_line + 1, PHP_EOL . "define( 'DISALLOW_FILE_EDIT', true );" . PHP_EOL );
|
43 |
|
63 |
$config_path = $this->retrieveWPConfigPath();
|
64 |
if ( ! is_writeable( $config_path ) ) {
|
65 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
66 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
67 |
}
|
68 |
$config = file( $config_path );
|
69 |
$line = $this->findLine( $config );
|
app/module/hardener/component/disable-file-editor.php
CHANGED
@@ -21,7 +21,7 @@ class Disable_File_Editor extends Rule {
|
|
21 |
}
|
22 |
|
23 |
public function getTitle() {
|
24 |
-
return __( "Disable the file editor",
|
25 |
}
|
26 |
|
27 |
function addHooks() {
|
21 |
}
|
22 |
|
23 |
public function getTitle() {
|
24 |
+
return __( "Disable the file editor", "defender-security" );
|
25 |
}
|
26 |
|
27 |
function addHooks() {
|
app/module/hardener/component/disable-trackback.php
CHANGED
@@ -25,7 +25,7 @@ class Disable_Trackback extends Rule {
|
|
25 |
}
|
26 |
|
27 |
public function getTitle() {
|
28 |
-
return __( "Disable trackbacks and pingbacks",
|
29 |
}
|
30 |
|
31 |
function addHooks() {
|
25 |
}
|
26 |
|
27 |
public function getTitle() {
|
28 |
+
return __( "Disable trackbacks and pingbacks", "defender-security" );
|
29 |
}
|
30 |
|
31 |
function addHooks() {
|
app/module/hardener/component/hide-error-service.php
CHANGED
@@ -58,7 +58,7 @@ class Hide_Error_Service extends Rule_Service implements IRule_Service {
|
|
58 |
//check if can write
|
59 |
if ( ! is_writeable( $config_path ) ) {
|
60 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
61 |
-
sprintf( __( "The file %s is not writeable",
|
62 |
}
|
63 |
$config = file( $config_path );
|
64 |
if ( ( $info = $this->findWPDebugLine( $config ) ) === - 1 ) {
|
@@ -67,7 +67,7 @@ class Hide_Error_Service extends Rule_Service implements IRule_Service {
|
|
67 |
//nowhere, find the hook line, hook after $prefix
|
68 |
$hookline = $this->findDefaultHookLine( $config );
|
69 |
if ( $hookline === false ) {
|
70 |
-
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.",
|
71 |
}
|
72 |
$config = Array_Helper::injectLine( $config, $hookline + 1, PHP_EOL . "define( 'WP_DEBUG', false );" . PHP_EOL );
|
73 |
file_put_contents( $config_path, implode( null, $config ), LOCK_EX );
|
@@ -75,7 +75,7 @@ class Hide_Error_Service extends Rule_Service implements IRule_Service {
|
|
75 |
return true;
|
76 |
} else {
|
77 |
//already somewhere
|
78 |
-
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.",
|
79 |
}
|
80 |
}
|
81 |
|
@@ -100,7 +100,7 @@ class Hide_Error_Service extends Rule_Service implements IRule_Service {
|
|
100 |
} elseif ( $value == 0 ) {
|
101 |
//debug already off
|
102 |
//this is a rare case, debug is off, but error still showing up
|
103 |
-
return new \WP_Error( 0, __( "WP_DEBUG get override somewhere, please check with your host provider",
|
104 |
}
|
105 |
}
|
106 |
|
58 |
//check if can write
|
59 |
if ( ! is_writeable( $config_path ) ) {
|
60 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
61 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
62 |
}
|
63 |
$config = file( $config_path );
|
64 |
if ( ( $info = $this->findWPDebugLine( $config ) ) === - 1 ) {
|
67 |
//nowhere, find the hook line, hook after $prefix
|
68 |
$hookline = $this->findDefaultHookLine( $config );
|
69 |
if ( $hookline === false ) {
|
70 |
+
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.", "defender-security" ) );
|
71 |
}
|
72 |
$config = Array_Helper::injectLine( $config, $hookline + 1, PHP_EOL . "define( 'WP_DEBUG', false );" . PHP_EOL );
|
73 |
file_put_contents( $config_path, implode( null, $config ), LOCK_EX );
|
75 |
return true;
|
76 |
} else {
|
77 |
//already somewhere
|
78 |
+
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.", "defender-security" ) );
|
79 |
}
|
80 |
}
|
81 |
|
100 |
} elseif ( $value == 0 ) {
|
101 |
//debug already off
|
102 |
//this is a rare case, debug is off, but error still showing up
|
103 |
+
return new \WP_Error( 0, __( "WP_DEBUG get override somewhere, please check with your host provider", "defender-security" ) );
|
104 |
}
|
105 |
}
|
106 |
|
app/module/hardener/component/hide-error.php
CHANGED
@@ -30,7 +30,7 @@ class Hide_Error extends Rule {
|
|
30 |
}
|
31 |
|
32 |
public function getTitle() {
|
33 |
-
return __( "Hide error reporting",
|
34 |
}
|
35 |
|
36 |
function revert() {
|
30 |
}
|
31 |
|
32 |
public function getTitle() {
|
33 |
+
return __( "Hide error reporting", "defender-security" );
|
34 |
}
|
35 |
|
36 |
function revert() {
|
app/module/hardener/component/login-duration.php
CHANGED
@@ -35,7 +35,7 @@ class Login_Duration extends Rule {
|
|
35 |
* @return string
|
36 |
*/
|
37 |
public function getTitle() {
|
38 |
-
return __( "Manage Login Duration",
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -91,7 +91,7 @@ class Login_Duration extends Rule {
|
|
91 |
}
|
92 |
} else {
|
93 |
wp_send_json_error( array(
|
94 |
-
'message' => __( 'Duration can only be a number and greater than 0',
|
95 |
) );
|
96 |
}
|
97 |
}
|
@@ -191,7 +191,7 @@ class Login_Duration extends Rule {
|
|
191 |
$logout_msg = strip_tags( $login_msg );
|
192 |
if ( $logout_msg == 'session_expired' ) {
|
193 |
$duration = $this->getService()->getDuration( false );
|
194 |
-
$msg = sprintf( __( 'Your session has expired because it has been over %d days since your last login. Please log back in to continue.',
|
195 |
$msg = htmlspecialchars( $msg, ENT_QUOTES, 'UTF-8' );
|
196 |
$message .= '<p class="login message">'. $msg . '</p>';
|
197 |
}
|
35 |
* @return string
|
36 |
*/
|
37 |
public function getTitle() {
|
38 |
+
return __( "Manage Login Duration", "defender-security" );
|
39 |
}
|
40 |
|
41 |
/**
|
91 |
}
|
92 |
} else {
|
93 |
wp_send_json_error( array(
|
94 |
+
'message' => __( 'Duration can only be a number and greater than 0', "defender-security" )
|
95 |
) );
|
96 |
}
|
97 |
}
|
191 |
$logout_msg = strip_tags( $login_msg );
|
192 |
if ( $logout_msg == 'session_expired' ) {
|
193 |
$duration = $this->getService()->getDuration( false );
|
194 |
+
$msg = sprintf( __( 'Your session has expired because it has been over %d days since your last login. Please log back in to continue.', "defender-security" ), $duration );
|
195 |
$msg = htmlspecialchars( $msg, ENT_QUOTES, 'UTF-8' );
|
196 |
$message .= '<p class="login message">'. $msg . '</p>';
|
197 |
}
|
app/module/hardener/component/php-version.php
CHANGED
@@ -27,7 +27,7 @@ class PHP_Version extends Rule {
|
|
27 |
}
|
28 |
|
29 |
public function getTitle() {
|
30 |
-
return __( "Update PHP to latest version",
|
31 |
}
|
32 |
|
33 |
function addHooks() {
|
27 |
}
|
28 |
|
29 |
public function getTitle() {
|
30 |
+
return __( "Update PHP to latest version", "defender-security" );
|
31 |
}
|
32 |
|
33 |
function addHooks() {
|
app/module/hardener/component/prevent-php-service.php
CHANGED
@@ -27,7 +27,6 @@ class Prevent_PHP_Service extends Rule_Service implements IRule_Service {
|
|
27 |
$status = wp_remote_head( $url, array( 'user-agent' => $_SERVER['HTTP_USER_AGENT'], 'timeout' => 10 ) );
|
28 |
if ( is_wp_error( $status ) ) {
|
29 |
//General error
|
30 |
-
Log_Helper::logger( $status->get_error_message() );
|
31 |
return false;
|
32 |
} else {
|
33 |
if ( 200 == wp_remote_retrieve_response_code( $status ) ) {
|
@@ -48,13 +47,13 @@ class Prevent_PHP_Service extends Rule_Service implements IRule_Service {
|
|
48 |
* @return bool|\WP_Error
|
49 |
*/
|
50 |
public function process() {
|
51 |
-
return new \WP_Error( Error_Code::INVALID, __( "Process is not possible on your current server",
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
* @return bool|\WP_Error
|
56 |
*/
|
57 |
public function revert() {
|
58 |
-
return new \WP_Error( Error_Code::INVALID, __( "Revert is not possible on your current server",
|
59 |
}
|
60 |
}
|
27 |
$status = wp_remote_head( $url, array( 'user-agent' => $_SERVER['HTTP_USER_AGENT'], 'timeout' => 10 ) );
|
28 |
if ( is_wp_error( $status ) ) {
|
29 |
//General error
|
|
|
30 |
return false;
|
31 |
} else {
|
32 |
if ( 200 == wp_remote_retrieve_response_code( $status ) ) {
|
47 |
* @return bool|\WP_Error
|
48 |
*/
|
49 |
public function process() {
|
50 |
+
return new \WP_Error( Error_Code::INVALID, __( "Process is not possible on your current server", "defender-security" ) );
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
* @return bool|\WP_Error
|
55 |
*/
|
56 |
public function revert() {
|
57 |
+
return new \WP_Error( Error_Code::INVALID, __( "Revert is not possible on your current server", "defender-security" ) );
|
58 |
}
|
59 |
}
|
app/module/hardener/component/prevent-php.php
CHANGED
@@ -33,7 +33,7 @@ class Prevent_Php extends Rule {
|
|
33 |
* @return string|void
|
34 |
*/
|
35 |
public function getTitle() {
|
36 |
-
return __( "Prevent PHP execution",
|
37 |
}
|
38 |
|
39 |
|
@@ -41,9 +41,9 @@ class Prevent_Php extends Rule {
|
|
41 |
if ( ! $this->verifyNonce() ) {
|
42 |
return;
|
43 |
}
|
44 |
-
$settings
|
45 |
-
if ( in_array( $settings->active_server
|
46 |
-
$service
|
47 |
$service->setHtConfig( $settings->getNewHtConfig() );
|
48 |
} else if ( $server == 'iis-7' ) {
|
49 |
$service = $this->getIisService();
|
@@ -52,7 +52,7 @@ class Prevent_Php extends Rule {
|
|
52 |
}
|
53 |
$ret = $service->revert();
|
54 |
if ( ! is_wp_error( $ret ) ) {
|
55 |
-
if ( in_array( $settings->active_server
|
56 |
$settings->saveExcludedFilePaths( array() );
|
57 |
$settings->saveNewHtConfig( array() );
|
58 |
}
|
@@ -75,10 +75,10 @@ class Prevent_Php extends Rule {
|
|
75 |
return;
|
76 |
}
|
77 |
|
78 |
-
$server
|
79 |
-
$file_paths = func_get_arg(1); //Get second param
|
80 |
if ( in_array( $server, array( 'apache', 'litespeed' ) ) ) {
|
81 |
-
$service
|
82 |
$service->setExcludeFilePaths( $file_paths ); //Set the paths
|
83 |
} else if ( $server == 'iis-7' ) {
|
84 |
$service = $this->getIisService();
|
@@ -105,11 +105,11 @@ class Prevent_Php extends Rule {
|
|
105 |
if ( ! $this->verifyNonce() ) {
|
106 |
return;
|
107 |
}
|
108 |
-
$settings
|
109 |
-
$server
|
110 |
-
$file_paths = func_get_arg(1); //Get second param
|
111 |
if ( in_array( $server, array( 'apache', 'litespeed' ) ) ) {
|
112 |
-
$service
|
113 |
$service->setHtConfig( $settings->getNewHtConfig() ); //Set the previous template
|
114 |
$service->unProtectContentDir(); //revert first
|
115 |
$service->setExcludeFilePaths( $file_paths ); //Set the paths
|
@@ -138,6 +138,7 @@ class Prevent_Php extends Rule {
|
|
138 |
if ( self::$service == null ) {
|
139 |
self::$service = new Prevent_PHP_Service();
|
140 |
}
|
|
|
141 |
return self::$service;
|
142 |
}
|
143 |
|
@@ -148,6 +149,7 @@ class Prevent_Php extends Rule {
|
|
148 |
if ( self::$apache_service == null ) {
|
149 |
self::$apache_service = new Apache_Service();
|
150 |
}
|
|
|
151 |
return self::$apache_service;
|
152 |
}
|
153 |
|
@@ -158,6 +160,7 @@ class Prevent_Php extends Rule {
|
|
158 |
if ( self::$iis_service == null ) {
|
159 |
self::$iis_service = new Iis_Service();
|
160 |
}
|
|
|
161 |
return self::$iis_service;
|
162 |
}
|
163 |
}
|
33 |
* @return string|void
|
34 |
*/
|
35 |
public function getTitle() {
|
36 |
+
return __( "Prevent PHP execution", "defender-security" );
|
37 |
}
|
38 |
|
39 |
|
41 |
if ( ! $this->verifyNonce() ) {
|
42 |
return;
|
43 |
}
|
44 |
+
$settings = Settings::instance();
|
45 |
+
if ( in_array( $settings->active_server, array( 'apache', 'litespeed' ) ) ) {
|
46 |
+
$service = $this->getApacheService();
|
47 |
$service->setHtConfig( $settings->getNewHtConfig() );
|
48 |
} else if ( $server == 'iis-7' ) {
|
49 |
$service = $this->getIisService();
|
52 |
}
|
53 |
$ret = $service->revert();
|
54 |
if ( ! is_wp_error( $ret ) ) {
|
55 |
+
if ( in_array( $settings->active_server, array( 'apache', 'litespeed' ) ) ) {
|
56 |
$settings->saveExcludedFilePaths( array() );
|
57 |
$settings->saveNewHtConfig( array() );
|
58 |
}
|
75 |
return;
|
76 |
}
|
77 |
|
78 |
+
$server = func_get_arg( 0 ); //Get first param
|
79 |
+
$file_paths = func_get_arg( 1 ); //Get second param
|
80 |
if ( in_array( $server, array( 'apache', 'litespeed' ) ) ) {
|
81 |
+
$service = $this->getApacheService();
|
82 |
$service->setExcludeFilePaths( $file_paths ); //Set the paths
|
83 |
} else if ( $server == 'iis-7' ) {
|
84 |
$service = $this->getIisService();
|
105 |
if ( ! $this->verifyNonce() ) {
|
106 |
return;
|
107 |
}
|
108 |
+
$settings = Settings::instance();
|
109 |
+
$server = func_get_arg( 0 ); //Get first param
|
110 |
+
$file_paths = func_get_arg( 1 ); //Get second param
|
111 |
if ( in_array( $server, array( 'apache', 'litespeed' ) ) ) {
|
112 |
+
$service = $this->getApacheService();
|
113 |
$service->setHtConfig( $settings->getNewHtConfig() ); //Set the previous template
|
114 |
$service->unProtectContentDir(); //revert first
|
115 |
$service->setExcludeFilePaths( $file_paths ); //Set the paths
|
138 |
if ( self::$service == null ) {
|
139 |
self::$service = new Prevent_PHP_Service();
|
140 |
}
|
141 |
+
|
142 |
return self::$service;
|
143 |
}
|
144 |
|
149 |
if ( self::$apache_service == null ) {
|
150 |
self::$apache_service = new Apache_Service();
|
151 |
}
|
152 |
+
|
153 |
return self::$apache_service;
|
154 |
}
|
155 |
|
160 |
if ( self::$iis_service == null ) {
|
161 |
self::$iis_service = new Iis_Service();
|
162 |
}
|
163 |
+
|
164 |
return self::$iis_service;
|
165 |
}
|
166 |
}
|
app/module/hardener/component/protect-information-service.php
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
namespace WP_Defender\Module\Hardener\Component;
|
7 |
|
8 |
use Hammer\Helper\WP_Helper;
|
|
|
9 |
use WP_Defender\Component\Error_Code;
|
10 |
use WP_Defender\Module\Hardener\IRule_Service;
|
11 |
use WP_Defender\Module\Hardener\Rule_Service;
|
@@ -41,20 +42,10 @@ class Protect_Information_Service extends Rule_Service implements IRule_Service
|
|
41 |
}
|
42 |
if ( ! is_writeable( $htPath ) ) {
|
43 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
44 |
-
sprintf( __( "The file %s is not writeable",
|
45 |
}
|
46 |
$htConfig = file( $htPath );
|
47 |
-
$rules
|
48 |
-
PHP_EOL . '## WP Defender - Prevent information disclosure ##' . PHP_EOL,
|
49 |
-
'<FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">' . PHP_EOL .
|
50 |
-
'Order allow,deny' . PHP_EOL .
|
51 |
-
'Deny from all' . PHP_EOL .
|
52 |
-
'</FilesMatch>' . PHP_EOL,
|
53 |
-
'<Files robots.txt>' . PHP_EOL .
|
54 |
-
'Allow from all' . PHP_EOL .
|
55 |
-
'</Files>' . PHP_EOL,
|
56 |
-
'## WP Defender - End ##' . PHP_EOL
|
57 |
-
);
|
58 |
$containsSearch = array_diff( $rules, $htConfig );
|
59 |
if ( count( $containsSearch ) == 0 || ( count( $containsSearch ) == count( $rules ) ) ) {
|
60 |
//append this
|
@@ -74,11 +65,48 @@ class Protect_Information_Service extends Rule_Service implements IRule_Service
|
|
74 |
$htPath = ABSPATH . '.htaccess';
|
75 |
if ( ! is_writeable( $htPath ) ) {
|
76 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
77 |
-
sprintf( __( "The file %s is not writeable",
|
78 |
}
|
79 |
$htConfig = file_get_contents( $htPath );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
$rules = array(
|
81 |
-
'## WP Defender - Prevent information disclosure ##' . PHP_EOL,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
'<FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">' . PHP_EOL .
|
83 |
'Order allow,deny' . PHP_EOL .
|
84 |
'Deny from all' . PHP_EOL .
|
@@ -88,15 +116,7 @@ class Protect_Information_Service extends Rule_Service implements IRule_Service
|
|
88 |
'</Files>' . PHP_EOL,
|
89 |
'## WP Defender - End ##'
|
90 |
);
|
91 |
-
$rules = implode( '', $rules );
|
92 |
-
$htConfig = str_replace( $rules, '', $htConfig );
|
93 |
-
$htConfig = trim( $htConfig );
|
94 |
-
file_put_contents( $htPath, $htConfig, LOCK_EX );
|
95 |
-
|
96 |
-
return true;
|
97 |
-
} else {
|
98 |
-
//Other servers we cant revert
|
99 |
-
return new \WP_Error( Error_Code::INVALID, __( "Revert is not possible on your current server", wp_defender()->domain ) );
|
100 |
}
|
|
|
101 |
}
|
102 |
}
|
6 |
namespace WP_Defender\Module\Hardener\Component;
|
7 |
|
8 |
use Hammer\Helper\WP_Helper;
|
9 |
+
use WP_Defender\Behavior\Utils;
|
10 |
use WP_Defender\Component\Error_Code;
|
11 |
use WP_Defender\Module\Hardener\IRule_Service;
|
12 |
use WP_Defender\Module\Hardener\Rule_Service;
|
42 |
}
|
43 |
if ( ! is_writeable( $htPath ) ) {
|
44 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
45 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
46 |
}
|
47 |
$htConfig = file( $htPath );
|
48 |
+
$rules = $this->apache_rule();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$containsSearch = array_diff( $rules, $htConfig );
|
50 |
if ( count( $containsSearch ) == 0 || ( count( $containsSearch ) == count( $rules ) ) ) {
|
51 |
//append this
|
65 |
$htPath = ABSPATH . '.htaccess';
|
66 |
if ( ! is_writeable( $htPath ) ) {
|
67 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
68 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
69 |
}
|
70 |
$htConfig = file_get_contents( $htPath );
|
71 |
+
$rules = $this->apache_rule();
|
72 |
+
|
73 |
+
preg_match_all('/## WP Defender(.*?)## WP Defender - End ##/s', $htConfig, $matches);
|
74 |
+
if ( is_array( $matches ) && count( $matches ) > 0 ) {
|
75 |
+
$htConfig = str_replace( implode( '', $matches[0] ), '', $htConfig );
|
76 |
+
} else {
|
77 |
+
$htConfig = str_replace( implode( '', $rules ), '', $htConfig );
|
78 |
+
}
|
79 |
+
$htConfig = trim( $htConfig );
|
80 |
+
file_put_contents( $htPath, $htConfig, LOCK_EX );
|
81 |
+
|
82 |
+
return true;
|
83 |
+
} else {
|
84 |
+
//Other servers we cant revert
|
85 |
+
return new \WP_Error( Error_Code::INVALID, __( "Revert is not possible on your current server", "defender-security" ) );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get Apache rule depending on the version
|
91 |
+
*
|
92 |
+
* @return array
|
93 |
+
*/
|
94 |
+
protected static function apache_rule() {
|
95 |
+
$version = Utils::instance()->determineApacheVersion();
|
96 |
+
if ( floatval( $version ) >= 2.4 ) {
|
97 |
$rules = array(
|
98 |
+
PHP_EOL . '## WP Defender - Prevent information disclosure ##' . PHP_EOL,
|
99 |
+
'<FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">' . PHP_EOL .
|
100 |
+
'Require all denied' . PHP_EOL .
|
101 |
+
'</FilesMatch>' . PHP_EOL,
|
102 |
+
'<Files robots.txt>' . PHP_EOL .
|
103 |
+
'Require all granted' . PHP_EOL .
|
104 |
+
'</Files>' . PHP_EOL,
|
105 |
+
'## WP Defender - End ##'
|
106 |
+
);
|
107 |
+
} else {
|
108 |
+
$rules = array(
|
109 |
+
PHP_EOL . '## WP Defender - Prevent information disclosure ##' . PHP_EOL,
|
110 |
'<FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">' . PHP_EOL .
|
111 |
'Order allow,deny' . PHP_EOL .
|
112 |
'Deny from all' . PHP_EOL .
|
116 |
'</Files>' . PHP_EOL,
|
117 |
'## WP Defender - End ##'
|
118 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
+
return $rules;
|
121 |
}
|
122 |
}
|
app/module/hardener/component/protect-information.php
CHANGED
@@ -25,7 +25,7 @@ class Protect_Information extends Rule {
|
|
25 |
}
|
26 |
|
27 |
public function getTitle() {
|
28 |
-
return __( "Prevent Information Disclosure",
|
29 |
}
|
30 |
|
31 |
function revert() {
|
25 |
}
|
26 |
|
27 |
public function getTitle() {
|
28 |
+
return __( "Prevent Information Disclosure", "defender-security" );
|
29 |
}
|
30 |
|
31 |
function revert() {
|
app/module/hardener/component/security-key-service.php
CHANGED
@@ -45,7 +45,7 @@ class Security_Key_Service extends Rule_Service implements IRule_Service {
|
|
45 |
//check if can write
|
46 |
if ( ! is_writeable( $config_path ) ) {
|
47 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
48 |
-
sprintf( __( "The file %s is not writeable",
|
49 |
}
|
50 |
|
51 |
return $this->generateSalt( $config_path );
|
@@ -114,7 +114,7 @@ class Security_Key_Service extends Rule_Service implements IRule_Service {
|
|
114 |
//now check the missing
|
115 |
if ( count( $missing ) ) {
|
116 |
//for any reason we missing a security key, this mean wp-config altered by 3rd party, halt
|
117 |
-
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.",
|
118 |
}
|
119 |
|
120 |
//we already check for perm above, no need to check again
|
45 |
//check if can write
|
46 |
if ( ! is_writeable( $config_path ) ) {
|
47 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
48 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $config_path ) );
|
49 |
}
|
50 |
|
51 |
return $this->generateSalt( $config_path );
|
114 |
//now check the missing
|
115 |
if ( count( $missing ) ) {
|
116 |
//for any reason we missing a security key, this mean wp-config altered by 3rd party, halt
|
117 |
+
return new \WP_Error( Error_Code::UNKNOWN_WPCONFIG, __( "Defender can't recognize your wp-config.php, please revert it to original state for further process.", "defender-security" ) );
|
118 |
}
|
119 |
|
120 |
//we already check for perm above, no need to check again
|
app/module/hardener/component/security-key.php
CHANGED
@@ -37,7 +37,7 @@ class Security_Key extends Rule {
|
|
37 |
* @return string
|
38 |
*/
|
39 |
function getTitle() {
|
40 |
-
return __( "Update old security keys",
|
41 |
}
|
42 |
|
43 |
function check() {
|
@@ -79,7 +79,7 @@ class Security_Key extends Rule {
|
|
79 |
} else {
|
80 |
Settings::instance()->addToResolved( self::$slug );
|
81 |
wp_send_json_success( array(
|
82 |
-
'message' => sprintf( __( 'All key salts have been regenerated. You will now need to <a href="%s"><strong>re-login</strong></a>.<br/>This will auto reload after <span class="hardener-timer">10</span> seconds.',
|
83 |
'reload' => 10
|
84 |
) );
|
85 |
}
|
37 |
* @return string
|
38 |
*/
|
39 |
function getTitle() {
|
40 |
+
return __( "Update old security keys", "defender-security" );
|
41 |
}
|
42 |
|
43 |
function check() {
|
79 |
} else {
|
80 |
Settings::instance()->addToResolved( self::$slug );
|
81 |
wp_send_json_success( array(
|
82 |
+
'message' => sprintf( __( 'All key salts have been regenerated. You will now need to <a href="%s"><strong>re-login</strong></a>.<br/>This will auto reload after <span class="hardener-timer">10</span> seconds.', "defender-security" ), network_admin_url( 'admin.php?page=wdf-hardener' ) ),
|
83 |
'reload' => 10
|
84 |
) );
|
85 |
}
|
app/module/hardener/component/servers/apache-service.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
|
6 |
namespace WP_Defender\Module\Hardener\Component\Servers;
|
7 |
|
|
|
8 |
use WP_Defender\Component\Error_Code;
|
9 |
use WP_Defender\Module\Hardener\IRule_Service;
|
10 |
use WP_Defender\Module\Hardener\Rule_Service;
|
@@ -58,24 +59,25 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
58 |
if ( ! is_file( $htPath ) ) {
|
59 |
if ( ! file_put_contents( $htPath, '', LOCK_EX ) ) {
|
60 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
61 |
-
sprintf( __( "The file %s is not writeable",
|
62 |
}
|
63 |
} elseif ( ! is_writeable( $htPath ) ) {
|
64 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
65 |
-
sprintf( __( "The file %s is not writeable",
|
66 |
}
|
67 |
-
$htConfig
|
68 |
-
$
|
|
|
|
|
69 |
PHP_EOL . '## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
70 |
'<Files *.php>' . PHP_EOL .
|
71 |
-
|
72 |
-
'Deny from all' . PHP_EOL .
|
73 |
'</Files>' . PHP_EOL,
|
74 |
'<Files wp-tinymce.php>' . PHP_EOL .
|
75 |
-
|
76 |
'</Files>' . PHP_EOL,
|
77 |
'<Files ms-files.php>' . PHP_EOL .
|
78 |
-
|
79 |
'</Files>' . PHP_EOL,
|
80 |
'## WP Defender - End ##' . PHP_EOL
|
81 |
);
|
@@ -101,18 +103,19 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
101 |
if ( ! file_exists( $htPath ) ) {
|
102 |
if ( ! file_put_contents( $htPath, '', LOCK_EX ) ) {
|
103 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
104 |
-
sprintf( __( "The file %s is not writeable",
|
105 |
}
|
106 |
} elseif ( ! is_writeable( $htPath ) ) {
|
107 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
108 |
-
sprintf( __( "The file %s is not writeable",
|
109 |
}
|
110 |
-
$htConfig
|
111 |
-
$
|
|
|
|
|
112 |
PHP_EOL . '## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
113 |
'<Files *.php>' . PHP_EOL .
|
114 |
-
|
115 |
-
'Deny from all' . PHP_EOL .
|
116 |
'</Files>' . PHP_EOL,
|
117 |
'## WP Defender - End ##' . PHP_EOL
|
118 |
);
|
@@ -125,7 +128,7 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
125 |
$file_path = trim( preg_replace('/\s\s+/', ' ', $file_path ) ); //remove trailing new lines
|
126 |
if ( !empty( $file_path ) ) {
|
127 |
$custom_exclude[] = '<Files ' . $file_path . '> '. PHP_EOL .
|
128 |
-
|
129 |
'</Files>' . PHP_EOL;
|
130 |
}
|
131 |
}
|
@@ -155,14 +158,14 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
155 |
$htPath = WP_CONTENT_DIR . '/' . '.htaccess';
|
156 |
if ( ! is_writeable( $htPath ) ) {
|
157 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
158 |
-
sprintf( __( "The file %s is not writeable",
|
159 |
}
|
160 |
-
$htConfig
|
161 |
-
$
|
162 |
-
|
|
|
163 |
'<Files *.php>' . PHP_EOL .
|
164 |
-
|
165 |
-
'Deny from all' . PHP_EOL .
|
166 |
'</Files>' . PHP_EOL,
|
167 |
'## WP Defender - End ##' . PHP_EOL
|
168 |
);
|
@@ -186,24 +189,31 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
186 |
$htPath = ABSPATH . WPINC . '/' . '.htaccess';
|
187 |
if ( ! is_writeable( $htPath ) ) {
|
188 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
189 |
-
sprintf( __( "The file %s is not writeable",
|
190 |
}
|
191 |
-
$htConfig
|
192 |
-
$
|
193 |
-
|
|
|
|
|
194 |
'<Files *.php>' . PHP_EOL .
|
195 |
-
|
196 |
-
'Deny from all' . PHP_EOL .
|
197 |
'</Files>' . PHP_EOL,
|
198 |
'<Files wp-tinymce.php>' . PHP_EOL .
|
199 |
-
|
200 |
'</Files>' . PHP_EOL,
|
201 |
'<Files ms-files.php>' . PHP_EOL .
|
202 |
-
|
203 |
'</Files>' . PHP_EOL,
|
204 |
'## WP Defender - End ##' . PHP_EOL
|
205 |
);
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
$htConfig = trim( $htConfig );
|
208 |
file_put_contents( $htPath, $htConfig, LOCK_EX );
|
209 |
}
|
@@ -265,5 +275,28 @@ class Apache_Service extends Rule_Service implements IRule_Service {
|
|
265 |
public function getNewHtConfig() {
|
266 |
return $this->new_htconfig;
|
267 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
?>
|
5 |
|
6 |
namespace WP_Defender\Module\Hardener\Component\Servers;
|
7 |
|
8 |
+
use WP_Defender\Behavior\Utils;
|
9 |
use WP_Defender\Component\Error_Code;
|
10 |
use WP_Defender\Module\Hardener\IRule_Service;
|
11 |
use WP_Defender\Module\Hardener\Rule_Service;
|
59 |
if ( ! is_file( $htPath ) ) {
|
60 |
if ( ! file_put_contents( $htPath, '', LOCK_EX ) ) {
|
61 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
62 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
63 |
}
|
64 |
} elseif ( ! is_writeable( $htPath ) ) {
|
65 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
66 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
67 |
}
|
68 |
+
$htConfig = file( $htPath );
|
69 |
+
$deny = $this->generateHtAccessRule( false );
|
70 |
+
$allow = $this->generateHtAccessRule( true );
|
71 |
+
$default = array(
|
72 |
PHP_EOL . '## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
73 |
'<Files *.php>' . PHP_EOL .
|
74 |
+
$deny .
|
|
|
75 |
'</Files>' . PHP_EOL,
|
76 |
'<Files wp-tinymce.php>' . PHP_EOL .
|
77 |
+
$allow .
|
78 |
'</Files>' . PHP_EOL,
|
79 |
'<Files ms-files.php>' . PHP_EOL .
|
80 |
+
$allow .
|
81 |
'</Files>' . PHP_EOL,
|
82 |
'## WP Defender - End ##' . PHP_EOL
|
83 |
);
|
103 |
if ( ! file_exists( $htPath ) ) {
|
104 |
if ( ! file_put_contents( $htPath, '', LOCK_EX ) ) {
|
105 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
106 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
107 |
}
|
108 |
} elseif ( ! is_writeable( $htPath ) ) {
|
109 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
110 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
111 |
}
|
112 |
+
$htConfig = file( $htPath );
|
113 |
+
$deny = $this->generateHtAccessRule( false );
|
114 |
+
$allow = $this->generateHtAccessRule( true );
|
115 |
+
$default = array(
|
116 |
PHP_EOL . '## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
117 |
'<Files *.php>' . PHP_EOL .
|
118 |
+
$deny .
|
|
|
119 |
'</Files>' . PHP_EOL,
|
120 |
'## WP Defender - End ##' . PHP_EOL
|
121 |
);
|
128 |
$file_path = trim( preg_replace('/\s\s+/', ' ', $file_path ) ); //remove trailing new lines
|
129 |
if ( !empty( $file_path ) ) {
|
130 |
$custom_exclude[] = '<Files ' . $file_path . '> '. PHP_EOL .
|
131 |
+
$allow .
|
132 |
'</Files>' . PHP_EOL;
|
133 |
}
|
134 |
}
|
158 |
$htPath = WP_CONTENT_DIR . '/' . '.htaccess';
|
159 |
if ( ! is_writeable( $htPath ) ) {
|
160 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
161 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
162 |
}
|
163 |
+
$htConfig = file_get_contents( $htPath );
|
164 |
+
$deny = $this->generateHtAccessRule( false );
|
165 |
+
$default = array(
|
166 |
+
PHP_EOL .'## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
167 |
'<Files *.php>' . PHP_EOL .
|
168 |
+
$deny .
|
|
|
169 |
'</Files>' . PHP_EOL,
|
170 |
'## WP Defender - End ##' . PHP_EOL
|
171 |
);
|
189 |
$htPath = ABSPATH . WPINC . '/' . '.htaccess';
|
190 |
if ( ! is_writeable( $htPath ) ) {
|
191 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
192 |
+
sprintf( __( "The file %s is not writeable", "defender-security" ), $htPath ) );
|
193 |
}
|
194 |
+
$htConfig = file_get_contents( $htPath );
|
195 |
+
$deny = $this->generateHtAccessRule( false );
|
196 |
+
$allow = $this->generateHtAccessRule( true );
|
197 |
+
$default = array(
|
198 |
+
PHP_EOL . '## WP Defender - Protect PHP Executed ##' . PHP_EOL,
|
199 |
'<Files *.php>' . PHP_EOL .
|
200 |
+
$deny .
|
|
|
201 |
'</Files>' . PHP_EOL,
|
202 |
'<Files wp-tinymce.php>' . PHP_EOL .
|
203 |
+
$allow .
|
204 |
'</Files>' . PHP_EOL,
|
205 |
'<Files ms-files.php>' . PHP_EOL .
|
206 |
+
$allow .
|
207 |
'</Files>' . PHP_EOL,
|
208 |
'## WP Defender - End ##' . PHP_EOL
|
209 |
);
|
210 |
+
|
211 |
+
preg_match_all('/## WP Defender(.*?)## WP Defender - End ##/s', $htConfig, $matches);
|
212 |
+
if ( is_array( $matches ) && count( $matches ) > 0 ) {
|
213 |
+
$htConfig = str_replace( implode( '', $matches[0] ), '', $htConfig );
|
214 |
+
} else {
|
215 |
+
$htConfig = str_replace( implode( '', $default ), '', $htConfig );
|
216 |
+
}
|
217 |
$htConfig = trim( $htConfig );
|
218 |
file_put_contents( $htPath, $htConfig, LOCK_EX );
|
219 |
}
|
275 |
public function getNewHtConfig() {
|
276 |
return $this->new_htconfig;
|
277 |
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Return the correct apache rules for allow/deny
|
281 |
+
*
|
282 |
+
* @return String
|
283 |
+
*/
|
284 |
+
protected function generateHtAccessRule( $allow = true ) {
|
285 |
+
$version = Utils::instance()->determineApacheVersion();
|
286 |
+
if ( floatval( $version ) >= 2.4 ) {
|
287 |
+
if ( $allow ) {
|
288 |
+
return 'Require all granted' . PHP_EOL;
|
289 |
+
} else {
|
290 |
+
return 'Require all denied' . PHP_EOL;
|
291 |
+
}
|
292 |
+
} else {
|
293 |
+
if ( $allow ) {
|
294 |
+
return 'Allow from all' . PHP_EOL;
|
295 |
+
} else {
|
296 |
+
return 'Order allow,deny' . PHP_EOL .
|
297 |
+
'Deny from all' . PHP_EOL;
|
298 |
+
}
|
299 |
+
}
|
300 |
+
}
|
301 |
}
|
302 |
?>
|
app/module/hardener/component/servers/iis-service.php
CHANGED
@@ -40,7 +40,7 @@ class Iis_Service extends Rule_Service implements IRule_Service {
|
|
40 |
$doc->preserveWhiteSpace = true;
|
41 |
if ( $doc->load( $path . '/' . $filename ) === false ) {
|
42 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
43 |
-
sprintf( __( "The file %s could not be loaded",
|
44 |
}
|
45 |
$xpath = new \DOMXPath( $doc );
|
46 |
$read_accesspolicy = $xpath->query( '/configuration/system.webServer/handlers[starts-with(@accessPolicy,\'Read\')]' );
|
40 |
$doc->preserveWhiteSpace = true;
|
41 |
if ( $doc->load( $path . '/' . $filename ) === false ) {
|
42 |
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
43 |
+
sprintf( __( "The file %s could not be loaded", "defender-security" ), $filename ) );
|
44 |
}
|
45 |
$xpath = new \DOMXPath( $doc );
|
46 |
$read_accesspolicy = $xpath->query( '/configuration/system.webServer/handlers[starts-with(@accessPolicy,\'Read\')]' );
|
app/module/hardener/component/wp-version.php
CHANGED
@@ -27,7 +27,7 @@ class WP_Version extends Rule {
|
|
27 |
}
|
28 |
|
29 |
public function getTitle() {
|
30 |
-
return __( "Update WordPress to latest version",
|
31 |
}
|
32 |
|
33 |
function addHooks() {
|
27 |
}
|
28 |
|
29 |
public function getTitle() {
|
30 |
+
return __( "Update WordPress to latest version", "defender-security" );
|
31 |
}
|
32 |
|
33 |
function addHooks() {
|
app/module/hardener/controller/main.php
CHANGED
@@ -55,7 +55,7 @@ class Main extends Controller {
|
|
55 |
if ( is_object( $rule ) ) {
|
56 |
$rule->restore();
|
57 |
wp_send_json_success( array(
|
58 |
-
'message' => __( "Security tweak successfully restored.",
|
59 |
'issues' => $this->getCount( 'issues' ),
|
60 |
'fixed' => $this->getCount( 'fixed' ),
|
61 |
'ignore' => $this->getCount( 'ignore' )
|
@@ -73,7 +73,7 @@ class Main extends Controller {
|
|
73 |
if ( is_object( $rule ) ) {
|
74 |
$rule->ignore();
|
75 |
wp_send_json_success( array(
|
76 |
-
'message' => __( "Security tweak successfully ignored.",
|
77 |
'issues' => $this->getCount( 'issues' ),
|
78 |
'fixed' => $this->getCount( 'fixed' ),
|
79 |
'ignore' => $this->getCount( 'ignore' )
|
@@ -89,7 +89,7 @@ class Main extends Controller {
|
|
89 |
do_action( "processRevert" . $slug );
|
90 |
//fall back
|
91 |
wp_send_json_success( array(
|
92 |
-
'message' => __( "Security tweak successfully reverted.",
|
93 |
'issues' => $this->getCount( 'issues' ),
|
94 |
'fixed' => $this->getCount( 'fixed' ),
|
95 |
'ignore' => $this->getCount( 'ignore' )
|
@@ -115,7 +115,7 @@ class Main extends Controller {
|
|
115 |
do_action( "processingHardener" . $slug , $server, $file_paths );
|
116 |
//fall back
|
117 |
wp_send_json_success( array(
|
118 |
-
'message' => __( "Security tweak successfully resolved.",
|
119 |
'issues' => $this->getCount( 'issues' ),
|
120 |
'fixed' => $this->getCount( 'fixed' ),
|
121 |
'ignore' => $this->getCount( 'ignore' )
|
@@ -143,7 +143,7 @@ class Main extends Controller {
|
|
143 |
do_action( "processUpdate" . $slug , $server, $file_paths );
|
144 |
//fall back
|
145 |
wp_send_json_success( array(
|
146 |
-
'message' => __( "Security tweak successfully updated.",
|
147 |
'issues' => $this->getCount( 'issues' ),
|
148 |
'fixed' => $this->getCount( 'fixed' ),
|
149 |
'ignore' => $this->getCount( 'ignore' ),
|
@@ -156,7 +156,7 @@ class Main extends Controller {
|
|
156 |
*/
|
157 |
public function adminMenu() {
|
158 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
159 |
-
add_submenu_page( 'wp-defender', esc_html__( "Security Tweaks",
|
160 |
&$this,
|
161 |
'actionIndex'
|
162 |
) );
|
55 |
if ( is_object( $rule ) ) {
|
56 |
$rule->restore();
|
57 |
wp_send_json_success( array(
|
58 |
+
'message' => __( "Security tweak successfully restored.", "defender-security" ),
|
59 |
'issues' => $this->getCount( 'issues' ),
|
60 |
'fixed' => $this->getCount( 'fixed' ),
|
61 |
'ignore' => $this->getCount( 'ignore' )
|
73 |
if ( is_object( $rule ) ) {
|
74 |
$rule->ignore();
|
75 |
wp_send_json_success( array(
|
76 |
+
'message' => __( "Security tweak successfully ignored.", "defender-security" ),
|
77 |
'issues' => $this->getCount( 'issues' ),
|
78 |
'fixed' => $this->getCount( 'fixed' ),
|
79 |
'ignore' => $this->getCount( 'ignore' )
|
89 |
do_action( "processRevert" . $slug );
|
90 |
//fall back
|
91 |
wp_send_json_success( array(
|
92 |
+
'message' => __( "Security tweak successfully reverted.", "defender-security" ),
|
93 |
'issues' => $this->getCount( 'issues' ),
|
94 |
'fixed' => $this->getCount( 'fixed' ),
|
95 |
'ignore' => $this->getCount( 'ignore' )
|
115 |
do_action( "processingHardener" . $slug , $server, $file_paths );
|
116 |
//fall back
|
117 |
wp_send_json_success( array(
|
118 |
+
'message' => __( "Security tweak successfully resolved.", "defender-security" ),
|
119 |
'issues' => $this->getCount( 'issues' ),
|
120 |
'fixed' => $this->getCount( 'fixed' ),
|
121 |
'ignore' => $this->getCount( 'ignore' )
|
143 |
do_action( "processUpdate" . $slug , $server, $file_paths );
|
144 |
//fall back
|
145 |
wp_send_json_success( array(
|
146 |
+
'message' => __( "Security tweak successfully updated.", "defender-security" ),
|
147 |
'issues' => $this->getCount( 'issues' ),
|
148 |
'fixed' => $this->getCount( 'fixed' ),
|
149 |
'ignore' => $this->getCount( 'ignore' ),
|
156 |
*/
|
157 |
public function adminMenu() {
|
158 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
159 |
+
add_submenu_page( 'wp-defender', esc_html__( "Security Tweaks", "defender-security" ), esc_html__( "Security Tweaks", "defender-security" ), $cap, $this->slug, array(
|
160 |
&$this,
|
161 |
'actionIndex'
|
162 |
) );
|
app/module/hardener/rule.php
CHANGED
@@ -108,7 +108,7 @@ abstract class Rule extends Component {
|
|
108 |
<input type="hidden" name="action" value="ignoreHardener"/>
|
109 |
<input type="hidden" name="slug" value="<?php echo static::$slug ?>"/>
|
110 |
<button type="submit" name="ignore" value="ignore"
|
111 |
-
class="button button-secondary"><?php _e( "Ignore",
|
112 |
</form>
|
113 |
<?php
|
114 |
}
|
@@ -133,7 +133,7 @@ abstract class Rule extends Component {
|
|
133 |
<input type="hidden" name="action" value="restoreHardener"/>
|
134 |
<input type="hidden" name="slug" value="<?php echo static::$slug ?>"/>
|
135 |
<button type="submit"
|
136 |
-
class="button button-secondary button-small"><?php _e( "Restore",
|
137 |
</form>
|
138 |
<div class="clear"></div>
|
139 |
</div>
|
108 |
<input type="hidden" name="action" value="ignoreHardener"/>
|
109 |
<input type="hidden" name="slug" value="<?php echo static::$slug ?>"/>
|
110 |
<button type="submit" name="ignore" value="ignore"
|
111 |
+
class="button button-secondary"><?php _e( "Ignore", "defender-security" ) ?></button>
|
112 |
</form>
|
113 |
<?php
|
114 |
}
|
133 |
<input type="hidden" name="action" value="restoreHardener"/>
|
134 |
<input type="hidden" name="slug" value="<?php echo static::$slug ?>"/>
|
135 |
<button type="submit"
|
136 |
+
class="button button-secondary button-small"><?php _e( "Restore", "defender-security" ) ?></button>
|
137 |
</form>
|
138 |
<div class="clear"></div>
|
139 |
</div>
|
app/module/hardener/view/ignore.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "IGNORED",
|
4 |
<?php if ( $controller->getCount( 'ignore' ) ): ?>
|
5 |
<span class="def-tag tag-generic count-ignored">
|
6 |
<?php echo $controller->getCount( 'ignore' ) ?>
|
@@ -12,7 +12,7 @@
|
|
12 |
<div class="box-content">
|
13 |
<?php if ( count( \WP_Defender\Module\Hardener\Model\Settings::instance()->ignore ) > 0 ): ?>
|
14 |
<div class="line">
|
15 |
-
<?php _e( "You have chosen to ignore these fixes. You can restore and action them at any time.",
|
16 |
</div>
|
17 |
<div class="rules ignored">
|
18 |
<?php foreach ( \WP_Defender\Module\Hardener\Model\Settings::instance()->getIgnore() as $rule ): ?>
|
@@ -24,7 +24,7 @@
|
|
24 |
<?php else: ?>
|
25 |
<div class="well well-blue with-cap">
|
26 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
27 |
-
<?php _e( "You haven't ignored any issues yet. You can ignore any security tweaks you don't want to be warned about by clicking 'Ignore' inside the issue description.",
|
28 |
</div>
|
29 |
<?php endif; ?>
|
30 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "IGNORED", "defender-security" ) ?>
|
4 |
<?php if ( $controller->getCount( 'ignore' ) ): ?>
|
5 |
<span class="def-tag tag-generic count-ignored">
|
6 |
<?php echo $controller->getCount( 'ignore' ) ?>
|
12 |
<div class="box-content">
|
13 |
<?php if ( count( \WP_Defender\Module\Hardener\Model\Settings::instance()->ignore ) > 0 ): ?>
|
14 |
<div class="line">
|
15 |
+
<?php _e( "You have chosen to ignore these fixes. You can restore and action them at any time.", "defender-security" ) ?>
|
16 |
</div>
|
17 |
<div class="rules ignored">
|
18 |
<?php foreach ( \WP_Defender\Module\Hardener\Model\Settings::instance()->getIgnore() as $rule ): ?>
|
24 |
<?php else: ?>
|
25 |
<div class="well well-blue with-cap">
|
26 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
27 |
+
<?php _e( "You haven't ignored any issues yet. You can ignore any security tweaks you don't want to be warned about by clicking 'Ignore' inside the issue description.", "defender-security" ) ?>
|
28 |
</div>
|
29 |
<?php endif; ?>
|
30 |
</div>
|
app/module/hardener/view/issues.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Issues",
|
4 |
<?php if ( $controller->getCount( 'issues' ) ): ?>
|
5 |
<span class="def-tag tag-yellow count-issues"><?php echo $controller->getCount( 'issues' ) ?></span>
|
6 |
<?php endif; ?>
|
@@ -9,7 +9,7 @@
|
|
9 |
<div class="box-content">
|
10 |
<div class="box-content">
|
11 |
<div class="line">
|
12 |
-
<?php _e( "There are a number of security tweaks you can make to your website to strengthen it against harmful hackers and bots that try to break in. We recommend you action as many tweaks as possible.",
|
13 |
</div>
|
14 |
<div class="rules">
|
15 |
<?php
|
@@ -19,7 +19,7 @@
|
|
19 |
?>
|
20 |
<div class="well well-green with-cap">
|
21 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
22 |
-
<?php _e( "You have actioned all available security tweaks. Great work!",
|
23 |
</div>
|
24 |
<?php
|
25 |
} else {
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Issues", "defender-security" ) ?>
|
4 |
<?php if ( $controller->getCount( 'issues' ) ): ?>
|
5 |
<span class="def-tag tag-yellow count-issues"><?php echo $controller->getCount( 'issues' ) ?></span>
|
6 |
<?php endif; ?>
|
9 |
<div class="box-content">
|
10 |
<div class="box-content">
|
11 |
<div class="line">
|
12 |
+
<?php _e( "There are a number of security tweaks you can make to your website to strengthen it against harmful hackers and bots that try to break in. We recommend you action as many tweaks as possible.", "defender-security" ) ?>
|
13 |
</div>
|
14 |
<div class="rules">
|
15 |
<?php
|
19 |
?>
|
20 |
<div class="well well-green with-cap">
|
21 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
22 |
+
<?php _e( "You have actioned all available security tweaks. Great work!", "defender-security" ) ?>
|
23 |
</div>
|
24 |
<?php
|
25 |
} else {
|
app/module/hardener/view/layouts/layout.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="wrap">
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
-
<h2 class="title"><?php _e( "Security Tweaks",
|
4 |
<div class="hardener">
|
5 |
<div class="dev-box summary-box">
|
6 |
<div class="box-content">
|
@@ -15,9 +15,9 @@
|
|
15 |
<?php if ( $controller->getCount( 'issues' ) > 0 ) :
|
16 |
$hardener_issues = ( $controller->getCount( 'fixed' ) + $controller->getCount( 'ignore' ) ) . '/' . count( \WP_Defender\Module\Hardener\Model\Settings::instance()->getDefinedRules( false ) );
|
17 |
?>
|
18 |
-
<span class="" tooltip="<?php esc_attr_e( sprintf( __('You have actioned %s security tweaks.',
|
19 |
<?php else : ?>
|
20 |
-
<span class="" tooltip="<?php esc_attr_e( 'You have no outstanding security issues.',
|
21 |
<?php endif; ?>
|
22 |
<?php
|
23 |
$icon = $controller->getCount( 'issues' ) == 0 ? ' <i class="def-icon icon-tick icon-active" aria-hidden="true"></i>' : ' <i class="def-icon icon-warning" aria-hidden="true"></i>';
|
@@ -25,20 +25,20 @@
|
|
25 |
?>
|
26 |
</span>
|
27 |
<div class="clear"></div>
|
28 |
-
<span class="sub"><?php _e( "Security tweaks actioned",
|
29 |
</div>
|
30 |
</div>
|
31 |
<div class="column is-5">
|
32 |
<ul class="dev-list bold">
|
33 |
<li>
|
34 |
<div>
|
35 |
-
<span class="list-label"><?php _e( "PHP Version",
|
36 |
<span class="list-detail"><?php echo $controller->getPHPVersion() ?></span>
|
37 |
</div>
|
38 |
</li>
|
39 |
<li>
|
40 |
<div>
|
41 |
-
<span class="list-label"><?php _e( "WordPress Version",
|
42 |
<span class="list-detail">
|
43 |
<?php
|
44 |
echo \WP_Defender\Behavior\Utils::instance()->getWPVersion();
|
@@ -58,11 +58,11 @@
|
|
58 |
<li>
|
59 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
60 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>">
|
61 |
-
<?php _e( "Issues",
|
62 |
<?php
|
63 |
$tooltip = '';
|
64 |
if ( $controller->getCount( 'issues' ) > 0 ) :
|
65 |
-
$tooltip = 'tooltip="'.esc_attr( sprintf( __('You have %d security tweak(s) needing attention.',
|
66 |
endif;
|
67 |
?>
|
68 |
<span class="def-tag count-issues tag-yellow <?php echo $controller->getCount( 'issues' ) == 0 ? 'wd-hide' : null ?>" <?php echo $tooltip; ?>><?php echo $controller->getCount( 'issues' ) ?></span>
|
@@ -71,14 +71,14 @@
|
|
71 |
<li>
|
72 |
<a class="<?php echo $controller->isView( 'resolved' ) ? 'active' : null ?>"
|
73 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=resolved' ) ?>">
|
74 |
-
<?php _e( "Resolved",
|
75 |
<span class="count-resolved <?php echo $controller->getCount( 'fixed' ) == 0 ? 'wd-hide' : null ?>"><?php echo $controller->getCount( 'fixed' ) ?></span>
|
76 |
</a>
|
77 |
</li>
|
78 |
<li>
|
79 |
<a class="<?php echo $controller->isView( 'ignored' ) ? 'active' : null ?>"
|
80 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=ignored' ) ?>">
|
81 |
-
<?php _e( "Ignored",
|
82 |
<span class="count-ignored <?php echo $controller->getCount( 'ignore' ) == 0 ? 'wd-hide' : null ?>"><?php echo $controller->getCount( 'ignore' ) ?></span>
|
83 |
</a>
|
84 |
</li>
|
@@ -87,7 +87,7 @@
|
|
87 |
<?php //echo $controller->isView( 'notification' ) ? 'active' : null ?><!--"-->
|
88 |
<!-- href="-->
|
89 |
<?php //echo network_admin_url( 'admin.php?page=wdf-hardener&view=notification' ) ?><!--">-->
|
90 |
-
<?php //_e( "Notifications",
|
91 |
<!-- </li>-->
|
92 |
</ul>
|
93 |
</nav>
|
@@ -95,11 +95,11 @@
|
|
95 |
<nav role="navigation" aria-label="Filters">
|
96 |
<select class="mobile-nav">
|
97 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
98 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>"><?php _e( "Issues",
|
99 |
<option <?php selected( 'resolved', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
100 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=resolved' ) ?>"><?php _e( "Resolved",
|
101 |
<option <?php selected( 'ignored', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
102 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=ignored' ) ?>"><?php _e( "Ignored",
|
103 |
</select>
|
104 |
</nav>
|
105 |
</div>
|
1 |
<div class="wrap">
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
+
<h2 class="title"><?php _e( "Security Tweaks", "defender-security" ) ?></h2>
|
4 |
<div class="hardener">
|
5 |
<div class="dev-box summary-box">
|
6 |
<div class="box-content">
|
15 |
<?php if ( $controller->getCount( 'issues' ) > 0 ) :
|
16 |
$hardener_issues = ( $controller->getCount( 'fixed' ) + $controller->getCount( 'ignore' ) ) . '/' . count( \WP_Defender\Module\Hardener\Model\Settings::instance()->getDefinedRules( false ) );
|
17 |
?>
|
18 |
+
<span class="" tooltip="<?php esc_attr_e( sprintf( __('You have actioned %s security tweaks.', "defender-security" ), $hardener_issues ) ); ?>">
|
19 |
<?php else : ?>
|
20 |
+
<span class="" tooltip="<?php esc_attr_e( 'You have no outstanding security issues.', "defender-security" ); ?>">
|
21 |
<?php endif; ?>
|
22 |
<?php
|
23 |
$icon = $controller->getCount( 'issues' ) == 0 ? ' <i class="def-icon icon-tick icon-active" aria-hidden="true"></i>' : ' <i class="def-icon icon-warning" aria-hidden="true"></i>';
|
25 |
?>
|
26 |
</span>
|
27 |
<div class="clear"></div>
|
28 |
+
<span class="sub"><?php _e( "Security tweaks actioned", "defender-security" ) ?></span>
|
29 |
</div>
|
30 |
</div>
|
31 |
<div class="column is-5">
|
32 |
<ul class="dev-list bold">
|
33 |
<li>
|
34 |
<div>
|
35 |
+
<span class="list-label"><?php _e( "PHP Version", "defender-security" ) ?></span>
|
36 |
<span class="list-detail"><?php echo $controller->getPHPVersion() ?></span>
|
37 |
</div>
|
38 |
</li>
|
39 |
<li>
|
40 |
<div>
|
41 |
+
<span class="list-label"><?php _e( "WordPress Version", "defender-security" ) ?></span>
|
42 |
<span class="list-detail">
|
43 |
<?php
|
44 |
echo \WP_Defender\Behavior\Utils::instance()->getWPVersion();
|
58 |
<li>
|
59 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
60 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>">
|
61 |
+
<?php _e( "Issues", "defender-security" ) ?>
|
62 |
<?php
|
63 |
$tooltip = '';
|
64 |
if ( $controller->getCount( 'issues' ) > 0 ) :
|
65 |
+
$tooltip = 'tooltip="'.esc_attr( sprintf( __('You have %d security tweak(s) needing attention.', "defender-security" ), $controller->getCount( 'issues' ) ) ).'"';
|
66 |
endif;
|
67 |
?>
|
68 |
<span class="def-tag count-issues tag-yellow <?php echo $controller->getCount( 'issues' ) == 0 ? 'wd-hide' : null ?>" <?php echo $tooltip; ?>><?php echo $controller->getCount( 'issues' ) ?></span>
|
71 |
<li>
|
72 |
<a class="<?php echo $controller->isView( 'resolved' ) ? 'active' : null ?>"
|
73 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=resolved' ) ?>">
|
74 |
+
<?php _e( "Resolved", "defender-security" ) ?>
|
75 |
<span class="count-resolved <?php echo $controller->getCount( 'fixed' ) == 0 ? 'wd-hide' : null ?>"><?php echo $controller->getCount( 'fixed' ) ?></span>
|
76 |
</a>
|
77 |
</li>
|
78 |
<li>
|
79 |
<a class="<?php echo $controller->isView( 'ignored' ) ? 'active' : null ?>"
|
80 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=ignored' ) ?>">
|
81 |
+
<?php _e( "Ignored", "defender-security" ) ?>
|
82 |
<span class="count-ignored <?php echo $controller->getCount( 'ignore' ) == 0 ? 'wd-hide' : null ?>"><?php echo $controller->getCount( 'ignore' ) ?></span>
|
83 |
</a>
|
84 |
</li>
|
87 |
<?php //echo $controller->isView( 'notification' ) ? 'active' : null ?><!--"-->
|
88 |
<!-- href="-->
|
89 |
<?php //echo network_admin_url( 'admin.php?page=wdf-hardener&view=notification' ) ?><!--">-->
|
90 |
+
<?php //_e( "Notifications", "defender-security" ) ?><!--</a>-->
|
91 |
<!-- </li>-->
|
92 |
</ul>
|
93 |
</nav>
|
95 |
<nav role="navigation" aria-label="Filters">
|
96 |
<select class="mobile-nav">
|
97 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
98 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener' ) ?>"><?php _e( "Issues", "defender-security" ) ?></option>
|
99 |
<option <?php selected( 'resolved', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
100 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=resolved' ) ?>"><?php _e( "Resolved", "defender-security" ) ?></option>
|
101 |
<option <?php selected( 'ignored', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
102 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-hardener&view=ignored' ) ?>"><?php _e( "Ignored", "defender-security" ) ?></option>
|
103 |
</select>
|
104 |
</nav>
|
105 |
</div>
|
app/module/hardener/view/resolved.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "RESOLVED",
|
4 |
<span class="def-tag tag-success count-resolved">
|
5 |
<?php echo $controller->getCount( 'fixed' ) ?></span></h3>
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<div class="box-content">
|
9 |
<div class="line">
|
10 |
-
<?php _e( "Excellent work. The following vulnerabilities have been fixed.",
|
11 |
</div>
|
12 |
<div class="rules fixed">
|
13 |
<?php foreach ( \WP_Defender\Module\Hardener\Model\Settings::instance()->getFixed() as $rule ): ?>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "RESOLVED", "defender-security" ) ?>
|
4 |
<span class="def-tag tag-success count-resolved">
|
5 |
<?php echo $controller->getCount( 'fixed' ) ?></span></h3>
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<div class="box-content">
|
9 |
<div class="line">
|
10 |
+
<?php _e( "Excellent work. The following vulnerabilities have been fixed.", "defender-security" ) ?>
|
11 |
</div>
|
12 |
<div class="rules fixed">
|
13 |
<?php foreach ( \WP_Defender\Module\Hardener\Model\Settings::instance()->getFixed() as $rule ): ?>
|
app/module/hardener/view/rules/change-admin.php
CHANGED
@@ -5,33 +5,33 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Change default admin user account",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
<?php _e( "If you're using the default admin login name, you're giving away an important piece of the puzzle hackers
|
14 |
need to hijack your website. Having a default admin user account is bad practice, but one that's easily
|
15 |
-
fixed. Ensure you backup your database before choosing a new username.",
|
16 |
</div>
|
17 |
<h3>
|
18 |
-
<?php _e( "How to fix",
|
19 |
</h3>
|
20 |
<div class="well has-input">
|
21 |
<?php if ( $controller->check() ): ?>
|
22 |
-
<?php _e( "You don’t have a user with username admin.",
|
23 |
<?php else: ?>
|
24 |
<div class="line">
|
25 |
-
<p><?php _e( "Please change the username from admin to something unique.",
|
26 |
</div>
|
27 |
<form method="post" class="hardener-frm rule-process">
|
28 |
<?php $controller->createNonceField(); ?>
|
29 |
<input type="hidden" name="action" value="processHardener"/>
|
30 |
-
<input type="text" placeholder="<?php esc_attr_e( "Enter new username",
|
31 |
name="username" class="block" />
|
32 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
33 |
<button class="button float-r"
|
34 |
-
type="submit"><?php _e( "Update",
|
35 |
</form>
|
36 |
<?php $controller->showIgnoreForm() ?>
|
37 |
<div class="clear"></div>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Change default admin user account", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
<?php _e( "If you're using the default admin login name, you're giving away an important piece of the puzzle hackers
|
14 |
need to hijack your website. Having a default admin user account is bad practice, but one that's easily
|
15 |
+
fixed. Ensure you backup your database before choosing a new username.", "defender-security" ) ?>
|
16 |
</div>
|
17 |
<h3>
|
18 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
19 |
</h3>
|
20 |
<div class="well has-input">
|
21 |
<?php if ( $controller->check() ): ?>
|
22 |
+
<?php _e( "You don’t have a user with username admin.", "defender-security" ) ?>
|
23 |
<?php else: ?>
|
24 |
<div class="line">
|
25 |
+
<p><?php _e( "Please change the username from admin to something unique.", "defender-security" ) ?></p>
|
26 |
</div>
|
27 |
<form method="post" class="hardener-frm rule-process">
|
28 |
<?php $controller->createNonceField(); ?>
|
29 |
<input type="hidden" name="action" value="processHardener"/>
|
30 |
+
<input type="text" placeholder="<?php esc_attr_e( "Enter new username", "defender-security" ) ?>"
|
31 |
name="username" class="block" />
|
32 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
33 |
<button class="button float-r"
|
34 |
+
type="submit"><?php _e( "Update", "defender-security" ) ?></button>
|
35 |
</form>
|
36 |
<?php $controller->showIgnoreForm() ?>
|
37 |
<div class="clear"></div>
|
app/module/hardener/view/rules/db-prefix.php
CHANGED
@@ -5,36 +5,36 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Change default database prefix",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "When you first install WordPress on a new database, the default settings start with wp_ as the prefix to anything that gets stored in the tables. This makes it easier for hackers to perform SQL injection attacks if they find a code vulnerability. It’s good practice to come up with a unique prefix to protect yourself from this. Please backup your database before changing the prefix.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well has-input">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
<?php
|
21 |
global $wpdb;
|
22 |
-
printf( __( "Your prefix is <strong>%s</strong> and is unique.",
|
23 |
<?php else: ?>
|
24 |
<div class="line">
|
25 |
<p>
|
26 |
-
<?php esc_html_e( "We recommend using a different prefix to protect your database. Ensure you backup your database before changing the prefix.",
|
27 |
</p>
|
28 |
</div>
|
29 |
<form method="post" class="hardener-frm rule-process">
|
30 |
<?php $controller->createNonceField(); ?>
|
31 |
<input type="hidden" name="action" value="processHardener"/>
|
32 |
<input type="text"
|
33 |
-
placeholder="<?php esc_attr_e( "Enter new database prefix",
|
34 |
name="dbprefix" class="block">
|
35 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
36 |
<button class="button float-r"
|
37 |
-
type="submit"><?php _e( "Update",
|
38 |
</form>
|
39 |
<?php $controller->showIgnoreForm() ?>
|
40 |
<div class="clear"></div>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Change default database prefix", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "When you first install WordPress on a new database, the default settings start with wp_ as the prefix to anything that gets stored in the tables. This makes it easier for hackers to perform SQL injection attacks if they find a code vulnerability. It’s good practice to come up with a unique prefix to protect yourself from this. Please backup your database before changing the prefix.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well has-input">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
<?php
|
21 |
global $wpdb;
|
22 |
+
printf( __( "Your prefix is <strong>%s</strong> and is unique.", "defender-security" ), $wpdb->prefix ) ?>
|
23 |
<?php else: ?>
|
24 |
<div class="line">
|
25 |
<p>
|
26 |
+
<?php esc_html_e( "We recommend using a different prefix to protect your database. Ensure you backup your database before changing the prefix.", "defender-security" ) ?>
|
27 |
</p>
|
28 |
</div>
|
29 |
<form method="post" class="hardener-frm rule-process">
|
30 |
<?php $controller->createNonceField(); ?>
|
31 |
<input type="hidden" name="action" value="processHardener"/>
|
32 |
<input type="text"
|
33 |
+
placeholder="<?php esc_attr_e( "Enter new database prefix", "defender-security" ) ?>"
|
34 |
name="dbprefix" class="block">
|
35 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
36 |
<button class="button float-r"
|
37 |
+
type="submit"><?php _e( "Update", "defender-security" ) ?></button>
|
38 |
</form>
|
39 |
<?php $controller->showIgnoreForm() ?>
|
40 |
<div class="clear"></div>
|
app/module/hardener/view/rules/disable-file-editor.php
CHANGED
@@ -5,36 +5,36 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Disable the file editor",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "WordPress comes with a file editor built into the system. This means that anyone with access to your login information can edit your plugin and theme files. We recommend disabling the editor.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
-
<p class="line"><?php _e( "The file editor is disabled.",
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
-
type="submit"><?php _e( "Revert",
|
27 |
</form>
|
28 |
<?php else: ?>
|
29 |
<div class="line">
|
30 |
-
<p><?php _e( "We will disable access to the file editor for you. You can enable it again anytime.",
|
31 |
</div>
|
32 |
<form method="post" class="hardener-frm rule-process">
|
33 |
<?php $controller->createNonceField(); ?>
|
34 |
<input type="hidden" name="action" value="processHardener"/>
|
35 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
36 |
<button class="button float-r"
|
37 |
-
type="submit"><?php _e( "Disable File Editor",
|
38 |
</form>
|
39 |
<?php $controller->showIgnoreForm() ?>
|
40 |
<div class="clear"></div>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Disable the file editor", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "WordPress comes with a file editor built into the system. This means that anyone with access to your login information can edit your plugin and theme files. We recommend disabling the editor.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
+
<p class="line"><?php _e( "The file editor is disabled.", "defender-security" ) ?></p>
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
+
type="submit"><?php _e( "Revert", "defender-security" ) ?></button>
|
27 |
</form>
|
28 |
<?php else: ?>
|
29 |
<div class="line">
|
30 |
+
<p><?php _e( "We will disable access to the file editor for you. You can enable it again anytime.", "defender-security" ) ?></p>
|
31 |
</div>
|
32 |
<form method="post" class="hardener-frm rule-process">
|
33 |
<?php $controller->createNonceField(); ?>
|
34 |
<input type="hidden" name="action" value="processHardener"/>
|
35 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
36 |
<button class="button float-r"
|
37 |
+
type="submit"><?php _e( "Disable File Editor", "defender-security" ) ?></button>
|
38 |
</form>
|
39 |
<?php $controller->showIgnoreForm() ?>
|
40 |
<div class="clear"></div>
|
app/module/hardener/view/rules/disable-trackback.php
CHANGED
@@ -5,35 +5,35 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Disable trackbacks and pingbacks",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "Pingbacks notify a website when it has been mentioned by another website, like a form of courtesy communication. However, these notifications can be sent to any website willing to receive them, opening you up to DDoS attacks, which can take your website down in seconds and fill your posts with spam comments.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
-
<p class="mline"><?php _e( "Trackbacks and pingbacks are turned off.",
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
-
type="submit"><?php _e( "Revert",
|
27 |
</form>
|
28 |
<?php else: ?>
|
29 |
<div class="line">
|
30 |
-
<p><?php _e( "We will turn off trackbacks and pingbacks in your WordPress settings area.",
|
31 |
</div>
|
32 |
<label>
|
33 |
<?php if ( is_multisite() ) : ?>
|
34 |
-
<?php _e( "Disable pingbacks on all existing posts in all sites",
|
35 |
<?php else: ?>
|
36 |
-
<?php _e( "Disable pingbacks on all existing posts",
|
37 |
<?php endif; ?>
|
38 |
<span class="toggle float-r">
|
39 |
<input type="checkbox" name="update_posts" value="1" class="toggle-checkbox trackback-toggle-update-posts" id="toggle_update_posts"/>
|
@@ -47,7 +47,7 @@
|
|
47 |
<input type="hidden" name="updatePosts" value="no"/>
|
48 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
49 |
<button class="button float-r"
|
50 |
-
type="submit"><?php _e( "Disable Pingbacks",
|
51 |
</form>
|
52 |
<?php $controller->showIgnoreForm() ?>
|
53 |
<?php endif; ?>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Disable trackbacks and pingbacks", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "Pingbacks notify a website when it has been mentioned by another website, like a form of courtesy communication. However, these notifications can be sent to any website willing to receive them, opening you up to DDoS attacks, which can take your website down in seconds and fill your posts with spam comments.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
+
<p class="mline"><?php _e( "Trackbacks and pingbacks are turned off.", "defender-security" ) ?></p>
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
+
type="submit"><?php _e( "Revert", "defender-security" ) ?></button>
|
27 |
</form>
|
28 |
<?php else: ?>
|
29 |
<div class="line">
|
30 |
+
<p><?php _e( "We will turn off trackbacks and pingbacks in your WordPress settings area.", "defender-security" ) ?></p>
|
31 |
</div>
|
32 |
<label>
|
33 |
<?php if ( is_multisite() ) : ?>
|
34 |
+
<?php _e( "Disable pingbacks on all existing posts in all sites", "defender-security" ); ?>
|
35 |
<?php else: ?>
|
36 |
+
<?php _e( "Disable pingbacks on all existing posts", "defender-security" ); ?>
|
37 |
<?php endif; ?>
|
38 |
<span class="toggle float-r">
|
39 |
<input type="checkbox" name="update_posts" value="1" class="toggle-checkbox trackback-toggle-update-posts" id="toggle_update_posts"/>
|
47 |
<input type="hidden" name="updatePosts" value="no"/>
|
48 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
49 |
<button class="button float-r"
|
50 |
+
type="submit"><?php _e( "Disable Pingbacks", "defender-security" ) ?></button>
|
51 |
</form>
|
52 |
<?php $controller->showIgnoreForm() ?>
|
53 |
<?php endif; ?>
|
app/module/hardener/view/rules/hide-error.php
CHANGED
@@ -5,39 +5,39 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Hide error reporting",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "In addition to hiding error logs, developers often use the built-in front-end PHP and scripts error debugging feature, which displays code errors on the front-end. This provides hackers yet another way to find loopholes in your site's security.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
-
<p class=""><?php _e( "All PHP errors are hidden.",
|
21 |
<?php else: ?>
|
22 |
<?php
|
23 |
//if WP debug == true, we will display a form to turn it off
|
24 |
if ( WP_DEBUG == true && ( ! defined( 'WP_DEBUG_DISPLAY' ) || WP_DEBUG_DISPLAY != false ) ): ?>
|
25 |
<div class="line">
|
26 |
-
<p><?php _e( "We will add the necessary code to prevent these errors displaying.",
|
27 |
</div>
|
28 |
<form method="post" class="hardener-frm rule-process">
|
29 |
<?php $controller->createNonceField(); ?>
|
30 |
<input type="hidden" name="action" value="processHardener"/>
|
31 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
32 |
<button class="button float-r"
|
33 |
-
type="submit"><?php _e( "Disable error debugging",
|
34 |
</form>
|
35 |
<?php $controller->showIgnoreForm() ?>
|
36 |
<?php
|
37 |
//php debug is turn off, however the error still dsplay, need to show user about this
|
38 |
else: ?>
|
39 |
<p class="line">
|
40 |
-
<?php _e( "We attempted to disable the display_errors setting to prevent code errors displaying but it’s being overridden by your server config. Please contact your hosting provider and ask them to set display_errors to false.",
|
41 |
</p>
|
42 |
<?php $controller->showIgnoreForm() ?>
|
43 |
<?php endif; ?>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Hide error reporting", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "In addition to hiding error logs, developers often use the built-in front-end PHP and scripts error debugging feature, which displays code errors on the front-end. This provides hackers yet another way to find loopholes in your site's security.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
+
<p class=""><?php _e( "All PHP errors are hidden.", "defender-security" ) ?></p>
|
21 |
<?php else: ?>
|
22 |
<?php
|
23 |
//if WP debug == true, we will display a form to turn it off
|
24 |
if ( WP_DEBUG == true && ( ! defined( 'WP_DEBUG_DISPLAY' ) || WP_DEBUG_DISPLAY != false ) ): ?>
|
25 |
<div class="line">
|
26 |
+
<p><?php _e( "We will add the necessary code to prevent these errors displaying.", "defender-security" ) ?></p>
|
27 |
</div>
|
28 |
<form method="post" class="hardener-frm rule-process">
|
29 |
<?php $controller->createNonceField(); ?>
|
30 |
<input type="hidden" name="action" value="processHardener"/>
|
31 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
32 |
<button class="button float-r"
|
33 |
+
type="submit"><?php _e( "Disable error debugging", "defender-security" ) ?></button>
|
34 |
</form>
|
35 |
<?php $controller->showIgnoreForm() ?>
|
36 |
<?php
|
37 |
//php debug is turn off, however the error still dsplay, need to show user about this
|
38 |
else: ?>
|
39 |
<p class="line">
|
40 |
+
<?php _e( "We attempted to disable the display_errors setting to prevent code errors displaying but it’s being overridden by your server config. Please contact your hosting provider and ask them to set display_errors to false.", "defender-security" ) ?>
|
41 |
</p>
|
42 |
<?php $controller->showIgnoreForm() ?>
|
43 |
<?php endif; ?>
|
app/module/hardener/view/rules/login-duration.php
CHANGED
@@ -8,12 +8,12 @@
|
|
8 |
<?php echo $controller->getTitle() ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "By default, users who select the 'remember me' option stay logged in for 14 days",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php
|
@@ -21,27 +21,27 @@
|
|
21 |
|
22 |
if ( $controller->check() ):
|
23 |
?>
|
24 |
-
<p class="line"><?php esc_attr_e( sprintf( __('Login Duration is locked down. Current duration is %d days',
|
25 |
<form method="post" class="hardener-frm rule-process">
|
26 |
<?php $controller->createNonceField(); ?>
|
27 |
<input type="hidden" name="action" value="processRevert"/>
|
28 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
29 |
-
<button class="button button-small button-grey" type="submit"><?php _e( "Revert",
|
30 |
</form>
|
31 |
<?php
|
32 |
else:
|
33 |
?>
|
34 |
<div class="line">
|
35 |
-
<p><?php _e( "Please change the number of days a user can stay logged in",
|
36 |
</div>
|
37 |
<form method="post" class="hardener-frm rule-process">
|
38 |
<?php $controller->createNonceField(); ?>
|
39 |
<input type="hidden" name="action" value="processHardener"/>
|
40 |
-
<input type="text" placeholder="<?php esc_attr_e( "Enter number of days",
|
41 |
name="duration" class="block defender-login-duration" />
|
42 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
43 |
<button class="button float-r"
|
44 |
-
type="submit"><?php _e( "Update",
|
45 |
</form>
|
46 |
<?php $controller->showIgnoreForm() ?>
|
47 |
<div class="clear"></div>
|
8 |
<?php echo $controller->getTitle() ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "By default, users who select the 'remember me' option stay logged in for 14 days", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php
|
21 |
|
22 |
if ( $controller->check() ):
|
23 |
?>
|
24 |
+
<p class="line"><?php esc_attr_e( sprintf( __('Login Duration is locked down. Current duration is %d days', "defender-security" ), $controller->getService()->getDuration() ) ); ?></p>
|
25 |
<form method="post" class="hardener-frm rule-process">
|
26 |
<?php $controller->createNonceField(); ?>
|
27 |
<input type="hidden" name="action" value="processRevert"/>
|
28 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
29 |
+
<button class="button button-small button-grey" type="submit"><?php _e( "Revert", "defender-security" ) ?></button>
|
30 |
</form>
|
31 |
<?php
|
32 |
else:
|
33 |
?>
|
34 |
<div class="line">
|
35 |
+
<p><?php _e( "Please change the number of days a user can stay logged in", "defender-security" ) ?></p>
|
36 |
</div>
|
37 |
<form method="post" class="hardener-frm rule-process">
|
38 |
<?php $controller->createNonceField(); ?>
|
39 |
<input type="hidden" name="action" value="processHardener"/>
|
40 |
+
<input type="text" placeholder="<?php esc_attr_e( "Enter number of days", "defender-security" ) ?>"
|
41 |
name="duration" class="block defender-login-duration" />
|
42 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
43 |
<button class="button float-r"
|
44 |
+
type="submit"><?php _e( "Update", "defender-security" ) ?></button>
|
45 |
</form>
|
46 |
<?php $controller->showIgnoreForm() ?>
|
47 |
<div class="clear"></div>
|
app/module/hardener/view/rules/php-version.php
CHANGED
@@ -5,39 +5,39 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Update PHP to latest version",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line">
|
13 |
<p>
|
14 |
-
<?php _e( "PHP versions older than 5.6 are no longer supported. For security and stability we strongly recommend you upgrade your PHP version to version 5.6 or newer as soon as possible.",
|
15 |
</p>
|
16 |
<p>
|
17 |
-
<?php printf( esc_html__( "More information: %s",
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="columns version-col">
|
21 |
<div class="column">
|
22 |
-
<strong><?php _e( "Current version",
|
23 |
<?php $class = $controller->check() ? 'def-tag tag-success' : 'def-tag tag-error' ?>
|
24 |
<span class="<?php echo $class ?>">
|
25 |
<?php echo \WP_Defender\Behavior\Utils::instance()->getPHPVersion() ?>
|
26 |
</span>
|
27 |
</div>
|
28 |
<div class="column">
|
29 |
-
<strong><?php _e( "Recommend Version",
|
30 |
<span><?php echo '5.6' ?></span>
|
31 |
</div>
|
32 |
</div>
|
33 |
<h3>
|
34 |
-
<?php _e( "How to fix",
|
35 |
</h3>
|
36 |
<div class="well mline">
|
37 |
<?php if ( $controller->check() ): ?>
|
38 |
-
<?php _e( "Your PHP version is okay.",
|
39 |
<?php else: ?>
|
40 |
-
<?php _e( "Your PHP version can be upgraded by your hosting provider or System Administrator. Please contact them for assistance.",
|
41 |
<?php endif; ?>
|
42 |
<div class="clear"></div>
|
43 |
</div>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Update PHP to latest version", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line">
|
13 |
<p>
|
14 |
+
<?php _e( "PHP versions older than 5.6 are no longer supported. For security and stability we strongly recommend you upgrade your PHP version to version 5.6 or newer as soon as possible.", "defender-security" ) ?>
|
15 |
</p>
|
16 |
<p>
|
17 |
+
<?php printf( esc_html__( "More information: %s", "defender-security" ), '<a target="_blank" href="http://php.net/supported-versions.php">http://php.net/supported-versions.php</a>' ) ?>
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="columns version-col">
|
21 |
<div class="column">
|
22 |
+
<strong><?php _e( "Current version", "defender-security" ) ?></strong>
|
23 |
<?php $class = $controller->check() ? 'def-tag tag-success' : 'def-tag tag-error' ?>
|
24 |
<span class="<?php echo $class ?>">
|
25 |
<?php echo \WP_Defender\Behavior\Utils::instance()->getPHPVersion() ?>
|
26 |
</span>
|
27 |
</div>
|
28 |
<div class="column">
|
29 |
+
<strong><?php _e( "Recommend Version", "defender-security" ) ?></strong>
|
30 |
<span><?php echo '5.6' ?></span>
|
31 |
</div>
|
32 |
</div>
|
33 |
<h3>
|
34 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
35 |
</h3>
|
36 |
<div class="well mline">
|
37 |
<?php if ( $controller->check() ): ?>
|
38 |
+
<?php _e( "Your PHP version is okay.", "defender-security" ) ?>
|
39 |
<?php else: ?>
|
40 |
+
<?php _e( "Your PHP version can be upgraded by your hosting provider or System Administrator. Please contact them for assistance.", "defender-security" ) ?>
|
41 |
<?php endif; ?>
|
42 |
<div class="clear"></div>
|
43 |
</div>
|
app/module/hardener/view/rules/prevent-php-executed.php
CHANGED
@@ -5,27 +5,27 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Prevent PHP execution",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "By default, a plugin/theme vulnerability could allow a PHP file to get uploaded into your site's directories and in turn execute harmful scripts that can wreak havoc on your website. Prevent this altogether by disabling direct PHP execution in directories that don't require it.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php
|
20 |
$setting = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
21 |
|
22 |
if ( $controller->check() ): ?>
|
23 |
-
<p class="line"><?php _e( "PHP execution is locked down.",
|
24 |
<?php
|
25 |
if ( in_array( $setting->active_server, array( 'apache', 'litespeed' ) ) ) {
|
26 |
$file_paths = $setting->getExcludedFilePaths();
|
27 |
if ( !empty( $file_paths ) && is_array( $file_paths ) && count( $file_paths ) > 0 ) {
|
28 |
-
_e(" The following file paths have been allowed in the /wp-content directory :",
|
29 |
?>
|
30 |
<div class="hardener-instructions hardener-instructions-apache-litespeed">
|
31 |
<textarea class="hardener-php-excuted-ignore"><?php echo implode( "\n", $file_paths ); ?></textarea>
|
@@ -36,7 +36,7 @@
|
|
36 |
<input type="hidden" name="current_server" value="<?php echo $setting->active_server; ?>"/>
|
37 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
38 |
<button class="button button-small float-r"
|
39 |
-
type="submit"><?php _e( "Update .htaccess file",
|
40 |
</form>
|
41 |
</div>
|
42 |
<?php
|
@@ -49,7 +49,7 @@
|
|
49 |
<input type="hidden" name="action" value="processRevert"/>
|
50 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
51 |
<button class="button button-small button-grey"
|
52 |
-
type="submit"><?php _e( "Revert",
|
53 |
</form>
|
54 |
<?php else:
|
55 |
$servers = \WP_Defender\Behavior\Utils::instance()->serverTypes();
|
@@ -74,7 +74,7 @@
|
|
74 |
?>
|
75 |
<div class="columns">
|
76 |
<div class="column is-one-third">
|
77 |
-
<?php _e( 'Server Type:',
|
78 |
</div>
|
79 |
<div class="column is-one-third">
|
80 |
<select class="mline hardener-server-list" name="server">
|
@@ -88,7 +88,7 @@
|
|
88 |
<input type="hidden" class="hardener-wp-includes-dir" value="<?php echo $wp_includes; ?>" />
|
89 |
<div class="<?php echo ( $setting->active_server != 'apache' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-apache">
|
90 |
<div class="line">
|
91 |
-
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.",
|
92 |
</div>
|
93 |
<form method="post" class="hardener-frm hardener-apache-frm rule-process">
|
94 |
<?php $controller->createNonceField(); ?>
|
@@ -97,12 +97,12 @@
|
|
97 |
<input type="hidden" name="current_server" value="apache"/>
|
98 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
99 |
<button class="button float-r"
|
100 |
-
type="submit"><?php _e( "Add .htaccess file",
|
101 |
</form>
|
102 |
</div>
|
103 |
<div class="<?php echo ( $setting->active_server != 'litespeed' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-litespeed">
|
104 |
<div class="line">
|
105 |
-
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.",
|
106 |
</div>
|
107 |
<form method="post" class="hardener-frm hardener-litespeed-frm rule-process">
|
108 |
<?php $controller->createNonceField(); ?>
|
@@ -111,7 +111,7 @@
|
|
111 |
<input type="hidden" name="current_server" value="litespeed"/>
|
112 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
113 |
<button class="button float-r"
|
114 |
-
type="submit" ><?php _e( "Add .htaccess file",
|
115 |
</form>
|
116 |
</div>
|
117 |
<div class="<?php echo ( $setting->active_server != 'nginx' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-nginx">
|
@@ -135,20 +135,20 @@ location ~* ^$wp_content/.*\.php$ {
|
|
135 |
";
|
136 |
?>
|
137 |
|
138 |
-
<p><?php esc_html_e( "For NGINX servers:",
|
139 |
<ol>
|
140 |
<li>
|
141 |
-
<?php esc_html_e( "Copy the generated code into your site specific .conf file usually located in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/...",
|
142 |
</li>
|
143 |
<li>
|
144 |
-
<?php _e( "Add the code above inside the <strong>server</strong> section in the file, right before the php location block. Looks something like:",
|
145 |
<pre>location ~ \.php$ {</pre>
|
146 |
</li>
|
147 |
<li>
|
148 |
-
<?php esc_html_e( "Reload NGINX.",
|
149 |
</li>
|
150 |
</ol>
|
151 |
-
<p><?php echo sprintf( __( "Still having trouble? <a target='_blank' href=\"%s\">Open a support ticket</a>.",
|
152 |
<pre>
|
153 |
## WP Defender - Prevent PHP Execution ##
|
154 |
<?php echo esc_html( $rules ); ?>
|
@@ -158,15 +158,15 @@ location ~* ^$wp_content/.*\.php$ {
|
|
158 |
</div>
|
159 |
<div class="<?php echo ( $setting->active_server != 'iis' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-iis">
|
160 |
<div class="line">
|
161 |
-
<p><?php printf( __( 'For IIS servers, <a href="%s">visit Microsoft TechNet</a>',
|
162 |
</div>
|
163 |
</div>
|
164 |
<div class="<?php echo ( $setting->active_server != 'iis-7' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-iis-7">
|
165 |
<div class="line">
|
166 |
-
<p><?php _e( "We will place <strong>web.config</strong> file into the uploads folder to lock down the files and folders inside.",
|
167 |
</div>
|
168 |
<div class="line">
|
169 |
-
<p><?php printf( __( 'For more information, please <a href="%s">visit Microsoft TechNet</a>',
|
170 |
</div>
|
171 |
<form method="post" class="hardener-frm hardener-litespeed-frm rule-process">
|
172 |
<?php $controller->createNonceField(); ?>
|
@@ -174,7 +174,7 @@ location ~* ^$wp_content/.*\.php$ {
|
|
174 |
<input type="hidden" name="current_server" value="iis-7"/>
|
175 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
176 |
<button class="button float-r"
|
177 |
-
type="submit" ><?php _e( "Add web.config file",
|
178 |
</form>
|
179 |
|
180 |
</div>
|
@@ -186,11 +186,11 @@ location ~* ^$wp_content/.*\.php$ {
|
|
186 |
?>
|
187 |
<div <?php echo $prevent_php_style; ?> class="hardener-instructions hardener-instructions-extra-exceptions">
|
188 |
<h3>
|
189 |
-
<?php _e( "Exceptions",
|
190 |
</h3>
|
191 |
<div class="line">
|
192 |
-
<p><?php _e( "By default Defender will lock down directories WordPress doesn't need to allow PHP execution for. However, if you have specific files you need to allow PHP execution for you can add exceptions. Add file name one per line",
|
193 |
-
<button class="button button-grey hardener-php-excuted-execption" type="button"><?php _e( "Add Exception",
|
194 |
</div>
|
195 |
<div class="line">
|
196 |
<textarea class="hardener-php-excuted-ignore" style='display:none'></textarea>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Prevent PHP execution", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "By default, a plugin/theme vulnerability could allow a PHP file to get uploaded into your site's directories and in turn execute harmful scripts that can wreak havoc on your website. Prevent this altogether by disabling direct PHP execution in directories that don't require it.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php
|
20 |
$setting = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
21 |
|
22 |
if ( $controller->check() ): ?>
|
23 |
+
<p class="line"><?php _e( "PHP execution is locked down.", "defender-security" ) ?>
|
24 |
<?php
|
25 |
if ( in_array( $setting->active_server, array( 'apache', 'litespeed' ) ) ) {
|
26 |
$file_paths = $setting->getExcludedFilePaths();
|
27 |
if ( !empty( $file_paths ) && is_array( $file_paths ) && count( $file_paths ) > 0 ) {
|
28 |
+
_e(" The following file paths have been allowed in the /wp-content directory :", "defender-security" );
|
29 |
?>
|
30 |
<div class="hardener-instructions hardener-instructions-apache-litespeed">
|
31 |
<textarea class="hardener-php-excuted-ignore"><?php echo implode( "\n", $file_paths ); ?></textarea>
|
36 |
<input type="hidden" name="current_server" value="<?php echo $setting->active_server; ?>"/>
|
37 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
38 |
<button class="button button-small float-r"
|
39 |
+
type="submit"><?php _e( "Update .htaccess file", "defender-security" ) ?></button>
|
40 |
</form>
|
41 |
</div>
|
42 |
<?php
|
49 |
<input type="hidden" name="action" value="processRevert"/>
|
50 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
51 |
<button class="button button-small button-grey"
|
52 |
+
type="submit"><?php _e( "Revert", "defender-security" ) ?></button>
|
53 |
</form>
|
54 |
<?php else:
|
55 |
$servers = \WP_Defender\Behavior\Utils::instance()->serverTypes();
|
74 |
?>
|
75 |
<div class="columns">
|
76 |
<div class="column is-one-third">
|
77 |
+
<?php _e( 'Server Type:', "defender-security" ); ?>
|
78 |
</div>
|
79 |
<div class="column is-one-third">
|
80 |
<select class="mline hardener-server-list" name="server">
|
88 |
<input type="hidden" class="hardener-wp-includes-dir" value="<?php echo $wp_includes; ?>" />
|
89 |
<div class="<?php echo ( $setting->active_server != 'apache' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-apache">
|
90 |
<div class="line">
|
91 |
+
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.", "defender-security" ) ?></p>
|
92 |
</div>
|
93 |
<form method="post" class="hardener-frm hardener-apache-frm rule-process">
|
94 |
<?php $controller->createNonceField(); ?>
|
97 |
<input type="hidden" name="current_server" value="apache"/>
|
98 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
99 |
<button class="button float-r"
|
100 |
+
type="submit"><?php _e( "Add .htaccess file", "defender-security" ) ?></button>
|
101 |
</form>
|
102 |
</div>
|
103 |
<div class="<?php echo ( $setting->active_server != 'litespeed' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-litespeed">
|
104 |
<div class="line">
|
105 |
+
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.", "defender-security" ) ?></p>
|
106 |
</div>
|
107 |
<form method="post" class="hardener-frm hardener-litespeed-frm rule-process">
|
108 |
<?php $controller->createNonceField(); ?>
|
111 |
<input type="hidden" name="current_server" value="litespeed"/>
|
112 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
113 |
<button class="button float-r"
|
114 |
+
type="submit" ><?php _e( "Add .htaccess file", "defender-security" ) ?></button>
|
115 |
</form>
|
116 |
</div>
|
117 |
<div class="<?php echo ( $setting->active_server != 'nginx' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-nginx">
|
135 |
";
|
136 |
?>
|
137 |
|
138 |
+
<p><?php esc_html_e( "For NGINX servers:", "defender-security" ) ?></p>
|
139 |
<ol>
|
140 |
<li>
|
141 |
+
<?php esc_html_e( "Copy the generated code into your site specific .conf file usually located in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/...", "defender-security" ) ?>
|
142 |
</li>
|
143 |
<li>
|
144 |
+
<?php _e( "Add the code above inside the <strong>server</strong> section in the file, right before the php location block. Looks something like:", "defender-security" ) ?>
|
145 |
<pre>location ~ \.php$ {</pre>
|
146 |
</li>
|
147 |
<li>
|
148 |
+
<?php esc_html_e( "Reload NGINX.", "defender-security" ) ?>
|
149 |
</li>
|
150 |
</ol>
|
151 |
+
<p><?php echo sprintf( __( "Still having trouble? <a target='_blank' href=\"%s\">Open a support ticket</a>.", "defender-security" ), 'https://premium.wpmudev.org/forums/forum/support#question' ) ?></p>
|
152 |
<pre>
|
153 |
## WP Defender - Prevent PHP Execution ##
|
154 |
<?php echo esc_html( $rules ); ?>
|
158 |
</div>
|
159 |
<div class="<?php echo ( $setting->active_server != 'iis' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-iis">
|
160 |
<div class="line">
|
161 |
+
<p><?php printf( __( 'For IIS servers, <a href="%s">visit Microsoft TechNet</a>', "defender-security" ), 'https://technet.microsoft.com/en-us/library/cc725855(v=ws.10).aspx' ); ?></p>
|
162 |
</div>
|
163 |
</div>
|
164 |
<div class="<?php echo ( $setting->active_server != 'iis-7' ) ? 'wd-hide' : ''; ?> hardener-instructions hardener-instructions-iis-7">
|
165 |
<div class="line">
|
166 |
+
<p><?php _e( "We will place <strong>web.config</strong> file into the uploads folder to lock down the files and folders inside.", "defender-security" ) ?></p>
|
167 |
</div>
|
168 |
<div class="line">
|
169 |
+
<p><?php printf( __( 'For more information, please <a href="%s">visit Microsoft TechNet</a>', "defender-security" ), 'https://technet.microsoft.com/en-us/library/cc725855(v=ws.10).aspx' ); ?></p>
|
170 |
</div>
|
171 |
<form method="post" class="hardener-frm hardener-litespeed-frm rule-process">
|
172 |
<?php $controller->createNonceField(); ?>
|
174 |
<input type="hidden" name="current_server" value="iis-7"/>
|
175 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
176 |
<button class="button float-r"
|
177 |
+
type="submit" ><?php _e( "Add web.config file", "defender-security" ) ?></button>
|
178 |
</form>
|
179 |
|
180 |
</div>
|
186 |
?>
|
187 |
<div <?php echo $prevent_php_style; ?> class="hardener-instructions hardener-instructions-extra-exceptions">
|
188 |
<h3>
|
189 |
+
<?php _e( "Exceptions", "defender-security" ) ?>
|
190 |
</h3>
|
191 |
<div class="line">
|
192 |
+
<p><?php _e( "By default Defender will lock down directories WordPress doesn't need to allow PHP execution for. However, if you have specific files you need to allow PHP execution for you can add exceptions. Add file name one per line", "defender-security" ) ?></p>
|
193 |
+
<button class="button button-grey hardener-php-excuted-execption" type="button"><?php _e( "Add Exception", "defender-security" ) ?></button>
|
194 |
</div>
|
195 |
<div class="line">
|
196 |
<textarea class="hardener-php-excuted-ignore" style='display:none'></textarea>
|
app/module/hardener/view/rules/protect-information.php
CHANGED
@@ -5,25 +5,25 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Prevent Information Disclosure",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<?php _e( "Often servers are incorrectly configured, and can allow an attacker to get access to sensitive information that can be used in attacks. WP Defender can help you prevent that disclosure.",
|
14 |
</div>
|
15 |
<h3>
|
16 |
-
<?php _e( "How to fix",
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
-
<p class="line"><?php _e( "Your WordPress is protected.",
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
-
type="submit"><?php _e( "Revert",
|
27 |
</form>
|
28 |
<?php else:
|
29 |
$servers = \WP_Defender\Behavior\Utils::instance()->serverTypes();
|
@@ -32,7 +32,7 @@
|
|
32 |
?>
|
33 |
<div class="columns">
|
34 |
<div class="column is-one-third">
|
35 |
-
<?php _e( 'Server Type:',
|
36 |
</div>
|
37 |
<div class="column is-one-third">
|
38 |
<select class="mline hardener-server-list information" name="server">
|
@@ -44,36 +44,31 @@
|
|
44 |
</div>
|
45 |
<div class="<?php echo ( $setting->active_server != 'apache' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-apache">
|
46 |
<div class="line">
|
47 |
-
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.",
|
48 |
</div>
|
49 |
<form method="post" class="hardener-frm rule-process">
|
50 |
<?php $controller->createNonceField(); ?>
|
51 |
<input type="hidden" name="action" value="processHardener"/>
|
52 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
53 |
<button class="button float-r"
|
54 |
-
type="submit"><?php _e( "Add .htaccess file",
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="<?php echo ( $setting->active_server != 'litespeed' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-litespeed">
|
58 |
<div class="line">
|
59 |
-
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.",
|
60 |
</div>
|
61 |
<form method="post" class="hardener-frm rule-process">
|
62 |
<?php $controller->createNonceField(); ?>
|
63 |
<input type="hidden" name="action" value="processHardener"/>
|
64 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
65 |
<button class="button float-r"
|
66 |
-
type="submit"><?php _e( "Add .htaccess file",
|
67 |
</form>
|
68 |
</div>
|
69 |
<div class="<?php echo ( $setting->active_server != 'nginx' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-nginx">
|
70 |
<?php
|
71 |
-
|
72 |
-
//Windows
|
73 |
-
$wp_content = str_replace( ABSPATH, '', WP_CONTENT_DIR );
|
74 |
-
} else {
|
75 |
-
$wp_content = str_replace( $_SERVER['DOCUMENT_ROOT'], '', WP_CONTENT_DIR );
|
76 |
-
}
|
77 |
|
78 |
$rules = "# Turn off directory indexing
|
79 |
autoindex off;
|
@@ -95,31 +90,31 @@ location ~* ^$wp_content/.*\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$ {
|
|
95 |
";
|
96 |
?>
|
97 |
<div class="">
|
98 |
-
<p><?php esc_html_e( "For NGINX servers:",
|
99 |
<ol>
|
100 |
<li>
|
101 |
-
<?php esc_html_e( "Copy the generated code into your site specific .conf file usually located in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/...",
|
102 |
</li>
|
103 |
<li>
|
104 |
-
<?php _e( "Add the code above inside the <strong>server</strong> section in the file, right before the php location block. Looks something like:",
|
105 |
<pre>location ~ \.php$ {</pre>
|
106 |
</li>
|
107 |
<li>
|
108 |
-
<?php esc_html_e( "Reload NGINX.",
|
109 |
</li>
|
110 |
</ol>
|
111 |
-
<p><?php echo sprintf( __( "Still having trouble? <a target='_blank' href=\"%s\">Open a support ticket</a>.",
|
112 |
<pre>## WP Defender - Prevent information disclosure ##<?php echo esc_html( $rules ); ?>## WP Defender - End ##</pre>
|
113 |
</div>
|
114 |
</div>
|
115 |
<div class="<?php echo ( $setting->active_server != 'iis' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-iis">
|
116 |
<div class="line">
|
117 |
-
<p><?php printf( __( 'For IIS servers, <a href="%s">visit Microsoft TechNet</a>',
|
118 |
</div>
|
119 |
</div>
|
120 |
<div class="<?php echo ( $setting->active_server != 'iis-7' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-iis-7">
|
121 |
<div class="line">
|
122 |
-
<p><?php printf( __( 'For IIS 7 servers, <a href="%s">visit Microsoft TechNet</a>',
|
123 |
</div>
|
124 |
</div>
|
125 |
<?php $controller->showIgnoreForm() ?>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Prevent Information Disclosure", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<?php _e( "Often servers are incorrectly configured, and can allow an attacker to get access to sensitive information that can be used in attacks. WP Defender can help you prevent that disclosure.", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<h3>
|
16 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
17 |
</h3>
|
18 |
<div class="well">
|
19 |
<?php if ( $controller->check() ): ?>
|
20 |
+
<p class="line"><?php _e( "Your WordPress is protected.", "defender-security" ) ?></p>
|
21 |
<form method="post" class="hardener-frm rule-process">
|
22 |
<?php $controller->createNonceField(); ?>
|
23 |
<input type="hidden" name="action" value="processRevert"/>
|
24 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
25 |
<button class="button button-small button-grey"
|
26 |
+
type="submit"><?php _e( "Revert", "defender-security" ) ?></button>
|
27 |
</form>
|
28 |
<?php else:
|
29 |
$servers = \WP_Defender\Behavior\Utils::instance()->serverTypes();
|
32 |
?>
|
33 |
<div class="columns">
|
34 |
<div class="column is-one-third">
|
35 |
+
<?php _e( 'Server Type:', "defender-security" ); ?>
|
36 |
</div>
|
37 |
<div class="column is-one-third">
|
38 |
<select class="mline hardener-server-list information" name="server">
|
44 |
</div>
|
45 |
<div class="<?php echo ( $setting->active_server != 'apache' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-apache">
|
46 |
<div class="line">
|
47 |
+
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.", "defender-security" ) ?></p>
|
48 |
</div>
|
49 |
<form method="post" class="hardener-frm rule-process">
|
50 |
<?php $controller->createNonceField(); ?>
|
51 |
<input type="hidden" name="action" value="processHardener"/>
|
52 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
53 |
<button class="button float-r"
|
54 |
+
type="submit"><?php _e( "Add .htaccess file", "defender-security" ) ?></button>
|
55 |
</form>
|
56 |
</div>
|
57 |
<div class="<?php echo ( $setting->active_server != 'litespeed' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-litespeed">
|
58 |
<div class="line">
|
59 |
+
<p><?php _e( "We will place <strong>.htaccess</strong> file into the root folder to lock down the files and folders inside.", "defender-security" ) ?></p>
|
60 |
</div>
|
61 |
<form method="post" class="hardener-frm rule-process">
|
62 |
<?php $controller->createNonceField(); ?>
|
63 |
<input type="hidden" name="action" value="processHardener"/>
|
64 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
65 |
<button class="button float-r"
|
66 |
+
type="submit"><?php _e( "Add .htaccess file", "defender-security" ) ?></button>
|
67 |
</form>
|
68 |
</div>
|
69 |
<div class="<?php echo ( $setting->active_server != 'nginx' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-nginx">
|
70 |
<?php
|
71 |
+
$wp_content = str_replace( ABSPATH, '', WP_CONTENT_DIR );
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
$rules = "# Turn off directory indexing
|
74 |
autoindex off;
|
90 |
";
|
91 |
?>
|
92 |
<div class="">
|
93 |
+
<p><?php esc_html_e( "For NGINX servers:", "defender-security" ) ?></p>
|
94 |
<ol>
|
95 |
<li>
|
96 |
+
<?php esc_html_e( "Copy the generated code into your site specific .conf file usually located in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/...", "defender-security" ) ?>
|
97 |
</li>
|
98 |
<li>
|
99 |
+
<?php _e( "Add the code above inside the <strong>server</strong> section in the file, right before the php location block. Looks something like:", "defender-security" ) ?>
|
100 |
<pre>location ~ \.php$ {</pre>
|
101 |
</li>
|
102 |
<li>
|
103 |
+
<?php esc_html_e( "Reload NGINX.", "defender-security" ) ?>
|
104 |
</li>
|
105 |
</ol>
|
106 |
+
<p><?php echo sprintf( __( "Still having trouble? <a target='_blank' href=\"%s\">Open a support ticket</a>.", "defender-security" ), 'https://premium.wpmudev.org/forums/forum/support#question' ) ?></p>
|
107 |
<pre>## WP Defender - Prevent information disclosure ##<?php echo esc_html( $rules ); ?>## WP Defender - End ##</pre>
|
108 |
</div>
|
109 |
</div>
|
110 |
<div class="<?php echo ( $setting->active_server != 'iis' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-iis">
|
111 |
<div class="line">
|
112 |
+
<p><?php printf( __( 'For IIS servers, <a href="%s">visit Microsoft TechNet</a>', "defender-security" ), 'https://technet.microsoft.com/en-us/library/cc754807(v=ws.10).aspx' ); ?></p>
|
113 |
</div>
|
114 |
</div>
|
115 |
<div class="<?php echo ( $setting->active_server != 'iis-7' ) ? 'wd-hide' : ''; ?> hardener-information hardener-information-iis-7">
|
116 |
<div class="line">
|
117 |
+
<p><?php printf( __( 'For IIS 7 servers, <a href="%s">visit Microsoft TechNet</a>', "defender-security" ), 'https://technet.microsoft.com/en-us/library/cc754807(v=ws.10).aspx' ); ?></p>
|
118 |
</div>
|
119 |
</div>
|
120 |
<?php $controller->showIgnoreForm() ?>
|
app/module/hardener/view/rules/security-key.php
CHANGED
@@ -5,49 +5,49 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Update old security keys",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line end">
|
13 |
-
<p><?php _e( "We recommend changing your security keys every 60 days",
|
14 |
<div class="security-reminder">
|
15 |
-
<?php esc_html_e( "Remind me to change my security keys every",
|
16 |
<form method="post" class="hardener-frm" id="reminder-date">
|
17 |
<select name="remind_date">
|
18 |
<option
|
19 |
-
value="30 days" <?php selected( '30 days', $interval ) ?>><?php esc_html_e( '30 Days',
|
20 |
<option
|
21 |
-
value="60 days" <?php selected( '60 days', $interval ) ?>><?php esc_html_e( '60 Days',
|
22 |
<option
|
23 |
-
value="90 days" <?php selected( '90 days', $interval ) ?>><?php esc_html_e( '90 Days',
|
24 |
<option
|
25 |
-
value="6 months" <?php selected( '6 months', $interval ) ?>><?php esc_html_e( '6 Months',
|
26 |
<option
|
27 |
-
value="1 year" <?php selected( '1 year', $interval ) ?>><?php esc_html_e( '1 Year',
|
28 |
</select>
|
29 |
<input type="hidden" name="action" value="updateSecurityReminder"/>
|
30 |
<button type="submit" class="button">
|
31 |
-
<?php _e( "Update",
|
32 |
</form>
|
33 |
</div>
|
34 |
</div>
|
35 |
<h3>
|
36 |
-
<?php _e( "How to fix",
|
37 |
</h3>
|
38 |
<div class="well">
|
39 |
<?php if ( $controller->check() ): ?>
|
40 |
-
<?php printf( esc_html__( "Your salt keys are %d days old. You are fine for now.",
|
41 |
<?php else: ?>
|
42 |
<div class="line">
|
43 |
-
<p><?php _e( "We can regenerate your key salts instantly for you and they will be good for another <span class=\"expiry-days\">60 days</span>. Note that this will log all users out of your site.",
|
44 |
</div>
|
45 |
<form method="post" class="hardener-frm rule-process">
|
46 |
<?php $controller->createNonceField(); ?>
|
47 |
<input type="hidden" name="action" value="processHardener"/>
|
48 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
49 |
<button class="button float-r"
|
50 |
-
type="submit"><?php _e( "Regenerate Security Keys",
|
51 |
</form>
|
52 |
<?php $controller->showIgnoreForm() ?>
|
53 |
<?php endif; ?>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Update old security keys", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line end">
|
13 |
+
<p><?php _e( "We recommend changing your security keys every 60 days", "defender-security" ) ?></p>
|
14 |
<div class="security-reminder">
|
15 |
+
<?php esc_html_e( "Remind me to change my security keys every", "defender-security" ) ?>
|
16 |
<form method="post" class="hardener-frm" id="reminder-date">
|
17 |
<select name="remind_date">
|
18 |
<option
|
19 |
+
value="30 days" <?php selected( '30 days', $interval ) ?>><?php esc_html_e( '30 Days', "defender-security" ) ?></option>
|
20 |
<option
|
21 |
+
value="60 days" <?php selected( '60 days', $interval ) ?>><?php esc_html_e( '60 Days', "defender-security" ) ?></option>
|
22 |
<option
|
23 |
+
value="90 days" <?php selected( '90 days', $interval ) ?>><?php esc_html_e( '90 Days', "defender-security" ) ?></option>
|
24 |
<option
|
25 |
+
value="6 months" <?php selected( '6 months', $interval ) ?>><?php esc_html_e( '6 Months', "defender-security" ) ?></option>
|
26 |
<option
|
27 |
+
value="1 year" <?php selected( '1 year', $interval ) ?>><?php esc_html_e( '1 Year', "defender-security" ) ?></option>
|
28 |
</select>
|
29 |
<input type="hidden" name="action" value="updateSecurityReminder"/>
|
30 |
<button type="submit" class="button">
|
31 |
+
<?php _e( "Update", "defender-security" ) ?></button>
|
32 |
</form>
|
33 |
</div>
|
34 |
</div>
|
35 |
<h3>
|
36 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
37 |
</h3>
|
38 |
<div class="well">
|
39 |
<?php if ( $controller->check() ): ?>
|
40 |
+
<?php printf( esc_html__( "Your salt keys are %d days old. You are fine for now.", "defender-security" ), $daysAgo ) ?>
|
41 |
<?php else: ?>
|
42 |
<div class="line">
|
43 |
+
<p><?php _e( "We can regenerate your key salts instantly for you and they will be good for another <span class=\"expiry-days\">60 days</span>. Note that this will log all users out of your site.", "defender-security" ) ?></p>
|
44 |
</div>
|
45 |
<form method="post" class="hardener-frm rule-process">
|
46 |
<?php $controller->createNonceField(); ?>
|
47 |
<input type="hidden" name="action" value="processHardener"/>
|
48 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
49 |
<button class="button float-r"
|
50 |
+
type="submit"><?php _e( "Regenerate Security Keys", "defender-security" ) ?></button>
|
51 |
</form>
|
52 |
<?php $controller->showIgnoreForm() ?>
|
53 |
<?php endif; ?>
|
app/module/hardener/view/rules/wp-version.php
CHANGED
@@ -5,39 +5,39 @@
|
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
-
<?php _e( "Update WordPress to latest version",
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
-
<h3><?php _e( "Overview",
|
12 |
<div class="line">
|
13 |
-
<?php _e( "WordPress is an extremely popular platform, and with that popularity comes hackers that increasingly want to exploit WordPress based websites. Leaving your WordPress installation out of date is an almost guaranteed way to get hacked!",
|
14 |
</div>
|
15 |
<div class="columns version-col">
|
16 |
<div class="column">
|
17 |
-
<strong><?php _e( "Current version",
|
18 |
<?php $class = $controller->check() ? 'def-tag tag-success' : 'def-tag tag-error' ?>
|
19 |
<span class="<?php echo $class ?>">
|
20 |
<?php echo \WP_Defender\Behavior\Utils::instance()->getWPVersion() ?>
|
21 |
</span>
|
22 |
</div>
|
23 |
<div class="column">
|
24 |
-
<strong><?php _e( "Recommend Version",
|
25 |
<span><?php echo $controller->getService()->getLatestVersion() ?></span>
|
26 |
</div>
|
27 |
</div>
|
28 |
<h3>
|
29 |
-
<?php _e( "How to fix",
|
30 |
</h3>
|
31 |
<div class="well">
|
32 |
<?php if ( $controller->check() ): ?>
|
33 |
-
<?php _e( "You have the latest WordPress version installed.",
|
34 |
<?php else: ?>
|
35 |
<form method="post" class="hardener-frm">
|
36 |
<?php $controller->createNonceField(); ?>
|
37 |
<input type="hidden" name="action" value="processHardener"/>
|
38 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
39 |
<a href="<?php echo network_admin_url('update-core.php') ?>" class="button float-r">
|
40 |
-
<?php esc_html_e( "Update WordPress",
|
41 |
</a>
|
42 |
</form>
|
43 |
<?php $controller->showIgnoreForm() ?>
|
5 |
<?php else: ?>
|
6 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
7 |
<?php endif; ?>
|
8 |
+
<?php _e( "Update WordPress to latest version", "defender-security" ) ?>
|
9 |
</div>
|
10 |
<div class="rule-content">
|
11 |
+
<h3><?php _e( "Overview", "defender-security" ) ?></h3>
|
12 |
<div class="line">
|
13 |
+
<?php _e( "WordPress is an extremely popular platform, and with that popularity comes hackers that increasingly want to exploit WordPress based websites. Leaving your WordPress installation out of date is an almost guaranteed way to get hacked!", "defender-security" ) ?>
|
14 |
</div>
|
15 |
<div class="columns version-col">
|
16 |
<div class="column">
|
17 |
+
<strong><?php _e( "Current version", "defender-security" ) ?></strong>
|
18 |
<?php $class = $controller->check() ? 'def-tag tag-success' : 'def-tag tag-error' ?>
|
19 |
<span class="<?php echo $class ?>">
|
20 |
<?php echo \WP_Defender\Behavior\Utils::instance()->getWPVersion() ?>
|
21 |
</span>
|
22 |
</div>
|
23 |
<div class="column">
|
24 |
+
<strong><?php _e( "Recommend Version", "defender-security" ) ?></strong>
|
25 |
<span><?php echo $controller->getService()->getLatestVersion() ?></span>
|
26 |
</div>
|
27 |
</div>
|
28 |
<h3>
|
29 |
+
<?php _e( "How to fix", "defender-security" ) ?>
|
30 |
</h3>
|
31 |
<div class="well">
|
32 |
<?php if ( $controller->check() ): ?>
|
33 |
+
<?php _e( "You have the latest WordPress version installed.", "defender-security" ) ?>
|
34 |
<?php else: ?>
|
35 |
<form method="post" class="hardener-frm">
|
36 |
<?php $controller->createNonceField(); ?>
|
37 |
<input type="hidden" name="action" value="processHardener"/>
|
38 |
<input type="hidden" name="slug" value="<?php echo $controller::$slug ?>"/>
|
39 |
<a href="<?php echo network_admin_url('update-core.php') ?>" class="button float-r">
|
40 |
+
<?php esc_html_e( "Update WordPress", "defender-security" ) ?>
|
41 |
</a>
|
42 |
</form>
|
43 |
<?php $controller->showIgnoreForm() ?>
|
app/module/ip-lockout.php
CHANGED
@@ -17,8 +17,8 @@ class IP_Lockout extends Module {
|
|
17 |
public function register_post_type() {
|
18 |
register_post_type( 'wd_iplockout_log', array(
|
19 |
'labels' => array(
|
20 |
-
'name' => __( "Lockout Logs",
|
21 |
-
'singular_name' => __( "Lockout Log",
|
22 |
),
|
23 |
'public' => false,
|
24 |
'show_ui' => false,
|
@@ -32,8 +32,8 @@ class IP_Lockout extends Module {
|
|
32 |
) );
|
33 |
register_post_type( 'wd_ip_lockout', array(
|
34 |
'labels' => array(
|
35 |
-
'name' => __( "IP Lockouts",
|
36 |
-
'singular_name' => __( "IP Lockout",
|
37 |
),
|
38 |
'public' => false,
|
39 |
'show_ui' => false,
|
17 |
public function register_post_type() {
|
18 |
register_post_type( 'wd_iplockout_log', array(
|
19 |
'labels' => array(
|
20 |
+
'name' => __( "Lockout Logs", "defender-security" ),
|
21 |
+
'singular_name' => __( "Lockout Log", "defender-security" )
|
22 |
),
|
23 |
'public' => false,
|
24 |
'show_ui' => false,
|
32 |
) );
|
33 |
register_post_type( 'wd_ip_lockout', array(
|
34 |
'labels' => array(
|
35 |
+
'name' => __( "IP Lockouts", "defender-security" ),
|
36 |
+
'singular_name' => __( "IP Lockout", "defender-security" )
|
37 |
),
|
38 |
'public' => false,
|
39 |
'show_ui' => false,
|
app/module/ip-lockout/behavior/widget.php
CHANGED
@@ -21,11 +21,11 @@ class Widget extends Behavior {
|
|
21 |
<?php endif; ?>
|
22 |
<div class="box-title">
|
23 |
<span class="span-icon icon-lockout"></span>
|
24 |
-
<h3><?php _e( "IP LOCKOUTS",
|
25 |
</div>
|
26 |
<div class="box-content advanced-tools">
|
27 |
<div class="line">
|
28 |
-
<?php _e( "Protect your login area by automatically locking out any suspicious behavior.",
|
29 |
</div>
|
30 |
<?php if ( ! Settings::instance()->detect_404 && ! Settings::instance()->login_protection ): ?>
|
31 |
<form method="post" id="settings-frm" class="ip-frm">
|
@@ -34,7 +34,7 @@ class Widget extends Behavior {
|
|
34 |
<input type="hidden" name="login_protection" value="1"/>
|
35 |
<input type="hidden" name="detect_404" value="1"/>
|
36 |
<button type="submit" class="button button-primary button-small">
|
37 |
-
<?php esc_html_e( "Activate",
|
38 |
</button>
|
39 |
</form>
|
40 |
<?php else: ?>
|
@@ -42,35 +42,35 @@ class Widget extends Behavior {
|
|
42 |
<ul class="dev-list bold end">
|
43 |
<li>
|
44 |
<div>
|
45 |
-
<span class="list-label"><?php _e( "Last lockout",
|
46 |
<span class="list-detail lastLockout">.</span>
|
47 |
</div>
|
48 |
</li>
|
49 |
<li>
|
50 |
<div>
|
51 |
-
<span class="list-label"><?php _e( "Login lockouts this week",
|
52 |
<span class="list-detail loginLockoutThisWeek">.</span>
|
53 |
</div>
|
54 |
</li>
|
55 |
<li>
|
56 |
<div>
|
57 |
-
<span class="list-label"><?php _e( "404 lockouts this week",
|
58 |
<span class="list-detail lockout404ThisWeek">.</span>
|
59 |
</div>
|
60 |
</li>
|
61 |
</ul>
|
62 |
<div class="row">
|
63 |
<div class="col-third tl">
|
64 |
-
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs',
|
65 |
) ?>"
|
66 |
class="button button-small button-secondary">
|
67 |
-
<?php _e( "View logs",
|
68 |
</div>
|
69 |
<div class="col-two-third tr">
|
70 |
<p class="status-text"><?php if ( Settings::instance()->ip_lockout_notification && Settings::instance()->login_lockout_notification ) {
|
71 |
-
echo _e( "Lockout notifications are enabled",
|
72 |
} else {
|
73 |
-
echo _e( "Lockout notifications are disabled",
|
74 |
}
|
75 |
?></p>
|
76 |
</div>
|
21 |
<?php endif; ?>
|
22 |
<div class="box-title">
|
23 |
<span class="span-icon icon-lockout"></span>
|
24 |
+
<h3><?php _e( "IP LOCKOUTS", "defender-security" ) ?></h3>
|
25 |
</div>
|
26 |
<div class="box-content advanced-tools">
|
27 |
<div class="line">
|
28 |
+
<?php _e( "Protect your login area by automatically locking out any suspicious behavior.", "defender-security" ) ?>
|
29 |
</div>
|
30 |
<?php if ( ! Settings::instance()->detect_404 && ! Settings::instance()->login_protection ): ?>
|
31 |
<form method="post" id="settings-frm" class="ip-frm">
|
34 |
<input type="hidden" name="login_protection" value="1"/>
|
35 |
<input type="hidden" name="detect_404" value="1"/>
|
36 |
<button type="submit" class="button button-primary button-small">
|
37 |
+
<?php esc_html_e( "Activate", "defender-security" ) ?>
|
38 |
</button>
|
39 |
</form>
|
40 |
<?php else: ?>
|
42 |
<ul class="dev-list bold end">
|
43 |
<li>
|
44 |
<div>
|
45 |
+
<span class="list-label"><?php _e( "Last lockout", "defender-security" ) ?></span>
|
46 |
<span class="list-detail lastLockout">.</span>
|
47 |
</div>
|
48 |
</li>
|
49 |
<li>
|
50 |
<div>
|
51 |
+
<span class="list-label"><?php _e( "Login lockouts this week", "defender-security" ) ?></span>
|
52 |
<span class="list-detail loginLockoutThisWeek">.</span>
|
53 |
</div>
|
54 |
</li>
|
55 |
<li>
|
56 |
<div>
|
57 |
+
<span class="list-label"><?php _e( "404 lockouts this week", "defender-security" ) ?></span>
|
58 |
<span class="list-detail lockout404ThisWeek">.</span>
|
59 |
</div>
|
60 |
</li>
|
61 |
</ul>
|
62 |
<div class="row">
|
63 |
<div class="col-third tl">
|
64 |
+
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs', "defender-security"
|
65 |
) ?>"
|
66 |
class="button button-small button-secondary">
|
67 |
+
<?php _e( "View logs", "defender-security" ) ?></a>
|
68 |
</div>
|
69 |
<div class="col-two-third tr">
|
70 |
<p class="status-text"><?php if ( Settings::instance()->ip_lockout_notification && Settings::instance()->login_lockout_notification ) {
|
71 |
+
echo _e( "Lockout notifications are enabled", "defender-security" );
|
72 |
} else {
|
73 |
+
echo _e( "Lockout notifications are disabled", "defender-security" );
|
74 |
}
|
75 |
?></p>
|
76 |
</div>
|
app/module/ip-lockout/component/ip-api.php
CHANGED
@@ -9,10 +9,11 @@ use Hammer\WP\Component;
|
|
9 |
|
10 |
class IP_API extends Component {
|
11 |
public static function compareCIDR( $ip, $block ) {
|
12 |
-
|
|
|
13 |
return self::_compareCIDRV4( $ip, $block );
|
14 |
-
} elseif ( self::isV6( $ip ) ) {
|
15 |
-
|
16 |
}
|
17 |
|
18 |
return false;
|
@@ -35,8 +36,42 @@ class IP_API extends Component {
|
|
35 |
return ( $ip & $mask ) == $subnet;
|
36 |
}
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
|
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -49,7 +84,7 @@ class IP_API extends Component {
|
|
49 |
public static function compareInRange( $ip, $firstInRange, $lastInRange ) {
|
50 |
if ( self::isV4( $firstInRange ) && self::isV4( $lastInRange ) ) {
|
51 |
return self::_compareV4InRange( $ip, $firstInRange, $lastInRange );
|
52 |
-
} elseif ( self::isV6( $firstInRange ) && self::isV6( $lastInRange ) ) {
|
53 |
self::_compareV6InRange( $ip, $firstInRange, $lastInRange );
|
54 |
}
|
55 |
|
@@ -64,8 +99,8 @@ class IP_API extends Component {
|
|
64 |
* @return bool
|
65 |
*/
|
66 |
private static function _compareV4InRange( $ip, $fistInRange, $lastInRange ) {
|
67 |
-
$
|
68 |
-
$
|
69 |
|
70 |
$cip = sprintf( "%u", ip2long( $ip ) );
|
71 |
if ( $high >= $cip && $cip >= $low ) {
|
@@ -108,7 +143,7 @@ class IP_API extends Component {
|
|
108 |
if ( sprintf( "%u", ip2long( $ip2 ) ) - sprintf( "%u", ip2long( $ip1 ) ) > 0 ) {
|
109 |
return true;
|
110 |
}
|
111 |
-
} elseif ( self::isV6( $ip1 ) && self::isV6( $ip2 ) ) {
|
112 |
$ip1 = inet_pton( self::expandIPv6( $ip1 ) );
|
113 |
$ip2 = inet_pton( self::expandIPv6( $ip2 ) );
|
114 |
|
@@ -141,10 +176,17 @@ class IP_API extends Component {
|
|
141 |
*
|
142 |
* @return bool|string
|
143 |
*/
|
144 |
-
|
145 |
$hex = unpack( "H*hex", inet_pton( $ip ) );
|
146 |
$ip = substr( preg_replace( "/([A-f0-9]{4})/", "$1:", $hex['hex'] ), 0, - 1 );
|
147 |
|
148 |
return $ip;
|
149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
9 |
|
10 |
class IP_API extends Component {
|
11 |
public static function compareCIDR( $ip, $block ) {
|
12 |
+
list ( $subnet, $bits ) = explode( '/', $block );
|
13 |
+
if ( self::isV4( $ip ) && self::isV4( $subnet ) ) {
|
14 |
return self::_compareCIDRV4( $ip, $block );
|
15 |
+
} elseif ( self::isV6( $ip ) && self::isV6( $subnet ) && self::isV6Support() ) {
|
16 |
+
return self::_compareCIDRV6( $ip, $block );
|
17 |
}
|
18 |
|
19 |
return false;
|
36 |
return ( $ip & $mask ) == $subnet;
|
37 |
}
|
38 |
|
39 |
+
/**
|
40 |
+
* @param $ip
|
41 |
+
* @param $block
|
42 |
+
*
|
43 |
+
* @return bool
|
44 |
+
*/
|
45 |
+
private static function _compareCIDRV6( $ip, $block ) {
|
46 |
+
$ip = self::expandIPv6( $ip );
|
47 |
+
$ip = inet_pton( $ip );
|
48 |
+
$bIP = self::ineToBits( $ip );
|
49 |
+
list ( $subnet, $bits ) = explode( '/', $block );
|
50 |
+
$subnet = self::expandIPv6( $subnet );
|
51 |
+
$subnet = inet_pton( $subnet );
|
52 |
+
$bSubnet = self::ineToBits( $subnet );
|
53 |
+
|
54 |
+
$ipNetBits = substr( $bIP, 0, $bits );
|
55 |
+
$subnetBits = substr( $bSubnet, 0, $bits );
|
56 |
+
|
57 |
+
return $ipNetBits === $subnetBits;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param $inet
|
62 |
+
*
|
63 |
+
* @src https://stackoverflow.com/a/7951507
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
private static function ineToBits( $inet ) {
|
67 |
+
$unpacked = unpack( 'a16', $inet );
|
68 |
+
$unpacked = str_split( $unpacked[1] );
|
69 |
+
$binaryip = '';
|
70 |
+
foreach ( $unpacked as $char ) {
|
71 |
+
$binaryip .= str_pad( decbin( ord( $char ) ), 8, '0', STR_PAD_LEFT );
|
72 |
+
}
|
73 |
|
74 |
+
return $binaryip;
|
75 |
}
|
76 |
|
77 |
/**
|
84 |
public static function compareInRange( $ip, $firstInRange, $lastInRange ) {
|
85 |
if ( self::isV4( $firstInRange ) && self::isV4( $lastInRange ) ) {
|
86 |
return self::_compareV4InRange( $ip, $firstInRange, $lastInRange );
|
87 |
+
} elseif ( self::isV6( $firstInRange ) && self::isV6( $lastInRange ) && self::isV6Support() ) {
|
88 |
self::_compareV6InRange( $ip, $firstInRange, $lastInRange );
|
89 |
}
|
90 |
|
99 |
* @return bool
|
100 |
*/
|
101 |
private static function _compareV4InRange( $ip, $fistInRange, $lastInRange ) {
|
102 |
+
$low = sprintf( "%u", ip2long( $fistInRange ) );
|
103 |
+
$high = sprintf( "%u", ip2long( $lastInRange ) );
|
104 |
|
105 |
$cip = sprintf( "%u", ip2long( $ip ) );
|
106 |
if ( $high >= $cip && $cip >= $low ) {
|
143 |
if ( sprintf( "%u", ip2long( $ip2 ) ) - sprintf( "%u", ip2long( $ip1 ) ) > 0 ) {
|
144 |
return true;
|
145 |
}
|
146 |
+
} elseif ( self::isV6( $ip1 ) && self::isV6( $ip2 ) && self::isV6Support() ) {
|
147 |
$ip1 = inet_pton( self::expandIPv6( $ip1 ) );
|
148 |
$ip2 = inet_pton( self::expandIPv6( $ip2 ) );
|
149 |
|
176 |
*
|
177 |
* @return bool|string
|
178 |
*/
|
179 |
+
public static function expandIPv6( $ip ) {
|
180 |
$hex = unpack( "H*hex", inet_pton( $ip ) );
|
181 |
$ip = substr( preg_replace( "/([A-f0-9]{4})/", "$1:", $hex['hex'] ), 0, - 1 );
|
182 |
|
183 |
return $ip;
|
184 |
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* @return bool
|
188 |
+
*/
|
189 |
+
public static function isV6Support() {
|
190 |
+
return defined( 'AF_INET6' );
|
191 |
+
}
|
192 |
}
|
app/module/ip-lockout/component/login-protection-api.php
CHANGED
@@ -58,7 +58,7 @@ class Login_Protection_Api extends Component {
|
|
58 |
$model->status = IP_Model::STATUS_BLOCKED;
|
59 |
$model->release_time = strtotime( '+ ' . $settings->login_protection_lockout_duration . ' seconds' );
|
60 |
if ( $blacklist && $force ) {
|
61 |
-
$model->lockout_message = esc_html__( "You have been locked out by the administrator for attempting to login with a banned username",
|
62 |
} else {
|
63 |
$model->lockout_message = $settings->login_protection_lockout_message;
|
64 |
}
|
@@ -71,11 +71,11 @@ class Login_Protection_Api extends Component {
|
|
71 |
$lock_log->ip = $log->ip;
|
72 |
$lock_log->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
73 |
if ( $force && $blacklist ) {
|
74 |
-
$lock_log->log = esc_html__( "Lockout occurred: Attempting to login with a banned username.",
|
75 |
} elseif ( ! empty( $log->tried ) ) {
|
76 |
-
$lock_log->log = sprintf( esc_html__( "Lockout occurred: Too many failed login attempts for the username %s",
|
77 |
} else {
|
78 |
-
$lock_log->log = esc_html__( "Lockout occurred: Too many failed login attempts",
|
79 |
}
|
80 |
$lock_log->save();
|
81 |
//if fail2ban, we will add that IP to blacklist
|
@@ -153,7 +153,7 @@ class Login_Protection_Api extends Component {
|
|
153 |
$lock_log->ip = $log->ip;
|
154 |
$lock_log->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
155 |
$uri = esc_url( $_SERVER['REQUEST_URI'] );
|
156 |
-
$lock_log->log = sprintf( esc_html__( "Lockout occurred: Too many 404 requests for %s",
|
157 |
$lock_log->save();
|
158 |
//if fail2ban, we will add that IP to blacklist
|
159 |
if ( $settings->detect_404_lockout_ban ) {
|
@@ -253,16 +253,16 @@ class Login_Protection_Api extends Component {
|
|
253 |
$nonce = wp_create_nonce( 'lockoutIPAction' );
|
254 |
if ( $ip != $log->ip ) {
|
255 |
if ( ! in_array( $log->ip, $blacklist ) ) {
|
256 |
-
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="blacklist" data-id="' . $log->id . '" href="#">' . __( "Ban",
|
257 |
} else {
|
258 |
-
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="unblacklist" data-id="' . $log->id . '" href="#">' . __( "Unban",
|
259 |
}
|
260 |
}
|
261 |
|
262 |
if ( ! in_array( $log->ip, $whitelist ) ) {
|
263 |
-
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="whitelist" data-id="' . $log->id . '" href="#">' . __( "Whitelist",
|
264 |
} else {
|
265 |
-
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="unwhitelist" data-id="' . $log->id . '" href="#">' . __( "Unwhitelist",
|
266 |
}
|
267 |
|
268 |
return implode( ' | ', $links );
|
58 |
$model->status = IP_Model::STATUS_BLOCKED;
|
59 |
$model->release_time = strtotime( '+ ' . $settings->login_protection_lockout_duration . ' seconds' );
|
60 |
if ( $blacklist && $force ) {
|
61 |
+
$model->lockout_message = esc_html__( "You have been locked out by the administrator for attempting to login with a banned username", "defender-security" );
|
62 |
} else {
|
63 |
$model->lockout_message = $settings->login_protection_lockout_message;
|
64 |
}
|
71 |
$lock_log->ip = $log->ip;
|
72 |
$lock_log->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
73 |
if ( $force && $blacklist ) {
|
74 |
+
$lock_log->log = esc_html__( "Lockout occurred: Attempting to login with a banned username.", "defender-security" );
|
75 |
} elseif ( ! empty( $log->tried ) ) {
|
76 |
+
$lock_log->log = sprintf( esc_html__( "Lockout occurred: Too many failed login attempts for the username %s", "defender-security" ), $log->tried );
|
77 |
} else {
|
78 |
+
$lock_log->log = esc_html__( "Lockout occurred: Too many failed login attempts", "defender-security" );
|
79 |
}
|
80 |
$lock_log->save();
|
81 |
//if fail2ban, we will add that IP to blacklist
|
153 |
$lock_log->ip = $log->ip;
|
154 |
$lock_log->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
155 |
$uri = esc_url( $_SERVER['REQUEST_URI'] );
|
156 |
+
$lock_log->log = sprintf( esc_html__( "Lockout occurred: Too many 404 requests for %s", "defender-security" ), $uri );
|
157 |
$lock_log->save();
|
158 |
//if fail2ban, we will add that IP to blacklist
|
159 |
if ( $settings->detect_404_lockout_ban ) {
|
253 |
$nonce = wp_create_nonce( 'lockoutIPAction' );
|
254 |
if ( $ip != $log->ip ) {
|
255 |
if ( ! in_array( $log->ip, $blacklist ) ) {
|
256 |
+
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="blacklist" data-id="' . $log->id . '" href="#">' . __( "Ban", "defender-security" ) . '</a>';
|
257 |
} else {
|
258 |
+
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="unblacklist" data-id="' . $log->id . '" href="#">' . __( "Unban", "defender-security" ) . '</a>';
|
259 |
}
|
260 |
}
|
261 |
|
262 |
if ( ! in_array( $log->ip, $whitelist ) ) {
|
263 |
+
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="whitelist" data-id="' . $log->id . '" href="#">' . __( "Whitelist", "defender-security" ) . '</a>';
|
264 |
} else {
|
265 |
+
$links[] = '<a data-nonce="' . $nonce . '" class="ip-action" data-type="unwhitelist" data-id="' . $log->id . '" href="#">' . __( "Unwhitelist", "defender-security" ) . '</a>';
|
266 |
}
|
267 |
|
268 |
return implode( ' | ', $links );
|
app/module/ip-lockout/component/logs-table.php
CHANGED
@@ -36,9 +36,9 @@ class Logs_Table extends \WP_List_Table {
|
|
36 |
*/
|
37 |
function get_columns() {
|
38 |
$columns = array(
|
39 |
-
'reason' => esc_html__( 'DETAILS',
|
40 |
-
'date' => esc_html__( 'DATE',
|
41 |
-
'ip' => esc_html__( 'IP',
|
42 |
'action' => ''
|
43 |
);
|
44 |
|
@@ -130,7 +130,7 @@ class Logs_Table extends \WP_List_Table {
|
|
130 |
public function column_ip( Log_Model $log ) {
|
131 |
$ip = Utils::instance()->getUserIp();
|
132 |
if ( $ip == $log->get_ip() ) {
|
133 |
-
return '<span tooltip="' . esc_attr( $ip ) . '" class="badge">' . __( "You",
|
134 |
} else {
|
135 |
return $log->get_ip();
|
136 |
}
|
@@ -145,29 +145,29 @@ class Logs_Table extends \WP_List_Table {
|
|
145 |
<div class="well well-white lockout-logs-filter mline wd-hide">
|
146 |
<form>
|
147 |
<strong>
|
148 |
-
<?php _e( "Filter",
|
149 |
</strong>
|
150 |
<div class="columns">
|
151 |
<div class="column is-5">
|
152 |
<select name="interval">
|
153 |
-
<option value="1"><?php _e( "Last 24 hours",
|
154 |
-
<option value="7"><?php _e( "Last 7 days",
|
155 |
<option value="30"
|
156 |
-
selected><?php _e( "Last 30 days",
|
157 |
</select>
|
158 |
</div>
|
159 |
<div class="column is-5">
|
160 |
<select name="type">
|
161 |
-
<option value=""><?php esc_html_e( "All",
|
162 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_FAIL, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
163 |
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_FAIL ?>">
|
164 |
-
<?php esc_html_e( "Failed login attempts",
|
165 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_LOCK, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
166 |
-
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_LOCK ?>"><?php esc_html_e( "Login lockout",
|
167 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::ERROR_404, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
168 |
-
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::ERROR_404 ?>"><?php esc_html_e( "404 error",
|
169 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::LOCKOUT_404, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
170 |
-
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::LOCKOUT_404 ?>"><?php esc_html_e( "404 lockout",
|
171 |
</select>
|
172 |
</div>
|
173 |
</div>
|
@@ -197,7 +197,7 @@ class Logs_Table extends \WP_List_Table {
|
|
197 |
<?php else: ?>
|
198 |
<div class="well with-cap well-blue">
|
199 |
<i class="def-icon icon-info fill-blue"></i>
|
200 |
-
<?php _e( "No lockout events have been logged within the selected time period.",
|
201 |
</div>
|
202 |
<?php endif; ?>
|
203 |
</div>
|
@@ -244,12 +244,12 @@ class Logs_Table extends \WP_List_Table {
|
|
244 |
<div class="bulk-action">
|
245 |
<?php if ( $which === 'top' ): ?>
|
246 |
<p><?php
|
247 |
-
$dayText = sprintf( _n( '%s day', '%s days', HTTP_Helper::retrieve_get( 'interval', 30 ),
|
248 |
-
printf( esc_html__( 'Your website\'s lockout log for the past %s.',
|
249 |
<?php endif; ?>
|
250 |
</div>
|
251 |
<div class="nav">
|
252 |
-
<span><?php echo sprintf( esc_html__( "%s results",
|
253 |
<div class="button-group">
|
254 |
<?php $this->pagination( $which ); ?>
|
255 |
</div>
|
36 |
*/
|
37 |
function get_columns() {
|
38 |
$columns = array(
|
39 |
+
'reason' => esc_html__( 'DETAILS', "defender-security" ),
|
40 |
+
'date' => esc_html__( 'DATE', "defender-security" ),
|
41 |
+
'ip' => esc_html__( 'IP', "defender-security" ),
|
42 |
'action' => ''
|
43 |
);
|
44 |
|
130 |
public function column_ip( Log_Model $log ) {
|
131 |
$ip = Utils::instance()->getUserIp();
|
132 |
if ( $ip == $log->get_ip() ) {
|
133 |
+
return '<span tooltip="' . esc_attr( $ip ) . '" class="badge">' . __( "You", "defender-security" ) . '</span>';
|
134 |
} else {
|
135 |
return $log->get_ip();
|
136 |
}
|
145 |
<div class="well well-white lockout-logs-filter mline wd-hide">
|
146 |
<form>
|
147 |
<strong>
|
148 |
+
<?php _e( "Filter", "defender-security" ) ?>
|
149 |
</strong>
|
150 |
<div class="columns">
|
151 |
<div class="column is-5">
|
152 |
<select name="interval">
|
153 |
+
<option value="1"><?php _e( "Last 24 hours", "defender-security" ) ?></option>
|
154 |
+
<option value="7"><?php _e( "Last 7 days", "defender-security" ) ?></option>
|
155 |
<option value="30"
|
156 |
+
selected><?php _e( "Last 30 days", "defender-security" ) ?></option>
|
157 |
</select>
|
158 |
</div>
|
159 |
<div class="column is-5">
|
160 |
<select name="type">
|
161 |
+
<option value=""><?php esc_html_e( "All", "defender-security" ) ?></option>
|
162 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_FAIL, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
163 |
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_FAIL ?>">
|
164 |
+
<?php esc_html_e( "Failed login attempts", "defender-security" ) ?></option>
|
165 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_LOCK, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
166 |
+
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::AUTH_LOCK ?>"><?php esc_html_e( "Login lockout", "defender-security" ) ?></option>
|
167 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::ERROR_404, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
168 |
+
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::ERROR_404 ?>"><?php esc_html_e( "404 error", "defender-security" ) ?></option>
|
169 |
<option <?php selected( \WP_Defender\Module\IP_Lockout\Model\Log_Model::LOCKOUT_404, \Hammer\Helper\HTTP_Helper::retrieve_get( 'filter' ) ) ?>
|
170 |
+
value="<?php echo \WP_Defender\Module\IP_Lockout\Model\Log_Model::LOCKOUT_404 ?>"><?php esc_html_e( "404 lockout", "defender-security" ) ?></option>
|
171 |
</select>
|
172 |
</div>
|
173 |
</div>
|
197 |
<?php else: ?>
|
198 |
<div class="well with-cap well-blue">
|
199 |
<i class="def-icon icon-info fill-blue"></i>
|
200 |
+
<?php _e( "No lockout events have been logged within the selected time period.", "defender-security" ) ?>
|
201 |
</div>
|
202 |
<?php endif; ?>
|
203 |
</div>
|
244 |
<div class="bulk-action">
|
245 |
<?php if ( $which === 'top' ): ?>
|
246 |
<p><?php
|
247 |
+
$dayText = sprintf( _n( '%s day', '%s days', HTTP_Helper::retrieve_get( 'interval', 30 ), "defender-security" ), HTTP_Helper::retrieve_get( 'interval', 30 ) );
|
248 |
+
printf( esc_html__( 'Your website\'s lockout log for the past %s.', "defender-security" ), $dayText ) ?></p>
|
249 |
<?php endif; ?>
|
250 |
</div>
|
251 |
<div class="nav">
|
252 |
+
<span><?php echo sprintf( esc_html__( "%s results", "defender-security" ), $this->get_pagination_arg( 'total_items' ) ) ?></span>
|
253 |
<div class="button-group">
|
254 |
<?php $this->pagination( $which ); ?>
|
255 |
</div>
|
app/module/ip-lockout/controller/main.php
CHANGED
@@ -89,7 +89,7 @@ class Main extends Controller {
|
|
89 |
|
90 |
if ( count( $lockouts ) == 0 ) {
|
91 |
$data = array(
|
92 |
-
'lastLockout' => __( "Never",
|
93 |
'lockoutToday' => 0,
|
94 |
'lockoutThisMonth' => 0,
|
95 |
'loginLockoutThisWeek' => 0,
|
@@ -148,7 +148,7 @@ class Main extends Controller {
|
|
148 |
$count = Log_Model::deleteAll( array(), '0,' . $perPage );
|
149 |
if ( $count == 0 ) {
|
150 |
wp_send_json_success( array(
|
151 |
-
'message' => __( "Your logs have been successfully deleted.",
|
152 |
) );
|
153 |
}
|
154 |
|
@@ -188,12 +188,12 @@ class Main extends Controller {
|
|
188 |
) );
|
189 |
} else {
|
190 |
wp_send_json_success( array(
|
191 |
-
'message' => sprintf( __( "IP %s has been added to your blacklist. You can control your blacklist in <a href=\"%s\">IP Lockouts.</a>",
|
192 |
) );
|
193 |
}
|
194 |
} else {
|
195 |
wp_send_json_error( array(
|
196 |
-
'message' => __( "No record found",
|
197 |
) );
|
198 |
}
|
199 |
}
|
@@ -218,7 +218,7 @@ class Main extends Controller {
|
|
218 |
$message = $settings->ip_lockout_message;
|
219 |
break;
|
220 |
default:
|
221 |
-
$message = __( "Demo",
|
222 |
}
|
223 |
$this->renderPartial( 'locked', array(
|
224 |
'message' => $message
|
@@ -235,7 +235,6 @@ class Main extends Controller {
|
|
235 |
) );
|
236 |
die;
|
237 |
} else {
|
238 |
-
|
239 |
if ( is_user_logged_in() ) {
|
240 |
//if current user can logged in, and no blacklisted we don't need to check the ip
|
241 |
return;
|
@@ -395,11 +394,12 @@ class Main extends Controller {
|
|
395 |
'uri' => $uri
|
396 |
), false );
|
397 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
|
|
398 |
$headers = array(
|
399 |
'From: Defender <' . $no_reply_email . '>',
|
400 |
'Content-Type: text/html; charset=UTF-8'
|
401 |
);
|
402 |
-
wp_mail( $user->user_email, sprintf( __( "404 lockout alert for %s",
|
403 |
}
|
404 |
}
|
405 |
}
|
@@ -421,11 +421,12 @@ class Main extends Controller {
|
|
421 |
'ip' => $model->ip,
|
422 |
), false );
|
423 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
|
|
424 |
$headers = array(
|
425 |
'From: Defender <' . $no_reply_email . '>',
|
426 |
'Content-Type: text/html; charset=UTF-8'
|
427 |
);
|
428 |
-
wp_mail( $user->user_email, sprintf( __( "Login lockout alert for %s",
|
429 |
}
|
430 |
}
|
431 |
}
|
@@ -495,7 +496,7 @@ class Main extends Controller {
|
|
495 |
$model = new Log_Model();
|
496 |
$model->ip = $this->getUserIp();
|
497 |
$model->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
498 |
-
$model->log = sprintf( esc_html__( "Failed login attempt with username %s",
|
499 |
$model->date = time();
|
500 |
$model->type = 'auth_fail';
|
501 |
$model->tried = $username;
|
@@ -556,19 +557,19 @@ class Main extends Controller {
|
|
556 |
} else {
|
557 |
$unameBlacklisted = $settings->getUsernameBlacklist();
|
558 |
if ( in_array( $username, $unameBlacklisted ) ) {
|
559 |
-
$user->add( 'def_warning', esc_html__( "You have been locked out by the administrator for attempting to login with a banned username",
|
560 |
} else {
|
561 |
-
$user->add( 'def_warning', sprintf( esc_html__( "%d login attempts remaining",
|
562 |
}
|
563 |
}
|
564 |
} else {
|
565 |
$settings = Settings::instance();
|
566 |
$unameBlacklisted = $settings->getUsernameBlacklist();
|
567 |
if ( in_array( $username, $unameBlacklisted ) ) {
|
568 |
-
$user->add( 'def_warning', esc_html__( "You have been locked out by the administrator for attempting to login with a banned username",
|
569 |
} else {
|
570 |
//becase authenticate hook fire before wp_login_fail, so at this state, we dont have any data, we will decrease by one
|
571 |
-
$user->add( 'def_warning', sprintf( esc_html__( "%d login attempts remaining",
|
572 |
}
|
573 |
}
|
574 |
}
|
@@ -657,27 +658,27 @@ class Main extends Controller {
|
|
657 |
$isBLSelf = WP_Helper::getArrayCache()->get( 'isBlacklistSelf', false );
|
658 |
if ( $faultIps || $isBLSelf ) {
|
659 |
$res = array(
|
660 |
-
'message' => sprintf( __( "Your settings have been updated, however some IPs were removed because invalid format, or you blacklist yourself",
|
661 |
'reload' => 1
|
662 |
);
|
663 |
} else {
|
664 |
-
$res = array( 'message' => __( "Your settings have been updated.",
|
665 |
}
|
666 |
if ( ( $lastSettings->login_protection != $settings->login_protection )
|
667 |
|| ( $lastSettings->detect_404 != $settings->detect_404 )
|
668 |
) {
|
669 |
if ( isset( $data['login_protection'] ) ) {
|
670 |
if ( $data['login_protection'] == 1 ) {
|
671 |
-
$status = __( "Login Protection has been activated.",
|
672 |
} else {
|
673 |
-
$status = __( "Login Protection has been deactivated.",
|
674 |
}
|
675 |
}
|
676 |
if ( isset( $data['detect_404'] ) ) {
|
677 |
if ( $data['detect_404'] == 1 ) {
|
678 |
-
$status = __( "404 Detection has been activated.",
|
679 |
} else {
|
680 |
-
$status = __( "404 Detection has been deactivated.",
|
681 |
}
|
682 |
}
|
683 |
//mean enabled or disabled, reload
|
@@ -706,7 +707,7 @@ class Main extends Controller {
|
|
706 |
if ( get_site_option( 'defenderLockoutNeedUpdateLog' ) == 1 ) {
|
707 |
$action = "actionMigration";
|
708 |
}
|
709 |
-
add_submenu_page( 'wp-defender', esc_html__( "IP Lockouts",
|
710 |
&$this,
|
711 |
$action
|
712 |
) );
|
@@ -723,19 +724,19 @@ class Main extends Controller {
|
|
723 |
$id = HTTP_Helper::retrieve_post( 'file' );
|
724 |
if ( ! is_object( get_post( $id ) ) ) {
|
725 |
wp_send_json_error( array(
|
726 |
-
'message' => __( "Your file is invalid!",
|
727 |
) );
|
728 |
}
|
729 |
$file = get_attached_file( $id );
|
730 |
if ( ! is_file( $file ) ) {
|
731 |
wp_send_json_error( array(
|
732 |
-
'message' => __( "Your file is invalid!",
|
733 |
) );
|
734 |
}
|
735 |
|
736 |
if ( ! ( $data = Login_Protection_Api::verifyImportFile( $file ) ) ) {
|
737 |
wp_send_json_error( array(
|
738 |
-
'message' => __( "Your file content is invalid!",
|
739 |
) );
|
740 |
}
|
741 |
$settings = Settings::instance();
|
@@ -744,7 +745,7 @@ class Main extends Controller {
|
|
744 |
$settings->addIpToList( $line[0], $line[1] );
|
745 |
}
|
746 |
wp_send_json_success( array(
|
747 |
-
'message' => __( "Your whitelist/blacklist has been successfully imported.",
|
748 |
'reload' => 1
|
749 |
) );
|
750 |
}
|
@@ -929,7 +930,7 @@ class Main extends Controller {
|
|
929 |
delete_site_option( 'defenderLogsMovedCount' );
|
930 |
delete_site_option( 'defenderLockoutNeedUpdateLog' );
|
931 |
wp_send_json_success( array(
|
932 |
-
'message' => __( "Thanks for your patience. All set.",
|
933 |
) );
|
934 |
}
|
935 |
|
89 |
|
90 |
if ( count( $lockouts ) == 0 ) {
|
91 |
$data = array(
|
92 |
+
'lastLockout' => __( "Never", "defender-security" ),
|
93 |
'lockoutToday' => 0,
|
94 |
'lockoutThisMonth' => 0,
|
95 |
'loginLockoutThisWeek' => 0,
|
148 |
$count = Log_Model::deleteAll( array(), '0,' . $perPage );
|
149 |
if ( $count == 0 ) {
|
150 |
wp_send_json_success( array(
|
151 |
+
'message' => __( "Your logs have been successfully deleted.", "defender-security" )
|
152 |
) );
|
153 |
}
|
154 |
|
188 |
) );
|
189 |
} else {
|
190 |
wp_send_json_success( array(
|
191 |
+
'message' => sprintf( __( "IP %s has been added to your blacklist. You can control your blacklist in <a href=\"%s\">IP Lockouts.</a>", "defender-security" ), $ip, network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) )
|
192 |
) );
|
193 |
}
|
194 |
} else {
|
195 |
wp_send_json_error( array(
|
196 |
+
'message' => __( "No record found", "defender-security" )
|
197 |
) );
|
198 |
}
|
199 |
}
|
218 |
$message = $settings->ip_lockout_message;
|
219 |
break;
|
220 |
default:
|
221 |
+
$message = __( "Demo", "defender-security" );
|
222 |
}
|
223 |
$this->renderPartial( 'locked', array(
|
224 |
'message' => $message
|
235 |
) );
|
236 |
die;
|
237 |
} else {
|
|
|
238 |
if ( is_user_logged_in() ) {
|
239 |
//if current user can logged in, and no blacklisted we don't need to check the ip
|
240 |
return;
|
394 |
'uri' => $uri
|
395 |
), false );
|
396 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
397 |
+
$no_reply_email = apply_filters( 'wd_lockout_noreply_email', $no_reply_email );
|
398 |
$headers = array(
|
399 |
'From: Defender <' . $no_reply_email . '>',
|
400 |
'Content-Type: text/html; charset=UTF-8'
|
401 |
);
|
402 |
+
wp_mail( $user->user_email, sprintf( __( "404 lockout alert for %s", "defender-security" ), network_site_url() ), $content, $headers );
|
403 |
}
|
404 |
}
|
405 |
}
|
421 |
'ip' => $model->ip,
|
422 |
), false );
|
423 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
424 |
+
$no_reply_email = apply_filters( 'wd_lockout_noreply_email', $no_reply_email );
|
425 |
$headers = array(
|
426 |
'From: Defender <' . $no_reply_email . '>',
|
427 |
'Content-Type: text/html; charset=UTF-8'
|
428 |
);
|
429 |
+
wp_mail( $user->user_email, sprintf( __( "Login lockout alert for %s", "defender-security" ), network_site_url() ), $content, $headers );
|
430 |
}
|
431 |
}
|
432 |
}
|
496 |
$model = new Log_Model();
|
497 |
$model->ip = $this->getUserIp();
|
498 |
$model->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
499 |
+
$model->log = sprintf( esc_html__( "Failed login attempt with username %s", "defender-security" ), $username );
|
500 |
$model->date = time();
|
501 |
$model->type = 'auth_fail';
|
502 |
$model->tried = $username;
|
557 |
} else {
|
558 |
$unameBlacklisted = $settings->getUsernameBlacklist();
|
559 |
if ( in_array( $username, $unameBlacklisted ) ) {
|
560 |
+
$user->add( 'def_warning', esc_html__( "You have been locked out by the administrator for attempting to login with a banned username", "defender-security" ) );
|
561 |
} else {
|
562 |
+
$user->add( 'def_warning', sprintf( esc_html__( "%d login attempts remaining", "defender-security" ), $settings->login_protection_login_attempt - $attempt ) );
|
563 |
}
|
564 |
}
|
565 |
} else {
|
566 |
$settings = Settings::instance();
|
567 |
$unameBlacklisted = $settings->getUsernameBlacklist();
|
568 |
if ( in_array( $username, $unameBlacklisted ) ) {
|
569 |
+
$user->add( 'def_warning', esc_html__( "You have been locked out by the administrator for attempting to login with a banned username", "defender-security" ) );
|
570 |
} else {
|
571 |
//becase authenticate hook fire before wp_login_fail, so at this state, we dont have any data, we will decrease by one
|
572 |
+
$user->add( 'def_warning', sprintf( esc_html__( "%d login attempts remaining", "defender-security" ), $settings->login_protection_login_attempt - 1 ) );
|
573 |
}
|
574 |
}
|
575 |
}
|
658 |
$isBLSelf = WP_Helper::getArrayCache()->get( 'isBlacklistSelf', false );
|
659 |
if ( $faultIps || $isBLSelf ) {
|
660 |
$res = array(
|
661 |
+
'message' => sprintf( __( "Your settings have been updated, however some IPs were removed because invalid format, or you blacklist yourself", "defender-security" ), implode( ',', $faultIps ) ),
|
662 |
'reload' => 1
|
663 |
);
|
664 |
} else {
|
665 |
+
$res = array( 'message' => __( "Your settings have been updated.", "defender-security" ), );
|
666 |
}
|
667 |
if ( ( $lastSettings->login_protection != $settings->login_protection )
|
668 |
|| ( $lastSettings->detect_404 != $settings->detect_404 )
|
669 |
) {
|
670 |
if ( isset( $data['login_protection'] ) ) {
|
671 |
if ( $data['login_protection'] == 1 ) {
|
672 |
+
$status = __( "Login Protection has been activated.", "defender-security" );
|
673 |
} else {
|
674 |
+
$status = __( "Login Protection has been deactivated.", "defender-security" );
|
675 |
}
|
676 |
}
|
677 |
if ( isset( $data['detect_404'] ) ) {
|
678 |
if ( $data['detect_404'] == 1 ) {
|
679 |
+
$status = __( "404 Detection has been activated.", "defender-security" );
|
680 |
} else {
|
681 |
+
$status = __( "404 Detection has been deactivated.", "defender-security" );
|
682 |
}
|
683 |
}
|
684 |
//mean enabled or disabled, reload
|
707 |
if ( get_site_option( 'defenderLockoutNeedUpdateLog' ) == 1 ) {
|
708 |
$action = "actionMigration";
|
709 |
}
|
710 |
+
add_submenu_page( 'wp-defender', esc_html__( "IP Lockouts", "defender-security" ), esc_html__( "IP Lockouts", "defender-security" ), $cap, $this->slug, array(
|
711 |
&$this,
|
712 |
$action
|
713 |
) );
|
724 |
$id = HTTP_Helper::retrieve_post( 'file' );
|
725 |
if ( ! is_object( get_post( $id ) ) ) {
|
726 |
wp_send_json_error( array(
|
727 |
+
'message' => __( "Your file is invalid!", "defender-security" )
|
728 |
) );
|
729 |
}
|
730 |
$file = get_attached_file( $id );
|
731 |
if ( ! is_file( $file ) ) {
|
732 |
wp_send_json_error( array(
|
733 |
+
'message' => __( "Your file is invalid!", "defender-security" )
|
734 |
) );
|
735 |
}
|
736 |
|
737 |
if ( ! ( $data = Login_Protection_Api::verifyImportFile( $file ) ) ) {
|
738 |
wp_send_json_error( array(
|
739 |
+
'message' => __( "Your file content is invalid!", "defender-security" )
|
740 |
) );
|
741 |
}
|
742 |
$settings = Settings::instance();
|
745 |
$settings->addIpToList( $line[0], $line[1] );
|
746 |
}
|
747 |
wp_send_json_success( array(
|
748 |
+
'message' => __( "Your whitelist/blacklist has been successfully imported.", "defender-security" ),
|
749 |
'reload' => 1
|
750 |
) );
|
751 |
}
|
930 |
delete_site_option( 'defenderLogsMovedCount' );
|
931 |
delete_site_option( 'defenderLockoutNeedUpdateLog' );
|
932 |
wp_send_json_success( array(
|
933 |
+
'message' => __( "Thanks for your patience. All set.", "defender-security" )
|
934 |
) );
|
935 |
}
|
936 |
|
app/module/ip-lockout/model/log-model-legacy.php
CHANGED
@@ -76,7 +76,7 @@ class Log_Model_Legacy extends Model {
|
|
76 |
if ( ! $format ) {
|
77 |
return esc_html( $this->log );
|
78 |
} else {
|
79 |
-
$text = sprintf( __( "Request for file <span class='log-text-table' tooltip='%s'>%s</span> which doesn't exist",
|
80 |
|
81 |
return $text;
|
82 |
}
|
@@ -108,11 +108,11 @@ class Log_Model_Legacy extends Model {
|
|
108 |
*/
|
109 |
public function get_type() {
|
110 |
$types = array(
|
111 |
-
'auth_fail' => __( "Failed login attempts",
|
112 |
-
'auth_lock' => __( "Login lockout",
|
113 |
-
'404_error' => __( "404 error",
|
114 |
-
'404_error_ignore' => __( "404 error",
|
115 |
-
'404_lockout' => __( "404 lockout",
|
116 |
);
|
117 |
|
118 |
if ( isset( $types[ $this->type ] ) ) {
|
76 |
if ( ! $format ) {
|
77 |
return esc_html( $this->log );
|
78 |
} else {
|
79 |
+
$text = sprintf( __( "Request for file <span class='log-text-table' tooltip='%s'>%s</span> which doesn't exist", "defender-security" ), esc_attr( $this->log ), pathinfo( $this->log, PATHINFO_BASENAME ) );
|
80 |
|
81 |
return $text;
|
82 |
}
|
108 |
*/
|
109 |
public function get_type() {
|
110 |
$types = array(
|
111 |
+
'auth_fail' => __( "Failed login attempts", "defender-security" ),
|
112 |
+
'auth_lock' => __( "Login lockout", "defender-security" ),
|
113 |
+
'404_error' => __( "404 error", "defender-security" ),
|
114 |
+
'404_error_ignore' => __( "404 error", "defender-security" ),
|
115 |
+
'404_lockout' => __( "404 lockout", "defender-security" )
|
116 |
);
|
117 |
|
118 |
if ( isset( $types[ $this->type ] ) ) {
|
app/module/ip-lockout/model/log-model.php
CHANGED
@@ -36,7 +36,7 @@ class Log_Model extends DB_Model {
|
|
36 |
if ( ! $format ) {
|
37 |
return esc_html( $this->log );
|
38 |
} else {
|
39 |
-
$text = sprintf( __( "Request for file <span class='log-text-table' tooltip='%s'>%s</span> which doesn't exist",
|
40 |
|
41 |
return $text;
|
42 |
}
|
@@ -62,11 +62,11 @@ class Log_Model extends DB_Model {
|
|
62 |
*/
|
63 |
public function get_type() {
|
64 |
$types = array(
|
65 |
-
'auth_fail' => __( "Failed login attempts",
|
66 |
-
'auth_lock' => __( "Login lockout",
|
67 |
-
'404_error' => __( "404 error",
|
68 |
-
'404_error_ignore' => __( "404 error",
|
69 |
-
'404_lockout' => __( "404 lockout",
|
70 |
);
|
71 |
|
72 |
if ( isset( $types[ $this->type ] ) ) {
|
36 |
if ( ! $format ) {
|
37 |
return esc_html( $this->log );
|
38 |
} else {
|
39 |
+
$text = sprintf( __( "Request for file <span class='log-text-table' tooltip='%s'>%s</span> which doesn't exist", "defender-security" ), esc_attr( $this->log ), pathinfo( $this->log, PATHINFO_BASENAME ) );
|
40 |
|
41 |
return $text;
|
42 |
}
|
62 |
*/
|
63 |
public function get_type() {
|
64 |
$types = array(
|
65 |
+
'auth_fail' => __( "Failed login attempts", "defender-security" ),
|
66 |
+
'auth_lock' => __( "Login lockout", "defender-security" ),
|
67 |
+
'404_error' => __( "404 error", "defender-security" ),
|
68 |
+
'404_error_ignore' => __( "404 error", "defender-security" ),
|
69 |
+
'404_lockout' => __( "404 lockout", "defender-security" )
|
70 |
);
|
71 |
|
72 |
if ( isset( $types[ $this->type ] ) ) {
|
app/module/ip-lockout/model/settings.php
CHANGED
@@ -8,6 +8,7 @@ namespace WP_Defender\Module\IP_Lockout\Model;
|
|
8 |
use Hammer\Helper\HTTP_Helper;
|
9 |
use Hammer\Helper\WP_Helper;
|
10 |
use WP_Defender\Behavior\Utils;
|
|
|
11 |
|
12 |
class Settings extends \Hammer\WP\Settings {
|
13 |
private static $_instance;
|
@@ -140,20 +141,18 @@ class Settings extends \Hammer\WP\Settings {
|
|
140 |
* @return bool
|
141 |
*/
|
142 |
public function isWhitelist( $ip ) {
|
143 |
-
$whitelist
|
|
|
|
|
144 |
foreach ( $whitelist as $wip ) {
|
145 |
-
|
146 |
-
if ( count( $ips ) == 1 && trim( $wip ) == $ip ) {
|
147 |
return true;
|
148 |
-
} elseif (
|
149 |
-
$
|
150 |
-
|
151 |
-
|
152 |
-
$cip = sprintf( "%u", ip2long( $ip ) );
|
153 |
-
if ( $high >= $cip && $cip >= $low ) {
|
154 |
return true;
|
155 |
}
|
156 |
-
} elseif ( stristr( $wip, '/' ) &&
|
157 |
return true;
|
158 |
}
|
159 |
}
|
@@ -169,17 +168,14 @@ class Settings extends \Hammer\WP\Settings {
|
|
169 |
public function isBlacklist( $ip ) {
|
170 |
$blacklist = $this->getIpBlacklist();
|
171 |
foreach ( $blacklist as $wip ) {
|
172 |
-
|
173 |
-
if ( count( $ips ) == 1 && trim( $wip ) == $ip ) {
|
174 |
return true;
|
175 |
-
} elseif (
|
176 |
-
$
|
177 |
-
|
178 |
-
$cip = sprintf( "%u", ip2long( $ip ) );
|
179 |
-
if ( $high >= $cip && $cip >= $low ) {
|
180 |
return true;
|
181 |
}
|
182 |
-
} elseif ( stristr( $wip, '/' ) &&
|
183 |
return true;
|
184 |
}
|
185 |
}
|
@@ -302,29 +298,54 @@ class Settings extends \Hammer\WP\Settings {
|
|
302 |
* @return bool
|
303 |
*/
|
304 |
public function validateIp( $ip ) {
|
305 |
-
if (
|
306 |
-
|
|
|
|
|
|
|
307 |
return true;
|
308 |
} elseif ( stristr( $ip, '-' ) ) {
|
309 |
$ips = explode( '-', $ip );
|
310 |
foreach ( $ips as $ip ) {
|
311 |
-
if ( ! filter_var( $ip, FILTER_VALIDATE_IP
|
312 |
return false;
|
313 |
}
|
314 |
}
|
315 |
-
if (
|
316 |
return true;
|
317 |
}
|
318 |
} elseif ( stristr( $ip, '/' ) ) {
|
319 |
list( $ip, $bits ) = explode( '/', $ip );
|
320 |
-
if ( filter_var( $ip, FILTER_VALIDATE_IP ) && filter_var( $bits, FILTER_VALIDATE_INT )
|
321 |
-
|
|
|
|
|
|
|
|
|
322 |
}
|
323 |
}
|
324 |
|
325 |
return false;
|
326 |
}
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
/**
|
329 |
* @return array
|
330 |
*/
|
8 |
use Hammer\Helper\HTTP_Helper;
|
9 |
use Hammer\Helper\WP_Helper;
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
+
use WP_Defender\Module\IP_Lockout\Component\IP_API;
|
12 |
|
13 |
class Settings extends \Hammer\WP\Settings {
|
14 |
private static $_instance;
|
141 |
* @return bool
|
142 |
*/
|
143 |
public function isWhitelist( $ip ) {
|
144 |
+
$whitelist = $this->getIpWhitelist();
|
145 |
+
$defaultWhitelist = apply_filters( 'ip_lockout_default_whitelist_ip', array() );
|
146 |
+
$whitelist = array_merge( $whitelist, $defaultWhitelist );
|
147 |
foreach ( $whitelist as $wip ) {
|
148 |
+
if ( ! stristr( $wip, '-' ) && ! stristr( $wip, '/' ) && trim( $wip ) == $ip ) {
|
|
|
149 |
return true;
|
150 |
+
} elseif ( stristr( $wip, '-' ) ) {
|
151 |
+
$ips = explode( '-', $wip );
|
152 |
+
if ( IP_API::compareInRange( $ip, $ips[0], $ips[1] ) ) {
|
|
|
|
|
|
|
153 |
return true;
|
154 |
}
|
155 |
+
} elseif ( stristr( $wip, '/' ) && IP_API::compareCIDR( $ip, $wip ) ) {
|
156 |
return true;
|
157 |
}
|
158 |
}
|
168 |
public function isBlacklist( $ip ) {
|
169 |
$blacklist = $this->getIpBlacklist();
|
170 |
foreach ( $blacklist as $wip ) {
|
171 |
+
if ( ! stristr( $wip, '-' ) && ! stristr( $wip, '/' ) && trim( $wip ) == $ip ) {
|
|
|
172 |
return true;
|
173 |
+
} elseif ( stristr( $wip, '-' ) ) {
|
174 |
+
$ips = explode( '-', $wip );
|
175 |
+
if ( IP_API::compareInRange( $ip, $ips[0], $ips[1] ) ) {
|
|
|
|
|
176 |
return true;
|
177 |
}
|
178 |
+
} elseif ( stristr( $wip, '/' ) && IP_API::compareCIDR( $ip, $wip ) ) {
|
179 |
return true;
|
180 |
}
|
181 |
}
|
298 |
* @return bool
|
299 |
*/
|
300 |
public function validateIp( $ip ) {
|
301 |
+
if (
|
302 |
+
! stristr( $ip, '-' )
|
303 |
+
&& ! stristr( $ip, '/' )
|
304 |
+
&& filter_var( $ip, FILTER_VALIDATE_IP ) ) {
|
305 |
+
//only ip, no -, no /
|
306 |
return true;
|
307 |
} elseif ( stristr( $ip, '-' ) ) {
|
308 |
$ips = explode( '-', $ip );
|
309 |
foreach ( $ips as $ip ) {
|
310 |
+
if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
|
311 |
return false;
|
312 |
}
|
313 |
}
|
314 |
+
if ( IP_API::compareIP( $ips[0], $ips[1] ) ) {
|
315 |
return true;
|
316 |
}
|
317 |
} elseif ( stristr( $ip, '/' ) ) {
|
318 |
list( $ip, $bits ) = explode( '/', $ip );
|
319 |
+
if ( filter_var( $ip, FILTER_VALIDATE_IP ) && filter_var( $bits, FILTER_VALIDATE_INT ) ) {
|
320 |
+
if ( $this->isIPV4( $ip ) && 0 <= $bits && $bits <= 32 ) {
|
321 |
+
return true;
|
322 |
+
} elseif ( $this->isIPV6( $ip ) && 0 <= $bits && $bits <= 128 && IP_API::isV6Support() ) {
|
323 |
+
return true;
|
324 |
+
}
|
325 |
}
|
326 |
}
|
327 |
|
328 |
return false;
|
329 |
}
|
330 |
|
331 |
+
/**
|
332 |
+
* @param $ip
|
333 |
+
*
|
334 |
+
* @return mixed
|
335 |
+
*/
|
336 |
+
private function isIPV4( $ip ) {
|
337 |
+
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* @param $ip
|
342 |
+
*
|
343 |
+
* @return mixed
|
344 |
+
*/
|
345 |
+
private function isIPV6( $ip ) {
|
346 |
+
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 );
|
347 |
+
}
|
348 |
+
|
349 |
/**
|
350 |
* @return array
|
351 |
*/
|
app/module/ip-lockout/view/blacklist/enabled.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "IP Banning",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<p class="intro">
|
8 |
-
<?php _e( "Choose which IP addresses you wish to permanently ban from accessing your website.",
|
9 |
</p>
|
10 |
|
11 |
<div class="columns">
|
12 |
<div class="column is-one-third">
|
13 |
<label for="ip_blacklist">
|
14 |
-
<?php _e( "Blacklist",
|
15 |
</label>
|
16 |
<span class="sub">
|
17 |
-
<?php _e( "Any IP addresses you list here will be completely blocked from accessing our website, including admins.",
|
18 |
</span>
|
19 |
</div>
|
20 |
<div class="column">
|
21 |
<textarea name="ip_blacklist" id="ip_blacklist"
|
22 |
rows="8"><?php echo $settings->ip_blacklist ?></textarea>
|
23 |
<span class="form-help">
|
24 |
-
<?php _e( "One IP address per line and IPv4 format only. IP ranges are accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx",
|
25 |
</span>
|
26 |
</div>
|
27 |
</div>
|
@@ -29,17 +29,17 @@
|
|
29 |
<div class="columns">
|
30 |
<div class="column is-one-third">
|
31 |
<label for="detect_404_lockout_message">
|
32 |
-
<?php esc_html_e( "Lockout message",
|
33 |
</label>
|
34 |
<span class="sub">
|
35 |
-
<?php esc_html_e( "Customize the message locked out users will see.",
|
36 |
</span>
|
37 |
</div>
|
38 |
<div class="column">
|
39 |
<textarea name="ip_lockout_message"
|
40 |
id="ip_lockout_message"><?php echo $settings->ip_lockout_message ?></textarea>
|
41 |
<span class="form-help">
|
42 |
-
<?php echo sprintf( __( "This message will be displayed across your website for any IP matching your blacklist. See a quick preview <a href=\"%s\">here</a>.",
|
43 |
'def-lockout-demo' => 1,
|
44 |
'type' => 'blacklist'
|
45 |
), network_site_url() ) ) ?>
|
@@ -50,17 +50,17 @@
|
|
50 |
<div class="columns">
|
51 |
<div class="column is-one-third">
|
52 |
<label for="ip_whitelist">
|
53 |
-
<?php _e( "Whitelist",
|
54 |
</label>
|
55 |
<span class="sub">
|
56 |
-
<?php _e( "Any IP addresses you list here will be exempt from the options you've selected for Login Protect and 404 Detection.",
|
57 |
</span>
|
58 |
</div>
|
59 |
<div class="column">
|
60 |
<textarea name="ip_whitelist" id="ip_whitelist"
|
61 |
rows="8"><?php echo $settings->ip_whitelist ?></textarea>
|
62 |
<span class="form-help">
|
63 |
-
<?php _e( "One IP address per line and IPv4 format only. IP ranges are accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx",
|
64 |
</span>
|
65 |
</div>
|
66 |
</div>
|
@@ -68,10 +68,10 @@
|
|
68 |
<div class="columns">
|
69 |
<div class="column is-one-third">
|
70 |
<label for="import">
|
71 |
-
<?php _e( "Import",
|
72 |
</label>
|
73 |
<span class="sub">
|
74 |
-
<?php _e( "Import your blacklist and whitelist from another website (CSV file).",
|
75 |
</span>
|
76 |
</div>
|
77 |
<div class="column">
|
@@ -79,13 +79,13 @@
|
|
79 |
<input disabled="disabled" type="text" id="import">
|
80 |
<input type="hidden" name="file_import" id="file_import">
|
81 |
<button type="button" class="button button-light file-picker">
|
82 |
-
<?php _e( "Select",
|
83 |
<button type="button" class="button button-grey btn-import-ip">
|
84 |
-
<?php _e( "Import",
|
85 |
</button>
|
86 |
</div>
|
87 |
<span class="form-help">
|
88 |
-
<?php _e( "Upload your exported blacklist. Note: Existing IP addresses will not be removed, only new IP addresses added.",
|
89 |
</span>
|
90 |
</div>
|
91 |
</div>
|
@@ -93,17 +93,17 @@
|
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
<label for="import">
|
96 |
-
<?php _e( "Export",
|
97 |
</label>
|
98 |
<span class="sub">
|
99 |
-
<?php _e( "Export both your blacklist and whitelist as a CSV file to use on another website.",
|
100 |
</span>
|
101 |
</div>
|
102 |
<div class="column">
|
103 |
<p>
|
104 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=export&_wpnonce=' . wp_create_nonce( 'defipexport' ) ) ?>"
|
105 |
class="button button-secondary export">
|
106 |
-
<?php _e( "Export",
|
107 |
</p>
|
108 |
</div>
|
109 |
</div>
|
@@ -111,7 +111,7 @@
|
|
111 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
112 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
113 |
<button type="submit" class="button button-primary float-r">
|
114 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
115 |
</button>
|
116 |
<div class="clear"></div>
|
117 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "IP Banning", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<p class="intro">
|
8 |
+
<?php _e( "Choose which IP addresses you wish to permanently ban from accessing your website.", "defender-security" ) ?>
|
9 |
</p>
|
10 |
|
11 |
<div class="columns">
|
12 |
<div class="column is-one-third">
|
13 |
<label for="ip_blacklist">
|
14 |
+
<?php _e( "Blacklist", "defender-security" ) ?>
|
15 |
</label>
|
16 |
<span class="sub">
|
17 |
+
<?php _e( "Any IP addresses you list here will be completely blocked from accessing our website, including admins.", "defender-security" ) ?>
|
18 |
</span>
|
19 |
</div>
|
20 |
<div class="column">
|
21 |
<textarea name="ip_blacklist" id="ip_blacklist"
|
22 |
rows="8"><?php echo $settings->ip_blacklist ?></textarea>
|
23 |
<span class="form-help">
|
24 |
+
<?php _e( "One IP address per line and IPv4 format only. IP ranges are accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx", "defender-security" ) ?>
|
25 |
</span>
|
26 |
</div>
|
27 |
</div>
|
29 |
<div class="columns">
|
30 |
<div class="column is-one-third">
|
31 |
<label for="detect_404_lockout_message">
|
32 |
+
<?php esc_html_e( "Lockout message", "defender-security" ) ?>
|
33 |
</label>
|
34 |
<span class="sub">
|
35 |
+
<?php esc_html_e( "Customize the message locked out users will see.", "defender-security" ) ?>
|
36 |
</span>
|
37 |
</div>
|
38 |
<div class="column">
|
39 |
<textarea name="ip_lockout_message"
|
40 |
id="ip_lockout_message"><?php echo $settings->ip_lockout_message ?></textarea>
|
41 |
<span class="form-help">
|
42 |
+
<?php echo sprintf( __( "This message will be displayed across your website for any IP matching your blacklist. See a quick preview <a href=\"%s\">here</a>.", "defender-security" ), add_query_arg( array(
|
43 |
'def-lockout-demo' => 1,
|
44 |
'type' => 'blacklist'
|
45 |
), network_site_url() ) ) ?>
|
50 |
<div class="columns">
|
51 |
<div class="column is-one-third">
|
52 |
<label for="ip_whitelist">
|
53 |
+
<?php _e( "Whitelist", "defender-security" ) ?>
|
54 |
</label>
|
55 |
<span class="sub">
|
56 |
+
<?php _e( "Any IP addresses you list here will be exempt from the options you've selected for Login Protect and 404 Detection.", "defender-security" ) ?>
|
57 |
</span>
|
58 |
</div>
|
59 |
<div class="column">
|
60 |
<textarea name="ip_whitelist" id="ip_whitelist"
|
61 |
rows="8"><?php echo $settings->ip_whitelist ?></textarea>
|
62 |
<span class="form-help">
|
63 |
+
<?php _e( "One IP address per line and IPv4 format only. IP ranges are accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx", "defender-security" ) ?>
|
64 |
</span>
|
65 |
</div>
|
66 |
</div>
|
68 |
<div class="columns">
|
69 |
<div class="column is-one-third">
|
70 |
<label for="import">
|
71 |
+
<?php _e( "Import", "defender-security" ) ?>
|
72 |
</label>
|
73 |
<span class="sub">
|
74 |
+
<?php _e( "Import your blacklist and whitelist from another website (CSV file).", "defender-security" ) ?>
|
75 |
</span>
|
76 |
</div>
|
77 |
<div class="column">
|
79 |
<input disabled="disabled" type="text" id="import">
|
80 |
<input type="hidden" name="file_import" id="file_import">
|
81 |
<button type="button" class="button button-light file-picker">
|
82 |
+
<?php _e( "Select", "defender-security" ) ?></button>
|
83 |
<button type="button" class="button button-grey btn-import-ip">
|
84 |
+
<?php _e( "Import", "defender-security" ) ?>
|
85 |
</button>
|
86 |
</div>
|
87 |
<span class="form-help">
|
88 |
+
<?php _e( "Upload your exported blacklist. Note: Existing IP addresses will not be removed, only new IP addresses added.", "defender-security" ) ?>
|
89 |
</span>
|
90 |
</div>
|
91 |
</div>
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
<label for="import">
|
96 |
+
<?php _e( "Export", "defender-security" ) ?>
|
97 |
</label>
|
98 |
<span class="sub">
|
99 |
+
<?php _e( "Export both your blacklist and whitelist as a CSV file to use on another website.", "defender-security" ) ?>
|
100 |
</span>
|
101 |
</div>
|
102 |
<div class="column">
|
103 |
<p>
|
104 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=export&_wpnonce=' . wp_create_nonce( 'defipexport' ) ) ?>"
|
105 |
class="button button-secondary export">
|
106 |
+
<?php _e( "Export", "defender-security" ) ?></a>
|
107 |
</p>
|
108 |
</div>
|
109 |
</div>
|
111 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
112 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
113 |
<button type="submit" class="button button-primary float-r">
|
114 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
115 |
</button>
|
116 |
<div class="clear"></div>
|
117 |
</form>
|
app/module/ip-lockout/view/detect-404/disabled.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "404 DETECTION",
|
4 |
</div>
|
5 |
<div class="box-content tc">
|
6 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/lockout-man.svg"
|
7 |
class="intro line"/>
|
8 |
<p class="intro max-600 line">
|
9 |
-
<?php esc_html_e( "With 404 detection enabled, Defender will keep an eye out for IP addresses that repeatedly request pages on your website that don’t exist and then temporarily block them from accessing your site.",
|
10 |
</p>
|
11 |
<form method="post" id="settings-frm" class="ip-frm">
|
12 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
13 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
14 |
<input type="hidden" name="detect_404" value="1"/>
|
15 |
<button type="submit" class="button button-primary">
|
16 |
-
<?php esc_html_e( "Enable",
|
17 |
</button>
|
18 |
</form>
|
19 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "404 DETECTION", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content tc">
|
6 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/lockout-man.svg"
|
7 |
class="intro line"/>
|
8 |
<p class="intro max-600 line">
|
9 |
+
<?php esc_html_e( "With 404 detection enabled, Defender will keep an eye out for IP addresses that repeatedly request pages on your website that don’t exist and then temporarily block them from accessing your site.", "defender-security" ) ?>
|
10 |
</p>
|
11 |
<form method="post" id="settings-frm" class="ip-frm">
|
12 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
13 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
14 |
<input type="hidden" name="detect_404" value="1"/>
|
15 |
<button type="submit" class="button button-primary">
|
16 |
+
<?php esc_html_e( "Enable", "defender-security" ) ?>
|
17 |
</button>
|
18 |
</form>
|
19 |
</div>
|
app/module/ip-lockout/view/detect-404/enabled.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<div class="dev-box">
|
2 |
<form method="post" id="settings-frm" class="ip-frm">
|
3 |
<div class="box-title">
|
4 |
-
<h3><?php esc_html_e( "404 DETECTION",
|
5 |
<div class="side float-r">
|
6 |
<div>
|
7 |
-
<span tooltip="<?php esc_attr_e( "Deactivate 404 Detection",
|
8 |
<input type="hidden" name="detect_404" value="0"/>
|
9 |
<input type="checkbox" checked="checked" class="toggle-checkbox"
|
10 |
id="toggle_404_detection" name="detect_404" value="1"/>
|
@@ -16,70 +16,70 @@
|
|
16 |
<div class="box-content">
|
17 |
<?php if ( ( $count = ( \WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api::get404Lockouts( strtotime( '-24 hours', current_time( 'timestamp' ) ) ) ) ) > 0 ): ?>
|
18 |
<div class="well well-yellow">
|
19 |
-
<?php echo sprintf( __( "There have been %d lockouts in the last 24 hours. <a href=\"%s\"><strong>View log</strong></a>.",
|
20 |
</div>
|
21 |
<?php else: ?>
|
22 |
<div class="well well-blue">
|
23 |
-
<?php esc_html_e( "404 Detection is enabled. There are no lockouts logged yet.",
|
24 |
</div>
|
25 |
<?php endif; ?>
|
26 |
<div class="columns">
|
27 |
<div class="column is-one-third">
|
28 |
<label for="detect_404_threshold">
|
29 |
-
<?php esc_html_e( "Lockout threshold",
|
30 |
</label>
|
31 |
<span class="sub">
|
32 |
-
<?php esc_html_e( "Specify how many 404 errors within a specific time period will trigger a lockout.",
|
33 |
</span>
|
34 |
</div>
|
35 |
<div class="column">
|
36 |
<input size="8" value="<?php echo $settings->detect_404_threshold ?>" id="detect_404_threshold"
|
37 |
name="detect_404_threshold" type="text" class="inline">
|
38 |
-
<span class=""><?php esc_html_e( "404 errors within",
|
39 |
<input size="8" value="<?php echo $settings->detect_404_timeframe ?>" id="detect_404_timeframe"
|
40 |
name="detect_404_timeframe" type="text" class="inline">
|
41 |
-
<span class=""><?php esc_html_e( "seconds",
|
42 |
</div>
|
43 |
</div>
|
44 |
|
45 |
<div class="columns">
|
46 |
<div class="column is-one-third">
|
47 |
<label for="login_protection_lockout_timeframe">
|
48 |
-
<?php esc_html_e( "Lockout time",
|
49 |
</label>
|
50 |
<span class="sub">
|
51 |
-
<?php esc_html_e( "Choose how long you’d like to ban the locked out user for.",
|
52 |
</span>
|
53 |
</div>
|
54 |
<div class="column">
|
55 |
<input value="<?php echo $settings->detect_404_lockout_duration ?>" size="8"
|
56 |
name="detect_404_lockout_duration"
|
57 |
id="detect_404_lockout_duration" type="text" class="inline"/>
|
58 |
-
<span class=""><?php esc_html_e( "seconds",
|
59 |
<div class="clearfix"></div>
|
60 |
<input type="hidden" name="detect_404_lockout_ban" value="0"/>
|
61 |
<input id="detect_404_lockout_ban" <?php checked( 1, $settings->detect_404_lockout_ban ) ?>
|
62 |
type="checkbox"
|
63 |
name="detect_404_lockout_ban" value="1">
|
64 |
<label for="detect_404_lockout_ban"
|
65 |
-
class="inline form-help is-marginless"><?php esc_html_e( 'Permanently ban 404 lockouts.',
|
66 |
</div>
|
67 |
</div>
|
68 |
|
69 |
<div class="columns">
|
70 |
<div class="column is-one-third">
|
71 |
<label for="detect_404_lockout_message">
|
72 |
-
<?php esc_html_e( "Lockout message",
|
73 |
</label>
|
74 |
<span class="sub">
|
75 |
-
<?php esc_html_e( "Customize the message locked out users will see.",
|
76 |
</span>
|
77 |
</div>
|
78 |
<div class="column">
|
79 |
<textarea name="detect_404_lockout_message"
|
80 |
id="detect_404_lockout_message"><?php echo $settings->detect_404_lockout_message ?></textarea>
|
81 |
<span class="form-help">
|
82 |
-
<?php echo sprintf( __( "This message will be displayed across your website during the lockout period. See a quick preview <a href=\"%s\">here</a>.",
|
83 |
'def-lockout-demo' => 1,
|
84 |
'type' => '404'
|
85 |
), network_site_url() ) ) ?>
|
@@ -90,17 +90,17 @@
|
|
90 |
<div class="columns">
|
91 |
<div class="column is-one-third">
|
92 |
<label for="detect_404_whitelist">
|
93 |
-
<?php esc_html_e( "Whitelist",
|
94 |
</label>
|
95 |
<span class="sub">
|
96 |
-
<?php esc_html_e( "If you know a common file on your website is missing, you can record it here so it doesn't count towards a lockout record.",
|
97 |
</span>
|
98 |
</div>
|
99 |
<div class="column">
|
100 |
<textarea id="detect_404_whitelist" name="detect_404_whitelist"
|
101 |
rows="8"><?php echo $settings->detect_404_whitelist ?></textarea>
|
102 |
<span class="form-help">
|
103 |
-
<?php esc_html_e( "You must list the full path beginning with a /.",
|
104 |
</span>
|
105 |
</div>
|
106 |
</div>
|
@@ -108,17 +108,17 @@
|
|
108 |
<div class="columns">
|
109 |
<div class="column is-one-third">
|
110 |
<label for="detect_404_ignored_filetypes">
|
111 |
-
<?php esc_html_e( "Ignore file types",
|
112 |
</label>
|
113 |
<span class="sub">
|
114 |
-
<?php esc_html_e( "Choose which types of files you want to log errors for but not trigger a lockout.",
|
115 |
</span>
|
116 |
</div>
|
117 |
<div class="column">
|
118 |
<textarea id="detect_404_ignored_filetypes" name="detect_404_ignored_filetypes"
|
119 |
rows="8"><?php echo $settings->detect_404_ignored_filetypes ?></textarea>
|
120 |
<span class="form-help">
|
121 |
-
<?php esc_html_e( "Defender will log the 404 error, but won’t lockout the user for these filetypes.",
|
122 |
</span>
|
123 |
</div>
|
124 |
</div>
|
@@ -126,10 +126,10 @@
|
|
126 |
<div class="columns">
|
127 |
<div class="column is-one-third">
|
128 |
<label>
|
129 |
-
<?php esc_html_e( "Exclusions",
|
130 |
</label>
|
131 |
<span class="sub">
|
132 |
-
<?php esc_html_e( "By default, Defender will monitor all interactions with your website but you can choose to disable 404 detection for specific areas of your site.",
|
133 |
</span>
|
134 |
</div>
|
135 |
<div class="column">
|
@@ -138,14 +138,14 @@
|
|
138 |
type="checkbox"
|
139 |
name="detect_404_logged" value="1">
|
140 |
<label for="detect_404_logged"
|
141 |
-
class="inline form-help is-marginless"><?php esc_html_e( 'Monitor 404s from logged in users',
|
142 |
</div>
|
143 |
</div>
|
144 |
<div class="clear line"></div>
|
145 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
146 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
147 |
<button type="submit" class="button button-primary float-r">
|
148 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
149 |
</button>
|
150 |
<div class="clear"></div>
|
151 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<form method="post" id="settings-frm" class="ip-frm">
|
3 |
<div class="box-title">
|
4 |
+
<h3><?php esc_html_e( "404 DETECTION", "defender-security" ) ?></h3>
|
5 |
<div class="side float-r">
|
6 |
<div>
|
7 |
+
<span tooltip="<?php esc_attr_e( "Deactivate 404 Detection", "defender-security" ) ?>" class="toggle">
|
8 |
<input type="hidden" name="detect_404" value="0"/>
|
9 |
<input type="checkbox" checked="checked" class="toggle-checkbox"
|
10 |
id="toggle_404_detection" name="detect_404" value="1"/>
|
16 |
<div class="box-content">
|
17 |
<?php if ( ( $count = ( \WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api::get404Lockouts( strtotime( '-24 hours', current_time( 'timestamp' ) ) ) ) ) > 0 ): ?>
|
18 |
<div class="well well-yellow">
|
19 |
+
<?php echo sprintf( __( "There have been %d lockouts in the last 24 hours. <a href=\"%s\"><strong>View log</strong></a>.", "defender-security" ), $count, network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ) ?>
|
20 |
</div>
|
21 |
<?php else: ?>
|
22 |
<div class="well well-blue">
|
23 |
+
<?php esc_html_e( "404 Detection is enabled. There are no lockouts logged yet.", "defender-security" ) ?>
|
24 |
</div>
|
25 |
<?php endif; ?>
|
26 |
<div class="columns">
|
27 |
<div class="column is-one-third">
|
28 |
<label for="detect_404_threshold">
|
29 |
+
<?php esc_html_e( "Lockout threshold", "defender-security" ) ?>
|
30 |
</label>
|
31 |
<span class="sub">
|
32 |
+
<?php esc_html_e( "Specify how many 404 errors within a specific time period will trigger a lockout.", "defender-security" ) ?>
|
33 |
</span>
|
34 |
</div>
|
35 |
<div class="column">
|
36 |
<input size="8" value="<?php echo $settings->detect_404_threshold ?>" id="detect_404_threshold"
|
37 |
name="detect_404_threshold" type="text" class="inline">
|
38 |
+
<span class=""><?php esc_html_e( "404 errors within", "defender-security" ) ?></span>
|
39 |
<input size="8" value="<?php echo $settings->detect_404_timeframe ?>" id="detect_404_timeframe"
|
40 |
name="detect_404_timeframe" type="text" class="inline">
|
41 |
+
<span class=""><?php esc_html_e( "seconds", "defender-security" ) ?></span>
|
42 |
</div>
|
43 |
</div>
|
44 |
|
45 |
<div class="columns">
|
46 |
<div class="column is-one-third">
|
47 |
<label for="login_protection_lockout_timeframe">
|
48 |
+
<?php esc_html_e( "Lockout time", "defender-security" ) ?>
|
49 |
</label>
|
50 |
<span class="sub">
|
51 |
+
<?php esc_html_e( "Choose how long you’d like to ban the locked out user for.", "defender-security" ) ?>
|
52 |
</span>
|
53 |
</div>
|
54 |
<div class="column">
|
55 |
<input value="<?php echo $settings->detect_404_lockout_duration ?>" size="8"
|
56 |
name="detect_404_lockout_duration"
|
57 |
id="detect_404_lockout_duration" type="text" class="inline"/>
|
58 |
+
<span class=""><?php esc_html_e( "seconds", "defender-security" ) ?></span>
|
59 |
<div class="clearfix"></div>
|
60 |
<input type="hidden" name="detect_404_lockout_ban" value="0"/>
|
61 |
<input id="detect_404_lockout_ban" <?php checked( 1, $settings->detect_404_lockout_ban ) ?>
|
62 |
type="checkbox"
|
63 |
name="detect_404_lockout_ban" value="1">
|
64 |
<label for="detect_404_lockout_ban"
|
65 |
+
class="inline form-help is-marginless"><?php esc_html_e( 'Permanently ban 404 lockouts.', "defender-security" ) ?></label>
|
66 |
</div>
|
67 |
</div>
|
68 |
|
69 |
<div class="columns">
|
70 |
<div class="column is-one-third">
|
71 |
<label for="detect_404_lockout_message">
|
72 |
+
<?php esc_html_e( "Lockout message", "defender-security" ) ?>
|
73 |
</label>
|
74 |
<span class="sub">
|
75 |
+
<?php esc_html_e( "Customize the message locked out users will see.", "defender-security" ) ?>
|
76 |
</span>
|
77 |
</div>
|
78 |
<div class="column">
|
79 |
<textarea name="detect_404_lockout_message"
|
80 |
id="detect_404_lockout_message"><?php echo $settings->detect_404_lockout_message ?></textarea>
|
81 |
<span class="form-help">
|
82 |
+
<?php echo sprintf( __( "This message will be displayed across your website during the lockout period. See a quick preview <a href=\"%s\">here</a>.", "defender-security" ), add_query_arg( array(
|
83 |
'def-lockout-demo' => 1,
|
84 |
'type' => '404'
|
85 |
), network_site_url() ) ) ?>
|
90 |
<div class="columns">
|
91 |
<div class="column is-one-third">
|
92 |
<label for="detect_404_whitelist">
|
93 |
+
<?php esc_html_e( "Whitelist", "defender-security" ) ?>
|
94 |
</label>
|
95 |
<span class="sub">
|
96 |
+
<?php esc_html_e( "If you know a common file on your website is missing, you can record it here so it doesn't count towards a lockout record.", "defender-security" ) ?>
|
97 |
</span>
|
98 |
</div>
|
99 |
<div class="column">
|
100 |
<textarea id="detect_404_whitelist" name="detect_404_whitelist"
|
101 |
rows="8"><?php echo $settings->detect_404_whitelist ?></textarea>
|
102 |
<span class="form-help">
|
103 |
+
<?php esc_html_e( "You must list the full path beginning with a /.", "defender-security" ) ?>
|
104 |
</span>
|
105 |
</div>
|
106 |
</div>
|
108 |
<div class="columns">
|
109 |
<div class="column is-one-third">
|
110 |
<label for="detect_404_ignored_filetypes">
|
111 |
+
<?php esc_html_e( "Ignore file types", "defender-security" ) ?>
|
112 |
</label>
|
113 |
<span class="sub">
|
114 |
+
<?php esc_html_e( "Choose which types of files you want to log errors for but not trigger a lockout.", "defender-security" ) ?>
|
115 |
</span>
|
116 |
</div>
|
117 |
<div class="column">
|
118 |
<textarea id="detect_404_ignored_filetypes" name="detect_404_ignored_filetypes"
|
119 |
rows="8"><?php echo $settings->detect_404_ignored_filetypes ?></textarea>
|
120 |
<span class="form-help">
|
121 |
+
<?php esc_html_e( "Defender will log the 404 error, but won’t lockout the user for these filetypes.", "defender-security" ) ?>
|
122 |
</span>
|
123 |
</div>
|
124 |
</div>
|
126 |
<div class="columns">
|
127 |
<div class="column is-one-third">
|
128 |
<label>
|
129 |
+
<?php esc_html_e( "Exclusions", "defender-security" ) ?>
|
130 |
</label>
|
131 |
<span class="sub">
|
132 |
+
<?php esc_html_e( "By default, Defender will monitor all interactions with your website but you can choose to disable 404 detection for specific areas of your site.", "defender-security" ) ?>
|
133 |
</span>
|
134 |
</div>
|
135 |
<div class="column">
|
138 |
type="checkbox"
|
139 |
name="detect_404_logged" value="1">
|
140 |
<label for="detect_404_logged"
|
141 |
+
class="inline form-help is-marginless"><?php esc_html_e( 'Monitor 404s from logged in users', "defender-security" ) ?></label>
|
142 |
</div>
|
143 |
</div>
|
144 |
<div class="clear line"></div>
|
145 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
146 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
147 |
<button type="submit" class="button button-primary float-r">
|
148 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
149 |
</button>
|
150 |
<div class="clear"></div>
|
151 |
</div>
|
app/module/ip-lockout/view/emails/404-lockout.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
-
<title><?php _e( "New 404 Lockout",
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
@@ -414,10 +414,10 @@
|
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
-
<?php esc_html_e( "Protected By",
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
-
<?php esc_html_e( "Defender!",
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
@@ -452,14 +452,14 @@
|
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
-
<?php printf( __( "Hi %s",
|
456 |
,</h3>
|
457 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
458 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
459 |
-
<?php printf( __( "We've just locked out the host <strong>%s</strong> from %s due to more than <strong>%s</strong> 404 requests for the file <strong>%s</strong>. They have been locked out for <strong>%s seconds.</strong>",
|
460 |
</p>
|
461 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
462 |
-
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>",
|
463 |
.</p>
|
464 |
</td>
|
465 |
</tr>
|
@@ -474,14 +474,14 @@
|
|
474 |
<td class="main-signature-content"
|
475 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
476 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
477 |
-
<?php esc_html_e( "Stay vigilant.",
|
478 |
<p class="last-item"
|
479 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
480 |
-
<strong><?php esc_html_e( "WP Defender",
|
481 |
<br>
|
482 |
-
<?php esc_html_e( "Security Hero",
|
483 |
<br/>
|
484 |
-
<?php esc_html_e( "WPMU DEV",
|
485 |
</p>
|
486 |
</td>
|
487 |
</tr>
|
@@ -507,7 +507,7 @@
|
|
507 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
508 |
<td class="related-items-title brand" align="left"
|
509 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
510 |
-
<?php esc_html_e( "Related plugins worth giving a try",
|
511 |
</td>
|
512 |
</tr>
|
513 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
@@ -528,9 +528,9 @@
|
|
528 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
529 |
<span class="plugin-info"
|
530 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
531 |
-
<span><?php esc_html_e( "Optimize your site with",
|
532 |
<span class="plugin-title hummingbird"
|
533 |
-
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird",
|
534 |
</span>
|
535 |
</a>
|
536 |
</th>
|
@@ -547,9 +547,9 @@
|
|
547 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
548 |
<span class="plugin-info"
|
549 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
550 |
-
<span><?php esc_html_e( "Back up your hard work with",
|
551 |
<span class="plugin-title snapshot"
|
552 |
-
style="color: #642486; display: block;"><strong><?php _e( "Snapshot",
|
553 |
</span>
|
554 |
</a>
|
555 |
</th>
|
@@ -583,7 +583,7 @@
|
|
583 |
<th class="small-12 large-8 columns first copy" align="center"
|
584 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
585 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
586 |
-
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>",
|
587 |
</p>
|
588 |
</th>
|
589 |
</tr>
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
+
<title><?php _e( "New 404 Lockout", "defender-security" ) ?></title>
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
+
<?php esc_html_e( "Protected By", "defender-security" ) ?></h2>
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
+
<?php esc_html_e( "Defender!", "defender-security" ) ?></h1>
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
+
<?php printf( __( "Hi %s", "defender-security" ), $admin ) ?>
|
456 |
,</h3>
|
457 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
458 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
459 |
+
<?php printf( __( "We've just locked out the host <strong>%s</strong> from %s due to more than <strong>%s</strong> 404 requests for the file <strong>%s</strong>. They have been locked out for <strong>%s seconds.</strong>", "defender-security" ), $ip, network_site_url(), $setting->detect_404_threshold, $uri, $setting->detect_404_lockout_duration ) ?>
|
460 |
</p>
|
461 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
462 |
+
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=logs" ) ) ?>
|
463 |
.</p>
|
464 |
</td>
|
465 |
</tr>
|
474 |
<td class="main-signature-content"
|
475 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
476 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
477 |
+
<?php esc_html_e( "Stay vigilant.", "defender-security" ) ?></p>
|
478 |
<p class="last-item"
|
479 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
480 |
+
<strong><?php esc_html_e( "WP Defender", "defender-security" ) ?></strong>
|
481 |
<br>
|
482 |
+
<?php esc_html_e( "Security Hero", "defender-security" ) ?>
|
483 |
<br/>
|
484 |
+
<?php esc_html_e( "WPMU DEV", "defender-security" ) ?>
|
485 |
</p>
|
486 |
</td>
|
487 |
</tr>
|
507 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
508 |
<td class="related-items-title brand" align="left"
|
509 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
510 |
+
<?php esc_html_e( "Related plugins worth giving a try", "defender-security" ) ?>
|
511 |
</td>
|
512 |
</tr>
|
513 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
528 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
529 |
<span class="plugin-info"
|
530 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
531 |
+
<span><?php esc_html_e( "Optimize your site with", "defender-security" ) ?></span>
|
532 |
<span class="plugin-title hummingbird"
|
533 |
+
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird", "defender-security" ) ?></strong></span>
|
534 |
</span>
|
535 |
</a>
|
536 |
</th>
|
547 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
548 |
<span class="plugin-info"
|
549 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
550 |
+
<span><?php esc_html_e( "Back up your hard work with", "defender-security" ) ?></span>
|
551 |
<span class="plugin-title snapshot"
|
552 |
+
style="color: #642486; display: block;"><strong><?php _e( "Snapshot", "defender-security" ) ?></strong></span>
|
553 |
</span>
|
554 |
</a>
|
555 |
</th>
|
583 |
<th class="small-12 large-8 columns first copy" align="center"
|
584 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
585 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
586 |
+
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=reporting" ) ) ?>
|
587 |
</p>
|
588 |
</th>
|
589 |
</tr>
|
app/module/ip-lockout/view/emails/login-lockout.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
-
<title><?php _e( "New Login Lockout",
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
@@ -414,10 +414,10 @@
|
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
-
<?php esc_html_e( "Protected By",
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
-
<?php esc_html_e( "Defender!",
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
@@ -452,16 +452,16 @@
|
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
-
<?php printf( __( "Hi %s,",
|
456 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
457 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
458 |
<?php
|
459 |
-
$lockout_duration = $setting->login_protection_lockout_ban == true ? __( "They have banned permanently.",
|
460 |
-
printf( __( "We've just locked out the host <strong>%s</strong> from %s due to more than <strong>%s</strong> failed login attempts. %s",
|
461 |
) ?>
|
462 |
</p>
|
463 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
464 |
-
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>",
|
465 |
.</p>
|
466 |
</td>
|
467 |
</tr>
|
@@ -476,14 +476,14 @@
|
|
476 |
<td class="main-signature-content"
|
477 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
478 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
479 |
-
<?php esc_html_e( "Stay vigilant.",
|
480 |
<p class="last-item"
|
481 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
482 |
-
<strong><?php esc_html_e( "WP Defender",
|
483 |
<br>
|
484 |
-
<?php esc_html_e( "Security Hero",
|
485 |
<br/>
|
486 |
-
<?php esc_html_e( "WPMU DEV",
|
487 |
</p>
|
488 |
</td>
|
489 |
</tr>
|
@@ -509,7 +509,7 @@
|
|
509 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
510 |
<td class="related-items-title brand" align="left"
|
511 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
512 |
-
<?php esc_html_e( "Related plugins worth giving a try",
|
513 |
</td>
|
514 |
</tr>
|
515 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
@@ -530,9 +530,9 @@
|
|
530 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
531 |
<span class="plugin-info"
|
532 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
533 |
-
<span><?php esc_html_e( "Optimize your site with",
|
534 |
<span class="plugin-title hummingbird"
|
535 |
-
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird",
|
536 |
</span>
|
537 |
</a>
|
538 |
</th>
|
@@ -549,9 +549,9 @@
|
|
549 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
550 |
<span class="plugin-info"
|
551 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
552 |
-
<span><?php esc_html_e( "Back up your hard work with",
|
553 |
<span class="plugin-title snapshot"
|
554 |
-
style="color: #642486; display: block;"><strong><?php _e( "Snapshot",
|
555 |
</span>
|
556 |
</a>
|
557 |
</th>
|
@@ -585,7 +585,7 @@
|
|
585 |
<th class="small-12 large-8 columns first copy" align="center"
|
586 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
587 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
588 |
-
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>",
|
589 |
</p>
|
590 |
</th>
|
591 |
</tr>
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
+
<title><?php _e( "New Login Lockout", "defender-security" ) ?></title>
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
+
<?php esc_html_e( "Protected By", "defender-security" ) ?></h2>
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
+
<?php esc_html_e( "Defender!", "defender-security" ) ?></h1>
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
+
<?php printf( __( "Hi %s,", "defender-security" ), $admin ) ?></h3>
|
456 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
457 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
458 |
<?php
|
459 |
+
$lockout_duration = $setting->login_protection_lockout_ban == true ? __( "They have banned permanently.", "defender-security" ) : sprintf( __( "They have been locked out for <strong>%s seconds.</strong>", "defender-security" ), $setting->login_protection_lockout_duration );
|
460 |
+
printf( __( "We've just locked out the host <strong>%s</strong> from %s due to more than <strong>%s</strong> failed login attempts. %s", "defender-security" ), $ip, network_site_url(), $setting->login_protection_login_attempt, $lockout_duration
|
461 |
) ?>
|
462 |
</p>
|
463 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
464 |
+
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=logs" ) ) ?>
|
465 |
.</p>
|
466 |
</td>
|
467 |
</tr>
|
476 |
<td class="main-signature-content"
|
477 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
478 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
479 |
+
<?php esc_html_e( "Stay vigilant.", "defender-security" ) ?></p>
|
480 |
<p class="last-item"
|
481 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
482 |
+
<strong><?php esc_html_e( "WP Defender", "defender-security" ) ?></strong>
|
483 |
<br>
|
484 |
+
<?php esc_html_e( "Security Hero", "defender-security" ) ?>
|
485 |
<br/>
|
486 |
+
<?php esc_html_e( "WPMU DEV", "defender-security" ) ?>
|
487 |
</p>
|
488 |
</td>
|
489 |
</tr>
|
509 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
510 |
<td class="related-items-title brand" align="left"
|
511 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
512 |
+
<?php esc_html_e( "Related plugins worth giving a try", "defender-security" ) ?>
|
513 |
</td>
|
514 |
</tr>
|
515 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
530 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
531 |
<span class="plugin-info"
|
532 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
533 |
+
<span><?php esc_html_e( "Optimize your site with", "defender-security" ) ?></span>
|
534 |
<span class="plugin-title hummingbird"
|
535 |
+
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird", "defender-security" ) ?></strong></span>
|
536 |
</span>
|
537 |
</a>
|
538 |
</th>
|
549 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
550 |
<span class="plugin-info"
|
551 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
552 |
+
<span><?php esc_html_e( "Back up your hard work with", "defender-security" ) ?></span>
|
553 |
<span class="plugin-title snapshot"
|
554 |
+
style="color: #642486; display: block;"><strong><?php _e( "Snapshot", "defender-security" ) ?></strong></span>
|
555 |
</span>
|
556 |
</a>
|
557 |
</th>
|
585 |
<th class="small-12 large-8 columns first copy" align="center"
|
586 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
587 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
588 |
+
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=reporting" ) ) ?>
|
589 |
</p>
|
590 |
</th>
|
591 |
</tr>
|
app/module/ip-lockout/view/emails/login-username-ban.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
-
<title><?php _e( "New Login Lockout",
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
@@ -414,10 +414,10 @@
|
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
-
<?php esc_html_e( "Protected By",
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
-
<?php esc_html_e( "Defender!",
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
@@ -452,15 +452,15 @@
|
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
-
<?php printf( __( "Hi %s,",
|
456 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
457 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
458 |
<?php
|
459 |
-
$lockout_duration = $setting->login_protection_lockout_ban == true ? __( "They have banned permanently.",
|
460 |
-
printf( __( "We've just locked out the host <strong>%s</strong> from %s due to attempting to login with a banned username.They have banned permanently.",
|
461 |
</p>
|
462 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
463 |
-
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>",
|
464 |
.</p>
|
465 |
</td>
|
466 |
</tr>
|
@@ -475,14 +475,14 @@
|
|
475 |
<td class="main-signature-content"
|
476 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
477 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
478 |
-
<?php esc_html_e( "Stay vigilant.",
|
479 |
<p class="last-item"
|
480 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
481 |
-
<strong><?php esc_html_e( "WP Defender",
|
482 |
<br>
|
483 |
-
<?php esc_html_e( "Security Hero",
|
484 |
<br/>
|
485 |
-
<?php esc_html_e( "WPMU DEV",
|
486 |
</p>
|
487 |
</td>
|
488 |
</tr>
|
@@ -508,7 +508,7 @@
|
|
508 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
509 |
<td class="related-items-title brand" align="left"
|
510 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
511 |
-
<?php esc_html_e( "Related plugins worth giving a try",
|
512 |
</td>
|
513 |
</tr>
|
514 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
@@ -529,9 +529,9 @@
|
|
529 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
530 |
<span class="plugin-info"
|
531 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
532 |
-
<span><?php esc_html_e( "Optimize your site with",
|
533 |
<span class="plugin-title hummingbird"
|
534 |
-
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird",
|
535 |
</span>
|
536 |
</a>
|
537 |
</th>
|
@@ -548,9 +548,9 @@
|
|
548 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
549 |
<span class="plugin-info"
|
550 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
551 |
-
<span><?php esc_html_e( "Back up your hard work with",
|
552 |
<span class="plugin-title snapshot"
|
553 |
-
style="color: #642486; display: block;"><strong><?php _e( "Snapshot",
|
554 |
</span>
|
555 |
</a>
|
556 |
</th>
|
@@ -584,7 +584,7 @@
|
|
584 |
<th class="small-12 large-8 columns first copy" align="center"
|
585 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
586 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
587 |
-
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>",
|
588 |
</p>
|
589 |
</th>
|
590 |
</tr>
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
+
<title><?php _e( "New Login Lockout", "defender-security" ) ?></title>
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
+
<?php esc_html_e( "Protected By", "defender-security" ) ?></h2>
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
+
<?php esc_html_e( "Defender!", "defender-security" ) ?></h1>
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
+
<?php printf( __( "Hi %s,", "defender-security" ), $admin ) ?></h3>
|
456 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
457 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
458 |
<?php
|
459 |
+
$lockout_duration = $setting->login_protection_lockout_ban == true ? __( "They have banned permanently.", "defender-security" ) : sprintf( __( "They have been locked out for <strong>%s seconds.</strong>", "defender-security" ), $setting->login_protection_lockout_duration );
|
460 |
+
printf( __( "We've just locked out the host <strong>%s</strong> from %s due to attempting to login with a banned username.They have banned permanently.", "defender-security" ), $ip, network_site_url() ) ?>
|
461 |
</p>
|
462 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
463 |
+
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=logs" ) ) ?>
|
464 |
.</p>
|
465 |
</td>
|
466 |
</tr>
|
475 |
<td class="main-signature-content"
|
476 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
477 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
478 |
+
<?php esc_html_e( "Stay vigilant.", "defender-security" ) ?></p>
|
479 |
<p class="last-item"
|
480 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
481 |
+
<strong><?php esc_html_e( "WP Defender", "defender-security" ) ?></strong>
|
482 |
<br>
|
483 |
+
<?php esc_html_e( "Security Hero", "defender-security" ) ?>
|
484 |
<br/>
|
485 |
+
<?php esc_html_e( "WPMU DEV", "defender-security" ) ?>
|
486 |
</p>
|
487 |
</td>
|
488 |
</tr>
|
508 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
509 |
<td class="related-items-title brand" align="left"
|
510 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
511 |
+
<?php esc_html_e( "Related plugins worth giving a try", "defender-security" ) ?>
|
512 |
</td>
|
513 |
</tr>
|
514 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
529 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
530 |
<span class="plugin-info"
|
531 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
532 |
+
<span><?php esc_html_e( "Optimize your site with", "defender-security" ) ?></span>
|
533 |
<span class="plugin-title hummingbird"
|
534 |
+
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird", "defender-security" ) ?></strong></span>
|
535 |
</span>
|
536 |
</a>
|
537 |
</th>
|
548 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
549 |
<span class="plugin-info"
|
550 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
551 |
+
<span><?php esc_html_e( "Back up your hard work with", "defender-security" ) ?></span>
|
552 |
<span class="plugin-title snapshot"
|
553 |
+
style="color: #642486; display: block;"><strong><?php _e( "Snapshot", "defender-security" ) ?></strong></span>
|
554 |
</span>
|
555 |
</a>
|
556 |
</th>
|
584 |
<th class="small-12 large-8 columns first copy" align="center"
|
585 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
586 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
587 |
+
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=reporting" ) ) ?>
|
588 |
</p>
|
589 |
</th>
|
590 |
</tr>
|
app/module/ip-lockout/view/emails/report.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
-
<title><?php _e( "Lockout Report",
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
@@ -414,10 +414,10 @@
|
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
-
<?php esc_html_e( "Protected By",
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
-
<?php esc_html_e( "Defender!",
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
@@ -452,28 +452,28 @@
|
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
-
<?php printf( __( "Hi %s,",
|
456 |
|
457 |
<?php if ( $count_total == 0 ): ?>
|
458 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
459 |
-
<?php printf( esc_html__( "It's Defender here, just letting you know there haven't been any lockouts %s and the skies are clear.",
|
460 |
</p>
|
461 |
<?php else: ?>
|
462 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
463 |
-
<?php esc_html_e( "It's Defender here, reporting from the frontline.",
|
464 |
</p>
|
465 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
466 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
467 |
-
<?php printf( __( "%s I've put the smack down on <strong>%d</strong> hosts for bad behaviour. Here's a quick summary of the action:",
|
468 |
</p>
|
469 |
<hr/>
|
470 |
<p>
|
471 |
-
<?php esc_html_e( "Total Lockouts: ",
|
472 |
<strong><?php echo $count_total ?></strong>
|
473 |
</p>
|
474 |
<?php if ( is_object( $last_lockout ) ): ?>
|
475 |
<p>
|
476 |
-
<?php esc_html_e( "Last Lockout: ",
|
477 |
<strong><?php
|
478 |
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
479 |
echo esc_html( get_date_from_gmt( date( 'Y-m-d H:i:s', $last_lockout->date ), $format ) );
|
@@ -484,17 +484,17 @@
|
|
484 |
<p>-</p>
|
485 |
<?php endif; ?>
|
486 |
<p>
|
487 |
-
<?php esc_html_e( "404 Lockouts: ",
|
488 |
<strong><?php echo $lockout_404 ?></strong>
|
489 |
</p>
|
490 |
<p>
|
491 |
-
<?php esc_html_e( "Login Lockouts: ",
|
492 |
<strong><?php echo $lockout_login ?></strong>
|
493 |
</p>
|
494 |
<hr/>
|
495 |
<?php endif; ?>
|
496 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
497 |
-
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>",
|
498 |
.</p>
|
499 |
</td>
|
500 |
</tr>
|
@@ -509,14 +509,14 @@
|
|
509 |
<td class="main-signature-content"
|
510 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
511 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
512 |
-
<?php esc_html_e( "Stay vigilant.",
|
513 |
<p class="last-item"
|
514 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
515 |
-
<strong><?php esc_html_e( "WP Defender",
|
516 |
<br>
|
517 |
-
<?php esc_html_e( "Security Hero",
|
518 |
<br/>
|
519 |
-
<?php esc_html_e( "WPMU DEV",
|
520 |
</p>
|
521 |
</td>
|
522 |
</tr>
|
@@ -542,7 +542,7 @@
|
|
542 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
543 |
<td class="related-items-title brand" align="left"
|
544 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
545 |
-
<?php esc_html_e( "Related plugins worth giving a try",
|
546 |
</td>
|
547 |
</tr>
|
548 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
@@ -563,9 +563,9 @@
|
|
563 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
564 |
<span class="plugin-info"
|
565 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
566 |
-
<span><?php esc_html_e( "Optimize your site with",
|
567 |
<span class="plugin-title hummingbird"
|
568 |
-
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird",
|
569 |
</span>
|
570 |
</a>
|
571 |
</th>
|
@@ -582,9 +582,9 @@
|
|
582 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
583 |
<span class="plugin-info"
|
584 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
585 |
-
<span><?php esc_html_e( "Back up your hard work with",
|
586 |
<span class="plugin-title snapshot"
|
587 |
-
style="color: #642486; display: block;"><strong><?php _e( "Snapshot",
|
588 |
</span>
|
589 |
</a>
|
590 |
</th>
|
@@ -618,7 +618,7 @@
|
|
618 |
<th class="small-12 large-8 columns first copy" align="center"
|
619 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
620 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
621 |
-
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>",
|
622 |
</p>
|
623 |
</th>
|
624 |
</tr>
|
4 |
<head>
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<meta name="viewport" content="width=device-width">
|
7 |
+
<title><?php _e( "Lockout Report", "defender-security" ) ?></title>
|
8 |
<style>
|
9 |
a.plugin-brand:hover {
|
10 |
color: #e23717 !important;
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
+
<?php esc_html_e( "Protected By", "defender-security" ) ?></h2>
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
+
<?php esc_html_e( "Defender!", "defender-security" ) ?></h1>
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
452 |
<td class="main-intro-content"
|
453 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
454 |
<h3 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 32px; font-weight: normal; line-height: 32px; margin: 0; margin-bottom: 0; padding: 0 0 28px; text-align: left; word-wrap: normal;">
|
455 |
+
<?php printf( __( "Hi %s,", "defender-security" ), $admin ) ?></h3>
|
456 |
|
457 |
<?php if ( $count_total == 0 ): ?>
|
458 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
459 |
+
<?php printf( esc_html__( "It's Defender here, just letting you know there haven't been any lockouts %s and the skies are clear.", "defender-security" ), $time_unit ) ?>
|
460 |
</p>
|
461 |
<?php else: ?>
|
462 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
463 |
+
<?php esc_html_e( "It's Defender here, reporting from the frontline.", "defender-security" ) ?>
|
464 |
</p>
|
465 |
<?php $setting = \WP_Defender\Module\IP_Lockout\Model\Settings::instance() ?>
|
466 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
467 |
+
<?php printf( __( "%s I've put the smack down on <strong>%d</strong> hosts for bad behaviour. Here's a quick summary of the action:", "defender-security" ), $time_unit, $count_total ) ?>
|
468 |
</p>
|
469 |
<hr/>
|
470 |
<p>
|
471 |
+
<?php esc_html_e( "Total Lockouts: ", "defender-security" ) ?>
|
472 |
<strong><?php echo $count_total ?></strong>
|
473 |
</p>
|
474 |
<?php if ( is_object( $last_lockout ) ): ?>
|
475 |
<p>
|
476 |
+
<?php esc_html_e( "Last Lockout: ", "defender-security" ) ?>
|
477 |
<strong><?php
|
478 |
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
479 |
echo esc_html( get_date_from_gmt( date( 'Y-m-d H:i:s', $last_lockout->date ), $format ) );
|
484 |
<p>-</p>
|
485 |
<?php endif; ?>
|
486 |
<p>
|
487 |
+
<?php esc_html_e( "404 Lockouts: ", "defender-security" ) ?>
|
488 |
<strong><?php echo $lockout_404 ?></strong>
|
489 |
</p>
|
490 |
<p>
|
491 |
+
<?php esc_html_e( "Login Lockouts: ", "defender-security" ) ?>
|
492 |
<strong><?php echo $lockout_login ?></strong>
|
493 |
</p>
|
494 |
<hr/>
|
495 |
<?php endif; ?>
|
496 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
497 |
+
<?php printf( __( "You can view the full lockout logs <a href=\"%s\">here</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=logs" ) ) ?>
|
498 |
.</p>
|
499 |
</td>
|
500 |
</tr>
|
509 |
<td class="main-signature-content"
|
510 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
511 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
512 |
+
<?php esc_html_e( "Stay vigilant.", "defender-security" ) ?></p>
|
513 |
<p class="last-item"
|
514 |
style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0; text-align: left;">
|
515 |
+
<strong><?php esc_html_e( "WP Defender", "defender-security" ) ?></strong>
|
516 |
<br>
|
517 |
+
<?php esc_html_e( "Security Hero", "defender-security" ) ?>
|
518 |
<br/>
|
519 |
+
<?php esc_html_e( "WPMU DEV", "defender-security" ) ?>
|
520 |
</p>
|
521 |
</td>
|
522 |
</tr>
|
542 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
543 |
<td class="related-items-title brand" align="left"
|
544 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
545 |
+
<?php esc_html_e( "Related plugins worth giving a try", "defender-security" ) ?>
|
546 |
</td>
|
547 |
</tr>
|
548 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
563 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
564 |
<span class="plugin-info"
|
565 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
566 |
+
<span><?php esc_html_e( "Optimize your site with", "defender-security" ) ?></span>
|
567 |
<span class="plugin-title hummingbird"
|
568 |
+
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird", "defender-security" ) ?></strong></span>
|
569 |
</span>
|
570 |
</a>
|
571 |
</th>
|
582 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
583 |
<span class="plugin-info"
|
584 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
585 |
+
<span><?php esc_html_e( "Back up your hard work with", "defender-security" ) ?></span>
|
586 |
<span class="plugin-title snapshot"
|
587 |
+
style="color: #642486; display: block;"><strong><?php _e( "Snapshot", "defender-security" ) ?></strong></span>
|
588 |
</span>
|
589 |
</a>
|
590 |
</th>
|
618 |
<th class="small-12 large-8 columns first copy" align="center"
|
619 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
620 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
621 |
+
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-ip-lockout&view=reporting" ) ) ?>
|
622 |
</p>
|
623 |
</th>
|
624 |
</tr>
|
app/module/ip-lockout/view/layouts/layout.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div id="wp-defender" class="wp-defender">
|
4 |
<div class="iplockout">
|
5 |
<h2 class="title">
|
6 |
-
<?php _e( "IP LOCKOUTS",
|
7 |
</h2>
|
8 |
<div class="dev-box summary-box" id="lockoutSummary">
|
9 |
<div class="wd-overlay">
|
@@ -16,28 +16,28 @@
|
|
16 |
<div>
|
17 |
<h5 class="lockoutToday">.</h5>
|
18 |
<div class="clear"></div>
|
19 |
-
<span class="sub"><?php _e( "Lockouts in the past 24 hours",
|
20 |
<h6 class="lockoutThisMonth">.</h6>
|
21 |
-
<span class="sub"><?php _e( "Total lockouts in the past 30 days",
|
22 |
</div>
|
23 |
</div>
|
24 |
<div class="column is-5">
|
25 |
<ul class="dev-list bold">
|
26 |
<li>
|
27 |
<div>
|
28 |
-
<span class="list-label"><?php _e( "Last lockout",
|
29 |
<span class="list-detail lastLockout">.</span>
|
30 |
</div>
|
31 |
</li>
|
32 |
<li>
|
33 |
<div>
|
34 |
-
<span class="list-label"><?php _e( "Login lockouts in the past 7 days",
|
35 |
<span class="list-detail loginLockoutThisWeek">.</span>
|
36 |
</div>
|
37 |
</li>
|
38 |
<li>
|
39 |
<div>
|
40 |
-
<span class="list-label"><?php _e( "404 lockouts in the past 7 days",
|
41 |
<span class="list-detail lockout404ThisWeek">.</span>
|
42 |
</div>
|
43 |
</li>
|
@@ -51,49 +51,49 @@
|
|
51 |
<ul class="inner-nav is-hidden-mobile">
|
52 |
<li>
|
53 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
54 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout' ) ?>"><?php _e( "Login Protection",
|
55 |
</li>
|
56 |
<li>
|
57 |
<a class="<?php echo $controller->isView( '404' ) ? 'active' : null ?>"
|
58 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=404' ) ?>"><?php _e( "404 Detection",
|
59 |
</li>
|
60 |
<li>
|
61 |
<a class="<?php echo $controller->isView( 'blacklist' ) ? 'active' : null ?>"
|
62 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ?>"><?php _e( "IP Banning",
|
63 |
</li>
|
64 |
<li>
|
65 |
<a class="<?php echo $controller->isView( 'logs' ) ? 'active' : null ?>"
|
66 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ?>"><?php _e( "Logs",
|
67 |
</li>
|
68 |
<li>
|
69 |
<a class="<?php echo $controller->isView( 'notification' ) ? 'active' : null ?>"
|
70 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=notification' ) ?>"><?php _e( "Notifications",
|
71 |
</li>
|
72 |
<li>
|
73 |
<a class="<?php echo $controller->isView( 'settings' ) ? 'active' : null ?>"
|
74 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=settings' ) ?>"><?php _e( "Settings",
|
75 |
</li>
|
76 |
<li>
|
77 |
<a class="<?php echo $controller->isView( 'reporting' ) ? 'active' : null ?>"
|
78 |
-
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>"><?php _e( "Reporting",
|
79 |
</li>
|
80 |
</ul>
|
81 |
<div class="is-hidden-tablet mline">
|
82 |
<select class="mobile-nav">
|
83 |
<option <?php selected( null, \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
84 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout' ) ?>"><?php _e( "Login Protection",
|
85 |
<option <?php selected( '404', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
86 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=404' ) ?>"><?php _e( "404 Detection",
|
87 |
<option <?php selected( 'blacklist', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
88 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ?>"><?php _e( "IP Blacklist",
|
89 |
<option <?php selected( 'logs', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
90 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ?>"><?php _e( "Logs",
|
91 |
<option <?php selected( 'notification', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
92 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=notification' ) ?>"><?php _e( "Notifications",
|
93 |
<option <?php selected( 'settings', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
94 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=settings' ) ?>"><?php _e( "Settings",
|
95 |
<option <?php selected( 'reporting', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
96 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>"><?php _e( "Reporting",
|
97 |
</select>
|
98 |
</div>
|
99 |
</div>
|
3 |
<div id="wp-defender" class="wp-defender">
|
4 |
<div class="iplockout">
|
5 |
<h2 class="title">
|
6 |
+
<?php _e( "IP LOCKOUTS", "defender-security" ) ?>
|
7 |
</h2>
|
8 |
<div class="dev-box summary-box" id="lockoutSummary">
|
9 |
<div class="wd-overlay">
|
16 |
<div>
|
17 |
<h5 class="lockoutToday">.</h5>
|
18 |
<div class="clear"></div>
|
19 |
+
<span class="sub"><?php _e( "Lockouts in the past 24 hours", "defender-security" ) ?></span>
|
20 |
<h6 class="lockoutThisMonth">.</h6>
|
21 |
+
<span class="sub"><?php _e( "Total lockouts in the past 30 days", "defender-security" ) ?></span>
|
22 |
</div>
|
23 |
</div>
|
24 |
<div class="column is-5">
|
25 |
<ul class="dev-list bold">
|
26 |
<li>
|
27 |
<div>
|
28 |
+
<span class="list-label"><?php _e( "Last lockout", "defender-security" ) ?></span>
|
29 |
<span class="list-detail lastLockout">.</span>
|
30 |
</div>
|
31 |
</li>
|
32 |
<li>
|
33 |
<div>
|
34 |
+
<span class="list-label"><?php _e( "Login lockouts in the past 7 days", "defender-security" ) ?></span>
|
35 |
<span class="list-detail loginLockoutThisWeek">.</span>
|
36 |
</div>
|
37 |
</li>
|
38 |
<li>
|
39 |
<div>
|
40 |
+
<span class="list-label"><?php _e( "404 lockouts in the past 7 days", "defender-security" ) ?></span>
|
41 |
<span class="list-detail lockout404ThisWeek">.</span>
|
42 |
</div>
|
43 |
</li>
|
51 |
<ul class="inner-nav is-hidden-mobile">
|
52 |
<li>
|
53 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
54 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout' ) ?>"><?php _e( "Login Protection", "defender-security" ) ?></a>
|
55 |
</li>
|
56 |
<li>
|
57 |
<a class="<?php echo $controller->isView( '404' ) ? 'active' : null ?>"
|
58 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=404' ) ?>"><?php _e( "404 Detection", "defender-security" ) ?></a>
|
59 |
</li>
|
60 |
<li>
|
61 |
<a class="<?php echo $controller->isView( 'blacklist' ) ? 'active' : null ?>"
|
62 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ?>"><?php _e( "IP Banning", "defender-security" ) ?></a>
|
63 |
</li>
|
64 |
<li>
|
65 |
<a class="<?php echo $controller->isView( 'logs' ) ? 'active' : null ?>"
|
66 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ?>"><?php _e( "Logs", "defender-security" ) ?></a>
|
67 |
</li>
|
68 |
<li>
|
69 |
<a class="<?php echo $controller->isView( 'notification' ) ? 'active' : null ?>"
|
70 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=notification' ) ?>"><?php _e( "Notifications", "defender-security" ) ?></a>
|
71 |
</li>
|
72 |
<li>
|
73 |
<a class="<?php echo $controller->isView( 'settings' ) ? 'active' : null ?>"
|
74 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=settings' ) ?>"><?php _e( "Settings", "defender-security" ) ?></a>
|
75 |
</li>
|
76 |
<li>
|
77 |
<a class="<?php echo $controller->isView( 'reporting' ) ? 'active' : null ?>"
|
78 |
+
href="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>"><?php _e( "Reporting", "defender-security" ) ?></a>
|
79 |
</li>
|
80 |
</ul>
|
81 |
<div class="is-hidden-tablet mline">
|
82 |
<select class="mobile-nav">
|
83 |
<option <?php selected( null, \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
84 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout' ) ?>"><?php _e( "Login Protection", "defender-security" ) ?></option>
|
85 |
<option <?php selected( '404', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
86 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=404' ) ?>"><?php _e( "404 Detection", "defender-security" ) ?></option>
|
87 |
<option <?php selected( 'blacklist', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
88 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ?>"><?php _e( "IP Blacklist", "defender-security" ) ?></option>
|
89 |
<option <?php selected( 'logs', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
90 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ?>"><?php _e( "Logs", "defender-security" ) ?></option>
|
91 |
<option <?php selected( 'notification', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
92 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=notification' ) ?>"><?php _e( "Notifications", "defender-security" ) ?></option>
|
93 |
<option <?php selected( 'settings', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
94 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=settings' ) ?>"><?php _e( "Settings", "defender-security" ) ?></option>
|
95 |
<option <?php selected( 'reporting', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', null ) ) ?>
|
96 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-ip-lockout&view=reporting' ) ?>"><?php _e( "Reporting", "defender-security" ) ?></option>
|
97 |
</select>
|
98 |
</div>
|
99 |
</div>
|
app/module/ip-lockout/view/locked.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6 |
<meta http-equiv="Cache-control" content="max-age=0">
|
7 |
-
<title><?php esc_html_e( "WP Defender",
|
8 |
<link rel="stylesheet"
|
9 |
href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic">
|
10 |
<style type="text/css">
|
@@ -71,8 +71,8 @@
|
|
71 |
</div>
|
72 |
<p><?php echo $message ?></p>
|
73 |
</div>
|
74 |
-
<div class="powered"><?php esc_html_e( "Powered by",
|
75 |
-
<strong><?php esc_html_e( "Defender",
|
76 |
</div>
|
77 |
</body>
|
78 |
</html>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6 |
<meta http-equiv="Cache-control" content="max-age=0">
|
7 |
+
<title><?php esc_html_e( "WP Defender", "defender-security" ) ?></title>
|
8 |
<link rel="stylesheet"
|
9 |
href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic">
|
10 |
<style type="text/css">
|
71 |
</div>
|
72 |
<p><?php echo $message ?></p>
|
73 |
</div>
|
74 |
+
<div class="powered"><?php esc_html_e( "Powered by", "defender-security" ) ?>
|
75 |
+
<strong><?php esc_html_e( "Defender", "defender-security" ) ?></strong></div>
|
76 |
</div>
|
77 |
</body>
|
78 |
</html>
|
app/module/ip-lockout/view/logging/enabled.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "LOCKOUT LOGS",
|
4 |
<button type="button" data-target=".lockout-logs-filter" rel="show-filter"
|
5 |
-
class="button button-secondary button-small"><?php _e( "Filter",
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<?php
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "LOCKOUT LOGS", "defender-security" ) ?></h3>
|
4 |
<button type="button" data-target=".lockout-logs-filter" rel="show-filter"
|
5 |
+
class="button button-secondary button-small"><?php _e( "Filter", "defender-security" ) ?></button>
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<?php
|
app/module/ip-lockout/view/login-lockouts/disabled.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "Login Protection",
|
4 |
</div>
|
5 |
<div class="box-content tc">
|
6 |
<img
|
@@ -8,14 +8,14 @@
|
|
8 |
class="line"/>
|
9 |
<p class="line max-600">
|
10 |
<?php esc_html_e( "Watch and protect your login area for attackers trying to randomly guess login
|
11 |
-
details for your site. Defender will lock them out after a set number of failed attempts.",
|
12 |
</p>
|
13 |
<form method="post" id="settings-frm" class="ip-frm">
|
14 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
15 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
16 |
<input type="hidden" name="login_protection" value="1"/>
|
17 |
<button type="submit" class="button button-primary">
|
18 |
-
<?php esc_html_e( "Enable",
|
19 |
</button>
|
20 |
</form>
|
21 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "Login Protection", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content tc">
|
6 |
<img
|
8 |
class="line"/>
|
9 |
<p class="line max-600">
|
10 |
<?php esc_html_e( "Watch and protect your login area for attackers trying to randomly guess login
|
11 |
+
details for your site. Defender will lock them out after a set number of failed attempts.", "defender-security" ) ?>
|
12 |
</p>
|
13 |
<form method="post" id="settings-frm" class="ip-frm">
|
14 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
15 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
16 |
<input type="hidden" name="login_protection" value="1"/>
|
17 |
<button type="submit" class="button button-primary">
|
18 |
+
<?php esc_html_e( "Enable", "defender-security" ) ?>
|
19 |
</button>
|
20 |
</form>
|
21 |
</div>
|
app/module/ip-lockout/view/login-lockouts/enabled.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<div class="dev-box">
|
2 |
<form method="post" id="settings-frm" class="ip-frm">
|
3 |
<div class="box-title">
|
4 |
-
<h3><?php _e( "Login Protection",
|
5 |
<div class="side float-r">
|
6 |
<div>
|
7 |
-
<span tooltip="<?php esc_attr_e( "Deactivate Login Protection",
|
8 |
class="toggle">
|
9 |
<input type="hidden" name="login_protection" value="0"/>
|
10 |
<input type="checkbox" checked="checked" name="login_protection" value="1"
|
@@ -17,47 +17,47 @@
|
|
17 |
<div class="box-content">
|
18 |
<?php if ( ( $count = ( \WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api::getLoginLockouts( strtotime( '-24 hours', current_time( 'timestamp' ) ) ) ) ) > 0 ): ?>
|
19 |
<div class="well well-yellow">
|
20 |
-
<?php echo sprintf( __( "There have been %d lockouts in the last 24 hours. <a href=\"%s\"><strong>View log</strong></a>.",
|
21 |
</div>
|
22 |
<?php else: ?>
|
23 |
<div class="well well-blue">
|
24 |
-
<?php esc_html_e( "Login protection is enabled. There are no lockouts logged yet.",
|
25 |
</div>
|
26 |
<?php endif; ?>
|
27 |
<div class="columns">
|
28 |
<div class="column is-one-third">
|
29 |
<label for="login_protection_login_attempt">
|
30 |
-
<?php esc_html_e( "Lockout threshold",
|
31 |
</label>
|
32 |
<span class="sub">
|
33 |
-
<?php esc_html_e( "Specify how many failed login attempts within a specific time period will trigger a lockout.",
|
34 |
</span>
|
35 |
</div>
|
36 |
<div class="column">
|
37 |
<input size="8" value="<?php echo $settings->login_protection_login_attempt ?>" type="text"
|
38 |
class="inline" id="login_protection_login_attempt"
|
39 |
name="login_protection_login_attempt"/>
|
40 |
-
<span><?php esc_html_e( "failed logins within",
|
41 |
<input size="8" value="<?php echo $settings->login_protection_lockout_timeframe ?>"
|
42 |
id="login_lockout_timeframe"
|
43 |
name="login_protection_lockout_timeframe" type="text" class="inline">
|
44 |
-
<span><?php esc_html_e( "seconds",
|
45 |
</div>
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-one-third">
|
49 |
<label for="login_protection_lockout_timeframe">
|
50 |
-
<?php esc_html_e( "Lockout time",
|
51 |
</label>
|
52 |
<span class="sub">
|
53 |
-
<?php esc_html_e( "Choose how long you’d like to ban the locked out user for.",
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
57 |
<input value="<?php echo $settings->login_protection_lockout_duration ?>" size="8"
|
58 |
name="login_protection_lockout_duration"
|
59 |
id="login_protection_lockout_duration" type="text" class="inline"/>
|
60 |
-
<span class=""><?php esc_html_e( "seconds",
|
61 |
<div class="clearfix"></div>
|
62 |
<input type="hidden" name="login_protection_lockout_ban" value="0"/>
|
63 |
<input
|
@@ -65,24 +65,24 @@
|
|
65 |
type="checkbox"
|
66 |
name="login_protection_lockout_ban" value="1">
|
67 |
<label for="login_protection_lockout_ban"
|
68 |
-
class="inline form-help is-marginless"><?php esc_html_e( 'Permanently ban login lockouts.',
|
69 |
</div>
|
70 |
</div>
|
71 |
|
72 |
<div class="columns">
|
73 |
<div class="column is-one-third">
|
74 |
<label for="login_protection_lockout_message">
|
75 |
-
<?php esc_html_e( "Lockout message",
|
76 |
</label>
|
77 |
<span class="sub">
|
78 |
-
<?php esc_html_e( "Customize the message locked out users will see.",
|
79 |
</span>
|
80 |
</div>
|
81 |
<div class="column">
|
82 |
<textarea name="login_protection_lockout_message"
|
83 |
id="login_protection_lockout_message"><?php echo $settings->login_protection_lockout_message ?></textarea>
|
84 |
<span class="form-help">
|
85 |
-
<?php echo sprintf( __( "This message will be displayed across your website during the lockout period. See a quick preview <a href=\"%s\">here</a>.",
|
86 |
'def-lockout-demo' => 1,
|
87 |
'type' => 'login'
|
88 |
), network_site_url() ) ) ?>
|
@@ -93,14 +93,14 @@
|
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
<label for="username_blacklist">
|
96 |
-
<?php esc_html_e( "Automatically ban usernames",
|
97 |
</label>
|
98 |
<span class="sub">
|
99 |
-
<?php esc_html_e( "We recommend you avoid using the default username \"admin.\" Defender will automatically lock out any users who attempt to enter your site using the usernames you list here.",
|
100 |
</span>
|
101 |
</div>
|
102 |
<div class="column">
|
103 |
-
<textarea placeholder="<?php esc_attr_e( "Type usernames, one per line",
|
104 |
id="username_blacklist" name="username_blacklist"
|
105 |
rows="8"><?php echo $settings->username_blacklist ?></textarea>
|
106 |
<span class="sub">
|
@@ -113,7 +113,7 @@
|
|
113 |
} else {
|
114 |
$host = null;
|
115 |
}
|
116 |
-
printf( __( "We recommend adding the usernames <strong>admin</strong>, <strong>administrator</strong> and your hostname <strong>%s</strong> as these are common for bots to try logging in with. One username per line",
|
117 |
</span>
|
118 |
</div>
|
119 |
</div>
|
@@ -121,7 +121,7 @@
|
|
121 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
122 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
123 |
<button type="submit" class="button button-primary float-r">
|
124 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
125 |
</button>
|
126 |
<div class="clear"></div>
|
127 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<form method="post" id="settings-frm" class="ip-frm">
|
3 |
<div class="box-title">
|
4 |
+
<h3><?php _e( "Login Protection", "defender-security" ) ?></h3>
|
5 |
<div class="side float-r">
|
6 |
<div>
|
7 |
+
<span tooltip="<?php esc_attr_e( "Deactivate Login Protection", "defender-security" ) ?>"
|
8 |
class="toggle">
|
9 |
<input type="hidden" name="login_protection" value="0"/>
|
10 |
<input type="checkbox" checked="checked" name="login_protection" value="1"
|
17 |
<div class="box-content">
|
18 |
<?php if ( ( $count = ( \WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api::getLoginLockouts( strtotime( '-24 hours', current_time( 'timestamp' ) ) ) ) ) > 0 ): ?>
|
19 |
<div class="well well-yellow">
|
20 |
+
<?php echo sprintf( __( "There have been %d lockouts in the last 24 hours. <a href=\"%s\"><strong>View log</strong></a>.", "defender-security" ), $count, network_admin_url( 'admin.php?page=wdf-ip-lockout&view=logs' ) ) ?>
|
21 |
</div>
|
22 |
<?php else: ?>
|
23 |
<div class="well well-blue">
|
24 |
+
<?php esc_html_e( "Login protection is enabled. There are no lockouts logged yet.", "defender-security" ) ?>
|
25 |
</div>
|
26 |
<?php endif; ?>
|
27 |
<div class="columns">
|
28 |
<div class="column is-one-third">
|
29 |
<label for="login_protection_login_attempt">
|
30 |
+
<?php esc_html_e( "Lockout threshold", "defender-security" ) ?>
|
31 |
</label>
|
32 |
<span class="sub">
|
33 |
+
<?php esc_html_e( "Specify how many failed login attempts within a specific time period will trigger a lockout.", "defender-security" ) ?>
|
34 |
</span>
|
35 |
</div>
|
36 |
<div class="column">
|
37 |
<input size="8" value="<?php echo $settings->login_protection_login_attempt ?>" type="text"
|
38 |
class="inline" id="login_protection_login_attempt"
|
39 |
name="login_protection_login_attempt"/>
|
40 |
+
<span><?php esc_html_e( "failed logins within", "defender-security" ) ?></span>
|
41 |
<input size="8" value="<?php echo $settings->login_protection_lockout_timeframe ?>"
|
42 |
id="login_lockout_timeframe"
|
43 |
name="login_protection_lockout_timeframe" type="text" class="inline">
|
44 |
+
<span><?php esc_html_e( "seconds", "defender-security" ) ?></span>
|
45 |
</div>
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-one-third">
|
49 |
<label for="login_protection_lockout_timeframe">
|
50 |
+
<?php esc_html_e( "Lockout time", "defender-security" ) ?>
|
51 |
</label>
|
52 |
<span class="sub">
|
53 |
+
<?php esc_html_e( "Choose how long you’d like to ban the locked out user for.", "defender-security" ) ?>
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
57 |
<input value="<?php echo $settings->login_protection_lockout_duration ?>" size="8"
|
58 |
name="login_protection_lockout_duration"
|
59 |
id="login_protection_lockout_duration" type="text" class="inline"/>
|
60 |
+
<span class=""><?php esc_html_e( "seconds", "defender-security" ) ?></span>
|
61 |
<div class="clearfix"></div>
|
62 |
<input type="hidden" name="login_protection_lockout_ban" value="0"/>
|
63 |
<input
|
65 |
type="checkbox"
|
66 |
name="login_protection_lockout_ban" value="1">
|
67 |
<label for="login_protection_lockout_ban"
|
68 |
+
class="inline form-help is-marginless"><?php esc_html_e( 'Permanently ban login lockouts.', "defender-security" ) ?></label>
|
69 |
</div>
|
70 |
</div>
|
71 |
|
72 |
<div class="columns">
|
73 |
<div class="column is-one-third">
|
74 |
<label for="login_protection_lockout_message">
|
75 |
+
<?php esc_html_e( "Lockout message", "defender-security" ) ?>
|
76 |
</label>
|
77 |
<span class="sub">
|
78 |
+
<?php esc_html_e( "Customize the message locked out users will see.", "defender-security" ) ?>
|
79 |
</span>
|
80 |
</div>
|
81 |
<div class="column">
|
82 |
<textarea name="login_protection_lockout_message"
|
83 |
id="login_protection_lockout_message"><?php echo $settings->login_protection_lockout_message ?></textarea>
|
84 |
<span class="form-help">
|
85 |
+
<?php echo sprintf( __( "This message will be displayed across your website during the lockout period. See a quick preview <a href=\"%s\">here</a>.", "defender-security" ), add_query_arg( array(
|
86 |
'def-lockout-demo' => 1,
|
87 |
'type' => 'login'
|
88 |
), network_site_url() ) ) ?>
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
<label for="username_blacklist">
|
96 |
+
<?php esc_html_e( "Automatically ban usernames", "defender-security" ) ?>
|
97 |
</label>
|
98 |
<span class="sub">
|
99 |
+
<?php esc_html_e( "We recommend you avoid using the default username \"admin.\" Defender will automatically lock out any users who attempt to enter your site using the usernames you list here.", "defender-security" ) ?>
|
100 |
</span>
|
101 |
</div>
|
102 |
<div class="column">
|
103 |
+
<textarea placeholder="<?php esc_attr_e( "Type usernames, one per line", "defender-security" ) ?>"
|
104 |
id="username_blacklist" name="username_blacklist"
|
105 |
rows="8"><?php echo $settings->username_blacklist ?></textarea>
|
106 |
<span class="sub">
|
113 |
} else {
|
114 |
$host = null;
|
115 |
}
|
116 |
+
printf( __( "We recommend adding the usernames <strong>admin</strong>, <strong>administrator</strong> and your hostname <strong>%s</strong> as these are common for bots to try logging in with. One username per line", "defender-security" ), $host ) ?>
|
117 |
</span>
|
118 |
</div>
|
119 |
</div>
|
121 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
122 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
123 |
<button type="submit" class="button button-primary float-r">
|
124 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
125 |
</button>
|
126 |
<div class="clear"></div>
|
127 |
</div>
|
app/module/ip-lockout/view/migration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div class="iplockout">
|
4 |
<div class="advanced-tools">
|
5 |
<h2 class="title">
|
6 |
-
<?php _e( "Migration",
|
7 |
</h2>
|
8 |
</div>
|
9 |
</div>
|
@@ -12,7 +12,7 @@
|
|
12 |
|
13 |
<dialog id="defLockoutUpgrade">
|
14 |
<div class="line">
|
15 |
-
<?php _e( "Please hold on, we are updating your data, please don't close this tab...",
|
16 |
</div>
|
17 |
<div class="well mline">
|
18 |
<div class="scan-progress">
|
3 |
<div class="iplockout">
|
4 |
<div class="advanced-tools">
|
5 |
<h2 class="title">
|
6 |
+
<?php _e( "Migration", "defender-security" ) ?>
|
7 |
</h2>
|
8 |
</div>
|
9 |
</div>
|
12 |
|
13 |
<dialog id="defLockoutUpgrade">
|
14 |
<div class="line">
|
15 |
+
<?php _e( "Please hold on, we are updating your data, please don't close this tab...", "defender-security" ) ?>
|
16 |
</div>
|
17 |
<div class="well mline">
|
18 |
<div class="scan-progress">
|
app/module/ip-lockout/view/notification/enabled.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "NOTIFICATIONS",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label>
|
10 |
-
<?php esc_html_e( "Send email notifications",
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
-
<?php esc_html_e( "Choose which lockout notifications you wish to be notified about. These are sent instantly.",
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<span
|
18 |
-
tooltip="<?php echo esc_attr( __( "Enable Login Protection",
|
19 |
class="toggle float-l">
|
20 |
<input type="hidden" name="login_lockout_notification" value="0"/>
|
21 |
<input type="checkbox"
|
@@ -24,13 +24,13 @@
|
|
24 |
id="toggle_login_protection"/>
|
25 |
<label class="toggle-label" for="toggle_login_protection"></label>
|
26 |
</span>
|
27 |
-
<label><?php esc_html_e( "Login Protection Lockout",
|
28 |
<span class="sub inpos">
|
29 |
-
<?php esc_html_e( "When a user or IP is locked out for trying to access your login area.",
|
30 |
</span>
|
31 |
<div class="clear mline"></div>
|
32 |
<span
|
33 |
-
tooltip="<?php echo esc_attr( __( "Enable 404 Detection",
|
34 |
class="toggle float-l">
|
35 |
<input type="hidden" name="ip_lockout_notification" value="0"/>
|
36 |
<input type="checkbox" name="ip_lockout_notification"
|
@@ -39,18 +39,18 @@
|
|
39 |
<label class="toggle-label" for="toggle_404_detection"></label>
|
40 |
</span>
|
41 |
<label>
|
42 |
-
<?php esc_html_e( "404 Detection Lockout",
|
43 |
</label>
|
44 |
-
<span class="sub inpos"><?php esc_html_e( "When a user or IP is locked out for repeated hits on non-existent files.",
|
45 |
</div>
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-one-third">
|
49 |
<label>
|
50 |
-
<?php esc_html_e( "Email recipients",
|
51 |
</label>
|
52 |
<span class="sub">
|
53 |
-
<?php esc_html_e( "Choose which of your website's users will receive scan report results via email.",
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
@@ -61,10 +61,10 @@
|
|
61 |
<div class="columns">
|
62 |
<div class="column is-one-third">
|
63 |
<label>
|
64 |
-
<?php esc_html_e( "Repeat Lockouts",
|
65 |
</label>
|
66 |
<span class="sub">
|
67 |
-
<?php esc_html_e( "If you’re getting too many emails from IPs who are repeatedly being locked out you can turn them off for a period of time.",
|
68 |
</span>
|
69 |
</div>
|
70 |
<div class="column">
|
@@ -76,10 +76,10 @@
|
|
76 |
id="cooldown_enabled"/>
|
77 |
<label class="toggle-label" for="cooldown_enabled"></label>
|
78 |
</span>
|
79 |
-
<label><?php _e( "Limit email notifications for repeat lockouts",
|
80 |
<div class="well well-white schedule-box">
|
81 |
-
<label><strong><?php _e( "Threshold",
|
82 |
-
- <?php _e( "The number of lockouts before we turn off emails",
|
83 |
</label>
|
84 |
<select name="cooldown_number_lockout">
|
85 |
<option <?php selected( '1', $settings->cooldown_number_lockout ) ?> value="1">1
|
@@ -91,28 +91,28 @@
|
|
91 |
<option <?php selected( '10', $settings->cooldown_number_lockout ) ?> value="10">10
|
92 |
</option>
|
93 |
</select>
|
94 |
-
<label><strong><?php _e( "Cool Off Period",
|
95 |
-
- <?php _e( "For how long should we turn them off?",
|
96 |
</label>
|
97 |
<select name="cooldown_period" class="mline">
|
98 |
<option <?php selected( '1', $settings->cooldown_period ) ?>
|
99 |
-
value="1"><?php _e( "1 hour",
|
100 |
<option <?php selected( '2', $settings->cooldown_period ) ?>
|
101 |
-
value="2"><?php _e( "2 hours",
|
102 |
<option <?php selected( '6', $settings->cooldown_period ) ?>
|
103 |
-
value="6"><?php _e( "6 hours",
|
104 |
<option <?php selected( '12', $settings->cooldown_period ) ?>
|
105 |
-
value="12"><?php _e( "12 hours",
|
106 |
<option <?php selected( '24', $settings->cooldown_period ) ?>
|
107 |
-
value="24"><?php _e( "24 hours",
|
108 |
<option <?php selected( '36', $settings->cooldown_period ) ?>
|
109 |
-
value="36"><?php _e( "36 hours",
|
110 |
<option <?php selected( '48', $settings->cooldown_period ) ?>
|
111 |
-
value="48"><?php _e( "48 hours",
|
112 |
<option <?php selected( '168', $settings->cooldown_period ) ?>
|
113 |
-
value="168"><?php _e( "7 days",
|
114 |
<option <?php selected( '720', $settings->cooldown_period ) ?>
|
115 |
-
value="720"><?php _e( "30 days",
|
116 |
</select>
|
117 |
</div>
|
118 |
</div>
|
@@ -121,7 +121,7 @@
|
|
121 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
122 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
123 |
<button type="submit" class="button button-primary float-r">
|
124 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
125 |
</button>
|
126 |
<div class="clear"></div>
|
127 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "NOTIFICATIONS", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label>
|
10 |
+
<?php esc_html_e( "Send email notifications", "defender-security" ) ?>
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
+
<?php esc_html_e( "Choose which lockout notifications you wish to be notified about. These are sent instantly.", "defender-security" ) ?>
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<span
|
18 |
+
tooltip="<?php echo esc_attr( __( "Enable Login Protection", "defender-security" ) ) ?>"
|
19 |
class="toggle float-l">
|
20 |
<input type="hidden" name="login_lockout_notification" value="0"/>
|
21 |
<input type="checkbox"
|
24 |
id="toggle_login_protection"/>
|
25 |
<label class="toggle-label" for="toggle_login_protection"></label>
|
26 |
</span>
|
27 |
+
<label><?php esc_html_e( "Login Protection Lockout", "defender-security" ) ?></label>
|
28 |
<span class="sub inpos">
|
29 |
+
<?php esc_html_e( "When a user or IP is locked out for trying to access your login area.", "defender-security" ) ?>
|
30 |
</span>
|
31 |
<div class="clear mline"></div>
|
32 |
<span
|
33 |
+
tooltip="<?php echo esc_attr( __( "Enable 404 Detection", "defender-security" ) ) ?>"
|
34 |
class="toggle float-l">
|
35 |
<input type="hidden" name="ip_lockout_notification" value="0"/>
|
36 |
<input type="checkbox" name="ip_lockout_notification"
|
39 |
<label class="toggle-label" for="toggle_404_detection"></label>
|
40 |
</span>
|
41 |
<label>
|
42 |
+
<?php esc_html_e( "404 Detection Lockout", "defender-security" ) ?>
|
43 |
</label>
|
44 |
+
<span class="sub inpos"><?php esc_html_e( "When a user or IP is locked out for repeated hits on non-existent files.", "defender-security" ) ?></span>
|
45 |
</div>
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-one-third">
|
49 |
<label>
|
50 |
+
<?php esc_html_e( "Email recipients", "defender-security" ) ?>
|
51 |
</label>
|
52 |
<span class="sub">
|
53 |
+
<?php esc_html_e( "Choose which of your website's users will receive scan report results via email.", "defender-security" ) ?>
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
61 |
<div class="columns">
|
62 |
<div class="column is-one-third">
|
63 |
<label>
|
64 |
+
<?php esc_html_e( "Repeat Lockouts", "defender-security" ) ?>
|
65 |
</label>
|
66 |
<span class="sub">
|
67 |
+
<?php esc_html_e( "If you’re getting too many emails from IPs who are repeatedly being locked out you can turn them off for a period of time.", "defender-security" ) ?>
|
68 |
</span>
|
69 |
</div>
|
70 |
<div class="column">
|
76 |
id="cooldown_enabled"/>
|
77 |
<label class="toggle-label" for="cooldown_enabled"></label>
|
78 |
</span>
|
79 |
+
<label><?php _e( "Limit email notifications for repeat lockouts", "defender-security" ) ?></label>
|
80 |
<div class="well well-white schedule-box">
|
81 |
+
<label><strong><?php _e( "Threshold", "defender-security" ) ?></strong>
|
82 |
+
- <?php _e( "The number of lockouts before we turn off emails", "defender-security" ) ?>
|
83 |
</label>
|
84 |
<select name="cooldown_number_lockout">
|
85 |
<option <?php selected( '1', $settings->cooldown_number_lockout ) ?> value="1">1
|
91 |
<option <?php selected( '10', $settings->cooldown_number_lockout ) ?> value="10">10
|
92 |
</option>
|
93 |
</select>
|
94 |
+
<label><strong><?php _e( "Cool Off Period", "defender-security" ) ?></strong>
|
95 |
+
- <?php _e( "For how long should we turn them off?", "defender-security" ) ?>
|
96 |
</label>
|
97 |
<select name="cooldown_period" class="mline">
|
98 |
<option <?php selected( '1', $settings->cooldown_period ) ?>
|
99 |
+
value="1"><?php _e( "1 hour", "defender-security" ) ?></option>
|
100 |
<option <?php selected( '2', $settings->cooldown_period ) ?>
|
101 |
+
value="2"><?php _e( "2 hours", "defender-security" ) ?></option>
|
102 |
<option <?php selected( '6', $settings->cooldown_period ) ?>
|
103 |
+
value="6"><?php _e( "6 hours", "defender-security" ) ?></option>
|
104 |
<option <?php selected( '12', $settings->cooldown_period ) ?>
|
105 |
+
value="12"><?php _e( "12 hours", "defender-security" ) ?></option>
|
106 |
<option <?php selected( '24', $settings->cooldown_period ) ?>
|
107 |
+
value="24"><?php _e( "24 hours", "defender-security" ) ?></option>
|
108 |
<option <?php selected( '36', $settings->cooldown_period ) ?>
|
109 |
+
value="36"><?php _e( "36 hours", "defender-security" ) ?></option>
|
110 |
<option <?php selected( '48', $settings->cooldown_period ) ?>
|
111 |
+
value="48"><?php _e( "48 hours", "defender-security" ) ?></option>
|
112 |
<option <?php selected( '168', $settings->cooldown_period ) ?>
|
113 |
+
value="168"><?php _e( "7 days", "defender-security" ) ?></option>
|
114 |
<option <?php selected( '720', $settings->cooldown_period ) ?>
|
115 |
+
value="720"><?php _e( "30 days", "defender-security" ) ?></option>
|
116 |
</select>
|
117 |
</div>
|
118 |
</div>
|
121 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
122 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
123 |
<button type="submit" class="button button-primary float-r">
|
124 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
125 |
</button>
|
126 |
<div class="clear"></div>
|
127 |
</form>
|
app/module/ip-lockout/view/notification/report-free.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<div class="dev-box report-sale">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "Reporting",
|
4 |
<a class="button button-green button-small"
|
5 |
-
href="#pro-feature" rel="dialog"><?php _e( "Upgrade to Pro",
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<form method="post" id="settings-frm" class="ip-frm">
|
@@ -12,15 +12,15 @@
|
|
12 |
<div class="columns">
|
13 |
<div class="column is-one-third">
|
14 |
<label>
|
15 |
-
<?php esc_html_e( "Lockouts report",
|
16 |
</label>
|
17 |
<span class="sub">
|
18 |
-
<?php esc_html_e( "Configure Defender to automatically email you a lockout report for this website. ",
|
19 |
</span>
|
20 |
</div>
|
21 |
<div class="column">
|
22 |
<span
|
23 |
-
tooltip="<?php echo esc_attr( __( "Send regular email report",
|
24 |
class="toggle float-l">
|
25 |
<input type="hidden" name="report" value="0"/>
|
26 |
<input type="checkbox"
|
@@ -30,31 +30,31 @@
|
|
30 |
<label class="toggle-label" for="toggle_report"></label>
|
31 |
</span>
|
32 |
<label>
|
33 |
-
<?php esc_html_e( "Send regular email report",
|
34 |
</label>
|
35 |
<div class="clear mline"></div>
|
36 |
<div class="well well-white schedule-box">
|
37 |
-
<strong><?php esc_html_e( "SCHEDULE",
|
38 |
-
<label><?php esc_html_e( "Frequency",
|
39 |
<select name="report_frequency">
|
40 |
-
<option value="1"><?php esc_html_e( "Daily",
|
41 |
</select>
|
42 |
<div class="days-container">
|
43 |
-
<label><?php esc_html_e( "Day of the week",
|
44 |
<select name="report_day">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
46 |
<option value="<?php echo strtolower( $day ) ?>"><?php echo $day ?></option>
|
47 |
<?php endforeach;; ?>
|
48 |
</select>
|
49 |
</div>
|
50 |
-
<label><?php esc_html_e( "Time of day",
|
51 |
<select name="report_time">
|
52 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $timestamp => $time ): ?>
|
53 |
<option value="<?php echo $timestamp ?>"><?php echo strftime( '%I:%M %p', strtotime( $time ) ) ?></option>
|
54 |
<?php endforeach; ?>
|
55 |
</select>
|
56 |
<!-- <span>-->
|
57 |
-
<?php //printf( esc_html__( "You will receive a lockout report email %s.",
|
58 |
</div>
|
59 |
</div>
|
60 |
</div>
|
@@ -62,10 +62,10 @@
|
|
62 |
<div class="columns last">
|
63 |
<div class="column is-one-third">
|
64 |
<label>
|
65 |
-
<?php esc_html_e( "Email recipients",
|
66 |
</label>
|
67 |
<span class="sub">
|
68 |
-
<?php esc_html_e( "Choose which of your website’s users will receive the lockout report.",
|
69 |
</span>
|
70 |
</div>
|
71 |
<div class="column">
|
@@ -76,7 +76,7 @@
|
|
76 |
</form>
|
77 |
<div class="presale-text">
|
78 |
<div>
|
79 |
-
<?php printf( __( "Schedule automated file scanning and email reporting for all your websites. This feature is included in a WPMU DEV membership along with 100+ plugins & themes, 24/7 support and lots of handy site management tools – <a href=\"%s\">Try it all FREE today!</a>",
|
80 |
</div>
|
81 |
</div>
|
82 |
</div>
|
1 |
<div class="dev-box report-sale">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "Reporting", "defender-security" ) ?></h3>
|
4 |
<a class="button button-green button-small"
|
5 |
+
href="#pro-feature" rel="dialog"><?php _e( "Upgrade to Pro", "defender-security" ) ?></a>
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<form method="post" id="settings-frm" class="ip-frm">
|
12 |
<div class="columns">
|
13 |
<div class="column is-one-third">
|
14 |
<label>
|
15 |
+
<?php esc_html_e( "Lockouts report", "defender-security" ) ?>
|
16 |
</label>
|
17 |
<span class="sub">
|
18 |
+
<?php esc_html_e( "Configure Defender to automatically email you a lockout report for this website. ", "defender-security" ) ?>
|
19 |
</span>
|
20 |
</div>
|
21 |
<div class="column">
|
22 |
<span
|
23 |
+
tooltip="<?php echo esc_attr( __( "Send regular email report", "defender-security" ) ) ?>"
|
24 |
class="toggle float-l">
|
25 |
<input type="hidden" name="report" value="0"/>
|
26 |
<input type="checkbox"
|
30 |
<label class="toggle-label" for="toggle_report"></label>
|
31 |
</span>
|
32 |
<label>
|
33 |
+
<?php esc_html_e( "Send regular email report", "defender-security" ) ?>
|
34 |
</label>
|
35 |
<div class="clear mline"></div>
|
36 |
<div class="well well-white schedule-box">
|
37 |
+
<strong><?php esc_html_e( "SCHEDULE", "defender-security" ) ?></strong>
|
38 |
+
<label><?php esc_html_e( "Frequency", "defender-security" ) ?></label>
|
39 |
<select name="report_frequency">
|
40 |
+
<option value="1"><?php esc_html_e( "Daily", "defender-security" ) ?></option>
|
41 |
</select>
|
42 |
<div class="days-container">
|
43 |
+
<label><?php esc_html_e( "Day of the week", "defender-security" ) ?></label>
|
44 |
<select name="report_day">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
46 |
<option value="<?php echo strtolower( $day ) ?>"><?php echo $day ?></option>
|
47 |
<?php endforeach;; ?>
|
48 |
</select>
|
49 |
</div>
|
50 |
+
<label><?php esc_html_e( "Time of day", "defender-security" ) ?></label>
|
51 |
<select name="report_time">
|
52 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $timestamp => $time ): ?>
|
53 |
<option value="<?php echo $timestamp ?>"><?php echo strftime( '%I:%M %p', strtotime( $time ) ) ?></option>
|
54 |
<?php endforeach; ?>
|
55 |
</select>
|
56 |
<!-- <span>-->
|
57 |
+
<?php //printf( esc_html__( "You will receive a lockout report email %s.", "defender-security" ), date_i18n( WD_Utils::get_date_time_format(), \WP_Defender\IP_Lockout\Component\Login_Protection_Api::get_report_sending_time() ) ) ?><!--</span>-->
|
58 |
</div>
|
59 |
</div>
|
60 |
</div>
|
62 |
<div class="columns last">
|
63 |
<div class="column is-one-third">
|
64 |
<label>
|
65 |
+
<?php esc_html_e( "Email recipients", "defender-security" ) ?>
|
66 |
</label>
|
67 |
<span class="sub">
|
68 |
+
<?php esc_html_e( "Choose which of your website’s users will receive the lockout report.", "defender-security" ) ?>
|
69 |
</span>
|
70 |
</div>
|
71 |
<div class="column">
|
76 |
</form>
|
77 |
<div class="presale-text">
|
78 |
<div>
|
79 |
+
<?php printf( __( "Schedule automated file scanning and email reporting for all your websites. This feature is included in a WPMU DEV membership along with 100+ plugins & themes, 24/7 support and lots of handy site management tools – <a href=\"%s\">Try it all FREE today!</a>", "defender-security" ), "https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade" ) ?>
|
80 |
</div>
|
81 |
</div>
|
82 |
</div>
|
app/module/ip-lockout/view/notification/report.php
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php esc_html_e( "Reporting",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label>
|
10 |
-
<?php esc_html_e( "Lockouts report",
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
-
<?php esc_html_e( "Configure Defender to automatically email you a lockout report for this website. ",
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<span
|
18 |
-
tooltip="<?php echo esc_attr( __( "Send regular email report",
|
19 |
class="toggle float-l">
|
20 |
<input type="hidden" name="report" value="0"/>
|
21 |
<input type="checkbox"
|
@@ -25,22 +25,22 @@
|
|
25 |
<label class="toggle-label" for="toggle_report"></label>
|
26 |
</span>
|
27 |
<label>
|
28 |
-
<?php esc_html_e( "Send regular email report",
|
29 |
</label>
|
30 |
<div class="clear mline"></div>
|
31 |
<div class="well well-white schedule-box">
|
32 |
-
<strong><?php esc_html_e( "SCHEDULE",
|
33 |
-
<label><?php esc_html_e( "Frequency",
|
34 |
<select name="report_frequency">
|
35 |
<option <?php selected( '1', $settings->report_frequency ) ?>
|
36 |
-
value="1"><?php esc_html_e( "Daily",
|
37 |
<option <?php selected( '7', $settings->report_frequency ) ?>
|
38 |
-
value="7"><?php esc_html_e( "Weekly",
|
39 |
<option <?php selected( '30', $settings->report_frequency ) ?>
|
40 |
-
value="30"><?php esc_html_e( "Monthly",
|
41 |
</select>
|
42 |
<div class="days-container">
|
43 |
-
<label><?php esc_html_e( "Day of the week",
|
44 |
<select name="report_day">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
46 |
<option <?php selected( $settings->report_day, strtolower( $day ) ) ?>
|
@@ -48,7 +48,7 @@
|
|
48 |
<?php endforeach;; ?>
|
49 |
</select>
|
50 |
</div>
|
51 |
-
<label><?php esc_html_e( "Time of day",
|
52 |
<select name="report_time">
|
53 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $timestamp => $time ): ?>
|
54 |
<option <?php selected( $settings->report_time, $timestamp ) ?>
|
@@ -56,7 +56,7 @@
|
|
56 |
<?php endforeach; ?>
|
57 |
</select>
|
58 |
<!-- <span>-->
|
59 |
-
<?php //printf( esc_html__( "You will receive a lockout report email %s.",
|
60 |
</div>
|
61 |
</div>
|
62 |
</div>
|
@@ -64,10 +64,10 @@
|
|
64 |
<div class="columns">
|
65 |
<div class="column is-one-third">
|
66 |
<label>
|
67 |
-
<?php esc_html_e( "Email recipients",
|
68 |
</label>
|
69 |
<span class="sub">
|
70 |
-
<?php esc_html_e( "Choose which of your website’s users will receive the lockout report.",
|
71 |
</span>
|
72 |
</div>
|
73 |
<div class="column">
|
@@ -78,7 +78,7 @@
|
|
78 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
79 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
80 |
<button type="submit" class="button button-primary float-r">
|
81 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
82 |
</button>
|
83 |
<div class="clear"></div>
|
84 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php esc_html_e( "Reporting", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label>
|
10 |
+
<?php esc_html_e( "Lockouts report", "defender-security" ) ?>
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
+
<?php esc_html_e( "Configure Defender to automatically email you a lockout report for this website. ", "defender-security" ) ?>
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<span
|
18 |
+
tooltip="<?php echo esc_attr( __( "Send regular email report", "defender-security" ) ) ?>"
|
19 |
class="toggle float-l">
|
20 |
<input type="hidden" name="report" value="0"/>
|
21 |
<input type="checkbox"
|
25 |
<label class="toggle-label" for="toggle_report"></label>
|
26 |
</span>
|
27 |
<label>
|
28 |
+
<?php esc_html_e( "Send regular email report", "defender-security" ) ?>
|
29 |
</label>
|
30 |
<div class="clear mline"></div>
|
31 |
<div class="well well-white schedule-box">
|
32 |
+
<strong><?php esc_html_e( "SCHEDULE", "defender-security" ) ?></strong>
|
33 |
+
<label><?php esc_html_e( "Frequency", "defender-security" ) ?></label>
|
34 |
<select name="report_frequency">
|
35 |
<option <?php selected( '1', $settings->report_frequency ) ?>
|
36 |
+
value="1"><?php esc_html_e( "Daily", "defender-security" ) ?></option>
|
37 |
<option <?php selected( '7', $settings->report_frequency ) ?>
|
38 |
+
value="7"><?php esc_html_e( "Weekly", "defender-security" ) ?></option>
|
39 |
<option <?php selected( '30', $settings->report_frequency ) ?>
|
40 |
+
value="30"><?php esc_html_e( "Monthly", "defender-security" ) ?></option>
|
41 |
</select>
|
42 |
<div class="days-container">
|
43 |
+
<label><?php esc_html_e( "Day of the week", "defender-security" ) ?></label>
|
44 |
<select name="report_day">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
46 |
<option <?php selected( $settings->report_day, strtolower( $day ) ) ?>
|
48 |
<?php endforeach;; ?>
|
49 |
</select>
|
50 |
</div>
|
51 |
+
<label><?php esc_html_e( "Time of day", "defender-security" ) ?></label>
|
52 |
<select name="report_time">
|
53 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $timestamp => $time ): ?>
|
54 |
<option <?php selected( $settings->report_time, $timestamp ) ?>
|
56 |
<?php endforeach; ?>
|
57 |
</select>
|
58 |
<!-- <span>-->
|
59 |
+
<?php //printf( esc_html__( "You will receive a lockout report email %s.", "defender-security" ), date_i18n( WD_Utils::get_date_time_format(), \WP_Defender\IP_Lockout\Component\Login_Protection_Api::get_report_sending_time() ) ) ?><!--</span>-->
|
60 |
</div>
|
61 |
</div>
|
62 |
</div>
|
64 |
<div class="columns">
|
65 |
<div class="column is-one-third">
|
66 |
<label>
|
67 |
+
<?php esc_html_e( "Email recipients", "defender-security" ) ?>
|
68 |
</label>
|
69 |
<span class="sub">
|
70 |
+
<?php esc_html_e( "Choose which of your website’s users will receive the lockout report.", "defender-security" ) ?>
|
71 |
</span>
|
72 |
</div>
|
73 |
<div class="column">
|
78 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
79 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
80 |
<button type="submit" class="button button-primary float-r">
|
81 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
82 |
</button>
|
83 |
<div class="clear"></div>
|
84 |
</form>
|
app/module/ip-lockout/view/pro-feature.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features",
|
2 |
<div class="wp-defender">
|
3 |
-
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;",
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
-
<strong><?php _e( "Automatic Full File Scans & Notifications",
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
-
issues arise.",
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
-
<strong><?php _e( "Advanced File Scanning",
|
16 |
<p class="sub">
|
17 |
-
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.",
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
-
<strong><?php _e( "Audit Logging",
|
23 |
<p class="sub">
|
24 |
-
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.",
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
-
<strong><?php _e( "Tailored Reporting",
|
30 |
<p class="sub">
|
31 |
-
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.",
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
-
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free",
|
36 |
-
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.",
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
1 |
+
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features", "defender-security" ) ?>">
|
2 |
<div class="wp-defender">
|
3 |
+
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;", "defender-security" ) ?></p>
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
+
<strong><?php _e( "Automatic Full File Scans & Notifications", "defender-security" ) ?></strong>
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
+
issues arise.", "defender-security" ) ?>
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
+
<strong><?php _e( "Advanced File Scanning", "defender-security" ) ?></strong>
|
16 |
<p class="sub">
|
17 |
+
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.", "defender-security" ) ?>
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
+
<strong><?php _e( "Audit Logging", "defender-security" ) ?></strong>
|
23 |
<p class="sub">
|
24 |
+
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.", "defender-security" ) ?>
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
+
<strong><?php _e( "Tailored Reporting", "defender-security" ) ?></strong>
|
30 |
<p class="sub">
|
31 |
+
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.", "defender-security" ) ?>
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
+
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free", "defender-security" ) ?></a>
|
36 |
+
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.", "defender-security" ) ?></p>
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
app/module/ip-lockout/view/settings.php
CHANGED
@@ -1,47 +1,47 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Settings",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label for="login_protection_login_attempt">
|
10 |
-
<?php esc_html_e( "Storage",
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
-
<?php esc_html_e( "Event logs are cached on your local server to speed up load times. You can choose how many days to keep logs for before they are removed.",
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<input size="8" value="<?php echo $settings->storage_days ?>" type="text"
|
18 |
class="inline" id="storage_days"
|
19 |
name="storage_days"/>
|
20 |
-
<span><?php esc_html_e( "days",
|
21 |
-
<span class="form-help"><?php _e( "Choose how many days of event logs you’d like to store locally.",
|
22 |
</div>
|
23 |
</div>
|
24 |
<div class="columns">
|
25 |
<div class="column is-one-third">
|
26 |
<label for="login_protection_login_attempt">
|
27 |
-
<?php esc_html_e( "Delete logs",
|
28 |
</label>
|
29 |
<span class="sub">
|
30 |
-
<?php esc_html_e( "If you wish to delete your current logs simply hit delete and this will wipe your logs clean.",
|
31 |
</span>
|
32 |
</div>
|
33 |
<div class="column">
|
34 |
<button type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'lockoutEmptyLogs' ) ) ?>"
|
35 |
-
class="button button-secondary empty-logs"><?php _e( "Delete Logs",
|
36 |
<span class="delete-status"></span>
|
37 |
-
<span class="form-help"><?php _e( "Note: Defender will instantly remove all past event logs, you will not be able to get them back.",
|
38 |
</div>
|
39 |
</div>
|
40 |
<div class="clear line"></div>
|
41 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
42 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
43 |
<button type="submit" class="button button-primary float-r">
|
44 |
-
<?php esc_html_e( "UPDATE SETTINGS",
|
45 |
</button>
|
46 |
<div class="clear"></div>
|
47 |
</form>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Settings", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" id="settings-frm" class="ip-frm">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
<label for="login_protection_login_attempt">
|
10 |
+
<?php esc_html_e( "Storage", "defender-security" ) ?>
|
11 |
</label>
|
12 |
<span class="sub">
|
13 |
+
<?php esc_html_e( "Event logs are cached on your local server to speed up load times. You can choose how many days to keep logs for before they are removed.", "defender-security" ) ?>
|
14 |
</span>
|
15 |
</div>
|
16 |
<div class="column">
|
17 |
<input size="8" value="<?php echo $settings->storage_days ?>" type="text"
|
18 |
class="inline" id="storage_days"
|
19 |
name="storage_days"/>
|
20 |
+
<span><?php esc_html_e( "days", "defender-security" ) ?></span>
|
21 |
+
<span class="form-help"><?php _e( "Choose how many days of event logs you’d like to store locally.", "defender-security" ) ?></span>
|
22 |
</div>
|
23 |
</div>
|
24 |
<div class="columns">
|
25 |
<div class="column is-one-third">
|
26 |
<label for="login_protection_login_attempt">
|
27 |
+
<?php esc_html_e( "Delete logs", "defender-security" ) ?>
|
28 |
</label>
|
29 |
<span class="sub">
|
30 |
+
<?php esc_html_e( "If you wish to delete your current logs simply hit delete and this will wipe your logs clean.", "defender-security" ) ?>
|
31 |
</span>
|
32 |
</div>
|
33 |
<div class="column">
|
34 |
<button type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'lockoutEmptyLogs' ) ) ?>"
|
35 |
+
class="button button-secondary empty-logs"><?php _e( "Delete Logs", "defender-security" ) ?></button>
|
36 |
<span class="delete-status"></span>
|
37 |
+
<span class="form-help"><?php _e( "Note: Defender will instantly remove all past event logs, you will not be able to get them back.", "defender-security" ) ?></span>
|
38 |
</div>
|
39 |
</div>
|
40 |
<div class="clear line"></div>
|
41 |
<?php wp_nonce_field( 'saveLockoutSettings' ) ?>
|
42 |
<input type="hidden" name="action" value="saveLockoutSettings"/>
|
43 |
<button type="submit" class="button button-primary float-r">
|
44 |
+
<?php esc_html_e( "UPDATE SETTINGS", "defender-security" ) ?>
|
45 |
</button>
|
46 |
<div class="clear"></div>
|
47 |
</form>
|
app/module/scan.php
CHANGED
@@ -17,8 +17,8 @@ class Scan extends Module {
|
|
17 |
private function _registerPostTpe() {
|
18 |
register_post_type( 'wdf_scan', array(
|
19 |
'labels' => array(
|
20 |
-
'name' => __( "Scans",
|
21 |
-
'singular_name' => __( "Scan",
|
22 |
),
|
23 |
'capability_type' => array( 'wdf_scan', 'wdf_scans' ),
|
24 |
'supports' => array( '' ),
|
@@ -36,8 +36,8 @@ class Scan extends Module {
|
|
36 |
) );
|
37 |
register_post_type( 'wdf_scan_item', array(
|
38 |
'labels' => array(
|
39 |
-
'name' => __( "Scan Items",
|
40 |
-
'singular_name' => __( "Scan Item",
|
41 |
),
|
42 |
'capability_type' => array( 'wdf_scan_item', 'wdf_scan_items' ),
|
43 |
'supports' => array( '' ),
|
17 |
private function _registerPostTpe() {
|
18 |
register_post_type( 'wdf_scan', array(
|
19 |
'labels' => array(
|
20 |
+
'name' => __( "Scans", "defender-security" ),
|
21 |
+
'singular_name' => __( "Scan", "defender-security" )
|
22 |
),
|
23 |
'capability_type' => array( 'wdf_scan', 'wdf_scans' ),
|
24 |
'supports' => array( '' ),
|
36 |
) );
|
37 |
register_post_type( 'wdf_scan_item', array(
|
38 |
'labels' => array(
|
39 |
+
'name' => __( "Scan Items", "defender-security" ),
|
40 |
+
'singular_name' => __( "Scan Item", "defender-security" )
|
41 |
),
|
42 |
'capability_type' => array( 'wdf_scan_item', 'wdf_scan_items' ),
|
43 |
'supports' => array( '' ),
|
app/module/scan/behavior/core-result.php
CHANGED
@@ -54,11 +54,11 @@ class Core_Result extends Behavior {
|
|
54 |
public function getIssueDetail() {
|
55 |
$raw = $this->getRaw();
|
56 |
if ( $raw['type'] == 'unknown' ) {
|
57 |
-
return esc_html__( "Unknown file in WordPress core",
|
58 |
} elseif ( $raw['type'] == 'dir' ) {
|
59 |
-
return esc_html__( "This directory doesn't belong to WordPress core",
|
60 |
} elseif ( $raw['type'] == 'modified' ) {
|
61 |
-
return esc_html__( "This WordPress core file appears modified",
|
62 |
}
|
63 |
}
|
64 |
|
@@ -72,13 +72,13 @@ class Core_Result extends Behavior {
|
|
72 |
if ( $raw['type'] == 'unknown' ) {
|
73 |
$res = unlink( $raw['file'] );
|
74 |
if ( $res == false ) {
|
75 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file",
|
76 |
}
|
77 |
$this->getOwner()->delete();
|
78 |
|
79 |
return true;
|
80 |
} elseif ( $raw['type'] == 'modified' ) {
|
81 |
-
return new \WP_Error( Error_Code::INVALID, __( "This file can't not remove",
|
82 |
} elseif ( $raw['type'] == 'dir' ) {
|
83 |
$res = $this->deleteFolder( $raw['file'] );
|
84 |
if ( is_wp_error( $res ) ) {
|
@@ -98,11 +98,11 @@ class Core_Result extends Behavior {
|
|
98 |
$originSrc = $this->getOriginalSource();
|
99 |
$raw = $this->getRaw();
|
100 |
if ( $raw['type'] != 'modified' ) {
|
101 |
-
return new \WP_Error( Error_Code::INVALID, __( "This file is not resolvable",
|
102 |
}
|
103 |
|
104 |
if ( ! is_writeable( $raw['file'] ) ) {
|
105 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE, sprintf( esc_html__( "It seems the %s file is currently using by another process or isn't writeable.",
|
106 |
}
|
107 |
|
108 |
file_put_contents( $raw['file'], $originSrc, LOCK_EX );
|
@@ -119,7 +119,7 @@ class Core_Result extends Behavior {
|
|
119 |
ob_start();
|
120 |
$raw = $this->getRaw();
|
121 |
?>
|
122 |
-
<dialog title="<?php esc_attr_e( "Issue Details",
|
123 |
id="dia_<?php echo $this->getOwner()->id ?>">
|
124 |
<div class="wpmud">
|
125 |
<div class="wp-defender">
|
@@ -129,7 +129,7 @@ class Core_Result extends Behavior {
|
|
129 |
<li>
|
130 |
<div>
|
131 |
<span class="list-label">
|
132 |
-
<strong><?php _e( "Location",
|
133 |
</span>
|
134 |
<span class="list-detail">
|
135 |
<?php echo $this->getSubtitle(); ?>
|
@@ -139,7 +139,7 @@ class Core_Result extends Behavior {
|
|
139 |
<li>
|
140 |
<div>
|
141 |
<span class="list-label">
|
142 |
-
<strong><?php _e( "Size",
|
143 |
</span>
|
144 |
<span class="list-detail">
|
145 |
<?php
|
@@ -156,7 +156,7 @@ class Core_Result extends Behavior {
|
|
156 |
<li>
|
157 |
<div>
|
158 |
<span class="list-label">
|
159 |
-
<strong><?php _e( "Date Added",
|
160 |
</span>
|
161 |
<span class="list-detail">
|
162 |
<?php
|
@@ -186,7 +186,7 @@ class Core_Result extends Behavior {
|
|
186 |
<?php wp_nonce_field( 'ignoreItem' ) ?>
|
187 |
<input type="hidden" name="id" value="<?php echo $this->getOwner()->id ?>"/>
|
188 |
<button type="submit" class="button button-secondary button-small">
|
189 |
-
<?php _e( "Ignore",
|
190 |
</form>
|
191 |
<?php if ( $raw['type'] == 'unknown' || $raw['type'] == 'dir' ): ?>
|
192 |
<form method="post" class="scan-frm delete-item float-r">
|
@@ -194,15 +194,15 @@ class Core_Result extends Behavior {
|
|
194 |
<input type="hidden" name="id" value="<?php echo $this->getOwner()->id ?>"/>
|
195 |
<?php wp_nonce_field( 'deleteItem' ) ?>
|
196 |
<button type="button" class="button button-small delete-mitem button-grey">
|
197 |
-
<?php _e( "Delete",
|
198 |
<div class="confirm-box wd-hide">
|
199 |
-
<?php _e( "This will permanent remove the file/folder with all content, do you want to do this?",
|
200 |
|
201 |
<button type="submit" class="button button-small button-grey">
|
202 |
-
<?php _e( "Yes",
|
203 |
</button>
|
204 |
<button type="button" class="button button-small button-secondary">
|
205 |
-
<?php _e( "No",
|
206 |
</button>
|
207 |
</div>
|
208 |
</form>
|
@@ -212,7 +212,7 @@ class Core_Result extends Behavior {
|
|
212 |
<input type="hidden" name="action" value="resolveItem"/>
|
213 |
<?php wp_nonce_field( 'resolveItem' ) ?>
|
214 |
<button type="submit" class="button button-small">
|
215 |
-
<?php _e( "Restore to Original",
|
216 |
</button>
|
217 |
</form>
|
218 |
<?php endif; ?>
|
@@ -261,7 +261,7 @@ class Core_Result extends Behavior {
|
|
261 |
private function _dialogContentForAdded() {
|
262 |
?>
|
263 |
<p class="line">
|
264 |
-
<?php _e( "A stray file has been found in your site directory, which your version of WordPress doesn't need. As far as we can tell, the file is harmless (and maybe even from an older WordPress install) so it's safe to ignore it. If you choose to delete the file, we recommend backing up your website beforehand",
|
265 |
</p>
|
266 |
<?php
|
267 |
$ext = pathinfo( $this->getSubtitle(), PATHINFO_EXTENSION );
|
@@ -277,7 +277,7 @@ class Core_Result extends Behavior {
|
|
277 |
<div class="mline source-code">
|
278 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
279 |
height="18"/>
|
280 |
-
<?php _e( "Pulling source file...",
|
281 |
<form method="post" class="float-l pull-src scan-frm">
|
282 |
<input type="hidden" name="action" value="pullSrcFile">
|
283 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
@@ -294,12 +294,12 @@ class Core_Result extends Behavior {
|
|
294 |
private function _dialogContentForModified() {
|
295 |
?>
|
296 |
<p class="line">
|
297 |
-
<?php _e( "Compare your file with the original file in the WordPress repository. Pieces highlighted in red will be removed when you patch the file, and pieces highlighted in green will be added.",
|
298 |
</p>
|
299 |
<div class="mline source-code">
|
300 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
301 |
height="18"/>
|
302 |
-
<?php _e( "Pulling source file...",
|
303 |
<form method="post" class="float-l pull-src scan-frm">
|
304 |
<input type="hidden" name="action" value="pullSrcFile">
|
305 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
@@ -316,12 +316,12 @@ class Core_Result extends Behavior {
|
|
316 |
private function _dialogContentForDir() {
|
317 |
?>
|
318 |
<p>
|
319 |
-
<?php _e( "We found this folder in your WordPress file list. Your current version of WordPress doesn’t use this folder so it might belong to another application. If you don’t recognize it, you can delete this folder (don’t forget to back up your website first!) or get in touch with the WPMU DEV support team for more information.",
|
320 |
</p>
|
321 |
<div class="mline source-code">
|
322 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
323 |
height="18"/>
|
324 |
-
<?php _e( "Pulling source file...",
|
325 |
<form method="post" class="float-l pull-src scan-frm">
|
326 |
<input type="hidden" name="action" value="pullSrcFile">
|
327 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
@@ -402,12 +402,12 @@ class Core_Result extends Behavior {
|
|
402 |
$res = @unlink( $file->getRealPath() );
|
403 |
}
|
404 |
if ( $res == false ) {
|
405 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file",
|
406 |
}
|
407 |
}
|
408 |
$res = @rmdir( $dir );
|
409 |
if ( $res == false ) {
|
410 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file",
|
411 |
}
|
412 |
|
413 |
return true;
|
54 |
public function getIssueDetail() {
|
55 |
$raw = $this->getRaw();
|
56 |
if ( $raw['type'] == 'unknown' ) {
|
57 |
+
return esc_html__( "Unknown file in WordPress core", "defender-security" );
|
58 |
} elseif ( $raw['type'] == 'dir' ) {
|
59 |
+
return esc_html__( "This directory doesn't belong to WordPress core", "defender-security" );
|
60 |
} elseif ( $raw['type'] == 'modified' ) {
|
61 |
+
return esc_html__( "This WordPress core file appears modified", "defender-security" );
|
62 |
}
|
63 |
}
|
64 |
|
72 |
if ( $raw['type'] == 'unknown' ) {
|
73 |
$res = unlink( $raw['file'] );
|
74 |
if ( $res == false ) {
|
75 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file", "defender-security" ) );
|
76 |
}
|
77 |
$this->getOwner()->delete();
|
78 |
|
79 |
return true;
|
80 |
} elseif ( $raw['type'] == 'modified' ) {
|
81 |
+
return new \WP_Error( Error_Code::INVALID, __( "This file can't not remove", "defender-security" ) );
|
82 |
} elseif ( $raw['type'] == 'dir' ) {
|
83 |
$res = $this->deleteFolder( $raw['file'] );
|
84 |
if ( is_wp_error( $res ) ) {
|
98 |
$originSrc = $this->getOriginalSource();
|
99 |
$raw = $this->getRaw();
|
100 |
if ( $raw['type'] != 'modified' ) {
|
101 |
+
return new \WP_Error( Error_Code::INVALID, __( "This file is not resolvable", "defender-security" ) );
|
102 |
}
|
103 |
|
104 |
if ( ! is_writeable( $raw['file'] ) ) {
|
105 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE, sprintf( esc_html__( "It seems the %s file is currently using by another process or isn't writeable.", "defender-security" ), $raw['file'] ) );
|
106 |
}
|
107 |
|
108 |
file_put_contents( $raw['file'], $originSrc, LOCK_EX );
|
119 |
ob_start();
|
120 |
$raw = $this->getRaw();
|
121 |
?>
|
122 |
+
<dialog title="<?php esc_attr_e( "Issue Details", "defender-security" ) ?>"
|
123 |
id="dia_<?php echo $this->getOwner()->id ?>">
|
124 |
<div class="wpmud">
|
125 |
<div class="wp-defender">
|
129 |
<li>
|
130 |
<div>
|
131 |
<span class="list-label">
|
132 |
+
<strong><?php _e( "Location", "defender-security" ) ?></strong>
|
133 |
</span>
|
134 |
<span class="list-detail">
|
135 |
<?php echo $this->getSubtitle(); ?>
|
139 |
<li>
|
140 |
<div>
|
141 |
<span class="list-label">
|
142 |
+
<strong><?php _e( "Size", "defender-security" ) ?></strong>
|
143 |
</span>
|
144 |
<span class="list-detail">
|
145 |
<?php
|
156 |
<li>
|
157 |
<div>
|
158 |
<span class="list-label">
|
159 |
+
<strong><?php _e( "Date Added", "defender-security" ) ?></strong>
|
160 |
</span>
|
161 |
<span class="list-detail">
|
162 |
<?php
|
186 |
<?php wp_nonce_field( 'ignoreItem' ) ?>
|
187 |
<input type="hidden" name="id" value="<?php echo $this->getOwner()->id ?>"/>
|
188 |
<button type="submit" class="button button-secondary button-small">
|
189 |
+
<?php _e( "Ignore", "defender-security" ) ?></button>
|
190 |
</form>
|
191 |
<?php if ( $raw['type'] == 'unknown' || $raw['type'] == 'dir' ): ?>
|
192 |
<form method="post" class="scan-frm delete-item float-r">
|
194 |
<input type="hidden" name="id" value="<?php echo $this->getOwner()->id ?>"/>
|
195 |
<?php wp_nonce_field( 'deleteItem' ) ?>
|
196 |
<button type="button" class="button button-small delete-mitem button-grey">
|
197 |
+
<?php _e( "Delete", "defender-security" ) ?></button>
|
198 |
<div class="confirm-box wd-hide">
|
199 |
+
<?php _e( "This will permanent remove the file/folder with all content, do you want to do this?", "defender-security" ) ?>
|
200 |
|
201 |
<button type="submit" class="button button-small button-grey">
|
202 |
+
<?php _e( "Yes", "defender-security" ) ?>
|
203 |
</button>
|
204 |
<button type="button" class="button button-small button-secondary">
|
205 |
+
<?php _e( "No", "defender-security" ) ?>
|
206 |
</button>
|
207 |
</div>
|
208 |
</form>
|
212 |
<input type="hidden" name="action" value="resolveItem"/>
|
213 |
<?php wp_nonce_field( 'resolveItem' ) ?>
|
214 |
<button type="submit" class="button button-small">
|
215 |
+
<?php _e( "Restore to Original", "defender-security" ) ?>
|
216 |
</button>
|
217 |
</form>
|
218 |
<?php endif; ?>
|
261 |
private function _dialogContentForAdded() {
|
262 |
?>
|
263 |
<p class="line">
|
264 |
+
<?php _e( "A stray file has been found in your site directory, which your version of WordPress doesn't need. As far as we can tell, the file is harmless (and maybe even from an older WordPress install) so it's safe to ignore it. If you choose to delete the file, we recommend backing up your website beforehand", "defender-security" ) ?>
|
265 |
</p>
|
266 |
<?php
|
267 |
$ext = pathinfo( $this->getSubtitle(), PATHINFO_EXTENSION );
|
277 |
<div class="mline source-code">
|
278 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
279 |
height="18"/>
|
280 |
+
<?php _e( "Pulling source file...", "defender-security" ) ?>
|
281 |
<form method="post" class="float-l pull-src scan-frm">
|
282 |
<input type="hidden" name="action" value="pullSrcFile">
|
283 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
294 |
private function _dialogContentForModified() {
|
295 |
?>
|
296 |
<p class="line">
|
297 |
+
<?php _e( "Compare your file with the original file in the WordPress repository. Pieces highlighted in red will be removed when you patch the file, and pieces highlighted in green will be added.", "defender-security" ) ?>
|
298 |
</p>
|
299 |
<div class="mline source-code">
|
300 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
301 |
height="18"/>
|
302 |
+
<?php _e( "Pulling source file...", "defender-security" ) ?>
|
303 |
<form method="post" class="float-l pull-src scan-frm">
|
304 |
<input type="hidden" name="action" value="pullSrcFile">
|
305 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
316 |
private function _dialogContentForDir() {
|
317 |
?>
|
318 |
<p>
|
319 |
+
<?php _e( "We found this folder in your WordPress file list. Your current version of WordPress doesn’t use this folder so it might belong to another application. If you don’t recognize it, you can delete this folder (don’t forget to back up your website first!) or get in touch with the WPMU DEV support team for more information.", "defender-security" ) ?>
|
320 |
</p>
|
321 |
<div class="mline source-code">
|
322 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
323 |
height="18"/>
|
324 |
+
<?php _e( "Pulling source file...", "defender-security" ) ?>
|
325 |
<form method="post" class="float-l pull-src scan-frm">
|
326 |
<input type="hidden" name="action" value="pullSrcFile">
|
327 |
<?php wp_nonce_field( 'pullSrcFile' ) ?>
|
402 |
$res = @unlink( $file->getRealPath() );
|
403 |
}
|
404 |
if ( $res == false ) {
|
405 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file", "defender-security" ) );
|
406 |
}
|
407 |
}
|
408 |
$res = @rmdir( $dir );
|
409 |
if ( $res == false ) {
|
410 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE, __( "Defender doesn't have enough permission to remove this file", "defender-security" ) );
|
411 |
}
|
412 |
|
413 |
return true;
|
app/module/scan/behavior/scan.php
CHANGED
@@ -33,11 +33,11 @@ class Scan extends Behavior {
|
|
33 |
<div class="dev-box">
|
34 |
<div class="box-title">
|
35 |
<span class="span-icon icon-scan"></span>
|
36 |
-
<h3><?php _e( "FILE SCANNING",
|
37 |
<?php
|
38 |
if($this->countAll > 0):
|
39 |
?>
|
40 |
-
<span class="def-tag tag-error" tooltip="<?php printf(esc_attr__("You have %s suspicious file(s) needing attention",
|
41 |
<?php endif; ?>
|
42 |
</h3>
|
43 |
|
@@ -73,13 +73,13 @@ class Scan extends Behavior {
|
|
73 |
?>
|
74 |
<input type="hidden" name="action" value="startAScan"/>
|
75 |
<button type="submit"
|
76 |
-
class="button button-small"><?php _e( "RUN SCAN",
|
77 |
</form>
|
78 |
<?php
|
79 |
} elseif ( is_object( $activeScan ) && $activeScan->status != \WP_Defender\Module\Scan\Model\Scan::STATUS_ERROR ) {
|
80 |
?>
|
81 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
82 |
-
height="18"/> <?php _e( "Scanning…",
|
83 |
<?php
|
84 |
} elseif ( is_object( $activeScan ) && $activeScan->status == \WP_Defender\Module\Scan\Model\Scan::STATUS_ERROR ) {
|
85 |
echo $this->activeScan->statusText;
|
@@ -103,14 +103,14 @@ class Scan extends Behavior {
|
|
103 |
ob_start();
|
104 |
?>
|
105 |
<div class="line">
|
106 |
-
<?php _e( "Scan your website for file changes, vulnerabilities and injected code, and get notifications about anything suspicious.",
|
107 |
</div>
|
108 |
<?php
|
109 |
if ( $this->countAll == 0 ) {
|
110 |
?>
|
111 |
<div class="well well-green with-cap mline">
|
112 |
<i class="def-icon icon-tick"></i>
|
113 |
-
<?php _e( "Your code is clean, the skies are clear.",
|
114 |
</div>
|
115 |
<?php
|
116 |
} else {
|
@@ -119,7 +119,7 @@ class Scan extends Behavior {
|
|
119 |
<ul class="dev-list bold end">
|
120 |
<li>
|
121 |
<div>
|
122 |
-
<span class="list-label"><?php _e( "WordPress Core",
|
123 |
<span class="list-detail">
|
124 |
<?php echo $model->getCount( 'core' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'core' ) . '</span>' ?>
|
125 |
</span>
|
@@ -127,14 +127,14 @@ class Scan extends Behavior {
|
|
127 |
</li>
|
128 |
<li>
|
129 |
<div>
|
130 |
-
<span class="list-label"><?php _e( "Plugins & Themes",
|
131 |
<span class="list-detail">
|
132 |
<?php if ( Utils::instance()->getAPIKey() ): ?>
|
133 |
<?php echo $model->getCount( 'vuln' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'vuln' ) . '</span>' ?>
|
134 |
<?php else: ?>
|
135 |
<a href="#pro-feature" rel="dialog" class="button button-pre button-small"
|
136 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
137 |
-
<?php _e( "Pro Feature",
|
138 |
</a>
|
139 |
<?php endif; ?>
|
140 |
</span>
|
@@ -142,14 +142,14 @@ class Scan extends Behavior {
|
|
142 |
</li>
|
143 |
<li>
|
144 |
<div>
|
145 |
-
<span class="list-label"><?php _e( "Suspicious Code",
|
146 |
<span class="list-detail">
|
147 |
<?php if ( Utils::instance()->getAPIKey() ): ?>
|
148 |
<?php echo $model->getCount( 'content' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'content' ) . '</span>' ?>
|
149 |
<?php else: ?>
|
150 |
<a href="#pro-feature" rel="dialog" class="button button-pre button-small"
|
151 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
152 |
-
<?php _e( "Pro Feature",
|
153 |
</a>
|
154 |
<?php endif; ?>
|
155 |
</span>
|
@@ -162,7 +162,7 @@ class Scan extends Behavior {
|
|
162 |
<div class="row">
|
163 |
<div class="col-third tl">
|
164 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"
|
165 |
-
class="button button-small button-secondary"><?php _e( "VIEW REPORT",
|
166 |
</div>
|
167 |
<div class="col-two-third tr">
|
168 |
<?php if ( wp_defender()->isFree == false ): ?>
|
@@ -171,13 +171,13 @@ class Scan extends Behavior {
|
|
171 |
if ( !empty( Settings::instance()->notification ) ) {
|
172 |
switch ( Settings::instance()->frequency ) {
|
173 |
case '1':
|
174 |
-
_e( "Automatic scans are running daily",
|
175 |
break;
|
176 |
case '7':
|
177 |
-
_e( "Automatic scans are running weekly",
|
178 |
break;
|
179 |
case '30':
|
180 |
-
_e( "Automatic scans are running monthly",
|
181 |
break;
|
182 |
}
|
183 |
}
|
@@ -196,14 +196,14 @@ class Scan extends Behavior {
|
|
196 |
?>
|
197 |
<div class="line">
|
198 |
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and
|
199 |
-
get notified about anything suspicious.",
|
200 |
</div>
|
201 |
<form id="start-a-scan" method="post" class="scan-frm">
|
202 |
<?php
|
203 |
wp_nonce_field( 'startAScan' );
|
204 |
?>
|
205 |
<input type="hidden" name="action" value="startAScan"/>
|
206 |
-
<button type="submit" class="button button-small"><?php _e( "RUN SCAN",
|
207 |
</form>
|
208 |
<?php
|
209 |
return ob_get_clean();
|
@@ -215,7 +215,7 @@ class Scan extends Behavior {
|
|
215 |
?>
|
216 |
<div class="wdf-scanning"></div>
|
217 |
<div class="line">
|
218 |
-
<?php _e( "Defender is scanning your files for malicious code. This will take a few minutes depending on the size of your website.",
|
219 |
</div>
|
220 |
<div class="well mline">
|
221 |
<div class="scan-progress">
|
33 |
<div class="dev-box">
|
34 |
<div class="box-title">
|
35 |
<span class="span-icon icon-scan"></span>
|
36 |
+
<h3><?php _e( "FILE SCANNING", "defender-security" ) ?>
|
37 |
<?php
|
38 |
if($this->countAll > 0):
|
39 |
?>
|
40 |
+
<span class="def-tag tag-error" tooltip="<?php printf(esc_attr__("You have %s suspicious file(s) needing attention","defender-security"),$this->countAll) ?>"><?php echo $this->countAll ?></span>
|
41 |
<?php endif; ?>
|
42 |
</h3>
|
43 |
|
73 |
?>
|
74 |
<input type="hidden" name="action" value="startAScan"/>
|
75 |
<button type="submit"
|
76 |
+
class="button button-small"><?php _e( "RUN SCAN", "defender-security" ) ?></button>
|
77 |
</form>
|
78 |
<?php
|
79 |
} elseif ( is_object( $activeScan ) && $activeScan->status != \WP_Defender\Module\Scan\Model\Scan::STATUS_ERROR ) {
|
80 |
?>
|
81 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/loading.gif" width="18"
|
82 |
+
height="18"/> <?php _e( "Scanning…", "defender-security" ) ?>
|
83 |
<?php
|
84 |
} elseif ( is_object( $activeScan ) && $activeScan->status == \WP_Defender\Module\Scan\Model\Scan::STATUS_ERROR ) {
|
85 |
echo $this->activeScan->statusText;
|
103 |
ob_start();
|
104 |
?>
|
105 |
<div class="line">
|
106 |
+
<?php _e( "Scan your website for file changes, vulnerabilities and injected code, and get notifications about anything suspicious.", "defender-security" ) ?>
|
107 |
</div>
|
108 |
<?php
|
109 |
if ( $this->countAll == 0 ) {
|
110 |
?>
|
111 |
<div class="well well-green with-cap mline">
|
112 |
<i class="def-icon icon-tick"></i>
|
113 |
+
<?php _e( "Your code is clean, the skies are clear.", "defender-security" ) ?>
|
114 |
</div>
|
115 |
<?php
|
116 |
} else {
|
119 |
<ul class="dev-list bold end">
|
120 |
<li>
|
121 |
<div>
|
122 |
+
<span class="list-label"><?php _e( "WordPress Core", "defender-security" ) ?></span>
|
123 |
<span class="list-detail">
|
124 |
<?php echo $model->getCount( 'core' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'core' ) . '</span>' ?>
|
125 |
</span>
|
127 |
</li>
|
128 |
<li>
|
129 |
<div>
|
130 |
+
<span class="list-label"><?php _e( "Plugins & Themes", "defender-security" ) ?></span>
|
131 |
<span class="list-detail">
|
132 |
<?php if ( Utils::instance()->getAPIKey() ): ?>
|
133 |
<?php echo $model->getCount( 'vuln' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'vuln' ) . '</span>' ?>
|
134 |
<?php else: ?>
|
135 |
<a href="#pro-feature" rel="dialog" class="button button-pre button-small"
|
136 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>">
|
137 |
+
<?php _e( "Pro Feature", "defender-security" ) ?>
|
138 |
</a>
|
139 |
<?php endif; ?>
|
140 |
</span>
|
142 |
</li>
|
143 |
<li>
|
144 |
<div>
|
145 |
+
<span class="list-label"><?php _e( "Suspicious Code", "defender-security" ) ?></span>
|
146 |
<span class="list-detail">
|
147 |
<?php if ( Utils::instance()->getAPIKey() ): ?>
|
148 |
<?php echo $model->getCount( 'content' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'content' ) . '</span>' ?>
|
149 |
<?php else: ?>
|
150 |
<a href="#pro-feature" rel="dialog" class="button button-pre button-small"
|
151 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>">
|
152 |
+
<?php _e( "Pro Feature", "defender-security" ) ?>
|
153 |
</a>
|
154 |
<?php endif; ?>
|
155 |
</span>
|
162 |
<div class="row">
|
163 |
<div class="col-third tl">
|
164 |
<a href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"
|
165 |
+
class="button button-small button-secondary"><?php _e( "VIEW REPORT", "defender-security" ) ?></a>
|
166 |
</div>
|
167 |
<div class="col-two-third tr">
|
168 |
<?php if ( wp_defender()->isFree == false ): ?>
|
171 |
if ( !empty( Settings::instance()->notification ) ) {
|
172 |
switch ( Settings::instance()->frequency ) {
|
173 |
case '1':
|
174 |
+
_e( "Automatic scans are running daily", "defender-security" );
|
175 |
break;
|
176 |
case '7':
|
177 |
+
_e( "Automatic scans are running weekly", "defender-security" );
|
178 |
break;
|
179 |
case '30':
|
180 |
+
_e( "Automatic scans are running monthly", "defender-security" );
|
181 |
break;
|
182 |
}
|
183 |
}
|
196 |
?>
|
197 |
<div class="line">
|
198 |
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and
|
199 |
+
get notified about anything suspicious.", "defender-security" ) ?>
|
200 |
</div>
|
201 |
<form id="start-a-scan" method="post" class="scan-frm">
|
202 |
<?php
|
203 |
wp_nonce_field( 'startAScan' );
|
204 |
?>
|
205 |
<input type="hidden" name="action" value="startAScan"/>
|
206 |
+
<button type="submit" class="button button-small"><?php _e( "RUN SCAN", "defender-security" ) ?></button>
|
207 |
</form>
|
208 |
<?php
|
209 |
return ob_get_clean();
|
215 |
?>
|
216 |
<div class="wdf-scanning"></div>
|
217 |
<div class="line">
|
218 |
+
<?php _e( "Defender is scanning your files for malicious code. This will take a few minutes depending on the size of your website.", "defender-security" ) ?>
|
219 |
</div>
|
220 |
<div class="well mline">
|
221 |
<div class="scan-progress">
|
app/module/scan/component/result-table.php
CHANGED
@@ -31,23 +31,23 @@ class Result_Table extends \WP_List_Table {
|
|
31 |
default:
|
32 |
$columns = array(
|
33 |
'col_bulk' => '<input id="apply-all" type="checkbox"/>',
|
34 |
-
'col_file' => esc_html__( 'Suspicious File',
|
35 |
-
'col_issue' => esc_html__( 'Issue',
|
36 |
'col_action' => '',
|
37 |
);
|
38 |
break;
|
39 |
case Result_Item::STATUS_IGNORED:
|
40 |
$columns = array(
|
41 |
'col_bulk' => '<input id="apply-all" type="checkbox"/>',
|
42 |
-
'col_file' => esc_html__( 'File Name',
|
43 |
-
'col_ignore_date' => esc_html__( 'Date Ignored',
|
44 |
'col_ignored_action' => '',
|
45 |
);
|
46 |
break;
|
47 |
case Result_Item::STATUS_FIXED:
|
48 |
$columns = array(
|
49 |
-
'col_file' => esc_html__( 'File Name',
|
50 |
-
'col_fixed_date' => esc_html__( 'Date Cleaned',
|
51 |
);
|
52 |
break;
|
53 |
}
|
@@ -89,7 +89,7 @@ class Result_Table extends \WP_List_Table {
|
|
89 |
<input type="hidden" name="action" value="unIgnoreItem"/>
|
90 |
<input type="hidden" name="id" value="<?php echo $item->id ?>"/>
|
91 |
<?php wp_nonce_field( 'unIgnoreItem' ) ?>
|
92 |
-
<button type="submit" tooltip="<?php esc_attr_e( "Restore File",
|
93 |
class="button button-small">
|
94 |
<i class="wdv-icon wdv-icon-fw wdv-icon-refresh" aria-hidden="true"></i>
|
95 |
</button>
|
@@ -151,7 +151,7 @@ class Result_Table extends \WP_List_Table {
|
|
151 |
public function column_col_action( Result_Item $item ) {
|
152 |
$content = $item->renderDialog();
|
153 |
|
154 |
-
$content .= '<a href="#dia_' . $item->id . '" rel="dialog" role="button" tooltip="' . esc_attr__( "Fix Issue",
|
155 |
<img src="' . wp_defender()->getPluginUrl() . 'assets/img/icon-fix.svg">
|
156 |
</a>';
|
157 |
|
@@ -196,19 +196,19 @@ class Result_Table extends \WP_List_Table {
|
|
196 |
<?php wp_nonce_field( 'scanBulkAction' ) ?>
|
197 |
<select name="bulk" class="bulk-action">
|
198 |
<?php if ( $this->type != Result_Item::STATUS_IGNORED ): ?>
|
199 |
-
<option value="ignore"><?php _e( "Ignore",
|
200 |
-
<!-- <option value="resolve">--><?php //_e( "Resolve",
|
201 |
-
<!-- <option value="delete">--><?php //_e( "Delete",
|
202 |
<?php endif; ?>
|
203 |
<?php if ( $this->type == Result_Item::STATUS_IGNORED ): ?>
|
204 |
-
<option value="unignore"><?php _e( "Restore",
|
205 |
<?php endif; ?>
|
206 |
</select>
|
207 |
-
<button class="button button-grey"><?php _e( "Apply",
|
208 |
</form>
|
209 |
</div>
|
210 |
<div class="nav">
|
211 |
-
<span><?php printf( __( "%s Results",
|
212 |
<div class="button-group is-hidden-mobile">
|
213 |
<?php $this->pagination( 'top' ) ?>
|
214 |
</div>
|
31 |
default:
|
32 |
$columns = array(
|
33 |
'col_bulk' => '<input id="apply-all" type="checkbox"/>',
|
34 |
+
'col_file' => esc_html__( 'Suspicious File', "defender-security" ),
|
35 |
+
'col_issue' => esc_html__( 'Issue', "defender-security" ),
|
36 |
'col_action' => '',
|
37 |
);
|
38 |
break;
|
39 |
case Result_Item::STATUS_IGNORED:
|
40 |
$columns = array(
|
41 |
'col_bulk' => '<input id="apply-all" type="checkbox"/>',
|
42 |
+
'col_file' => esc_html__( 'File Name', "defender-security" ),
|
43 |
+
'col_ignore_date' => esc_html__( 'Date Ignored', "defender-security" ),
|
44 |
'col_ignored_action' => '',
|
45 |
);
|
46 |
break;
|
47 |
case Result_Item::STATUS_FIXED:
|
48 |
$columns = array(
|
49 |
+
'col_file' => esc_html__( 'File Name', "defender-security" ),
|
50 |
+
'col_fixed_date' => esc_html__( 'Date Cleaned', "defender-security" ),
|
51 |
);
|
52 |
break;
|
53 |
}
|
89 |
<input type="hidden" name="action" value="unIgnoreItem"/>
|
90 |
<input type="hidden" name="id" value="<?php echo $item->id ?>"/>
|
91 |
<?php wp_nonce_field( 'unIgnoreItem' ) ?>
|
92 |
+
<button type="submit" tooltip="<?php esc_attr_e( "Restore File", "defender-security" ) ?>"
|
93 |
class="button button-small">
|
94 |
<i class="wdv-icon wdv-icon-fw wdv-icon-refresh" aria-hidden="true"></i>
|
95 |
</button>
|
151 |
public function column_col_action( Result_Item $item ) {
|
152 |
$content = $item->renderDialog();
|
153 |
|
154 |
+
$content .= '<a href="#dia_' . $item->id . '" rel="dialog" role="button" tooltip="' . esc_attr__( "Fix Issue", "defender-security" ) . '" class="fix">
|
155 |
<img src="' . wp_defender()->getPluginUrl() . 'assets/img/icon-fix.svg">
|
156 |
</a>';
|
157 |
|
196 |
<?php wp_nonce_field( 'scanBulkAction' ) ?>
|
197 |
<select name="bulk" class="bulk-action">
|
198 |
<?php if ( $this->type != Result_Item::STATUS_IGNORED ): ?>
|
199 |
+
<option value="ignore"><?php _e( "Ignore", "defender-security" ) ?></option>
|
200 |
+
<!-- <option value="resolve">--><?php //_e( "Resolve", "defender-security" ) ?><!--</option>-->
|
201 |
+
<!-- <option value="delete">--><?php //_e( "Delete", "defender-security" ) ?><!--</option>-->
|
202 |
<?php endif; ?>
|
203 |
<?php if ( $this->type == Result_Item::STATUS_IGNORED ): ?>
|
204 |
+
<option value="unignore"><?php _e( "Restore", "defender-security" ) ?></option>
|
205 |
<?php endif; ?>
|
206 |
</select>
|
207 |
+
<button class="button button-grey"><?php _e( "Apply", "defender-security" ) ?></button>
|
208 |
</form>
|
209 |
</div>
|
210 |
<div class="nav">
|
211 |
+
<span><?php printf( __( "%s Results", "defender-security" ), $this->_pagination_args['total_items'] ) ?></span>
|
212 |
<div class="button-group is-hidden-mobile">
|
213 |
<?php $this->pagination( 'top' ) ?>
|
214 |
</div>
|
app/module/scan/component/scan-api.php
CHANGED
@@ -34,12 +34,12 @@ class Scan_Api extends Component {
|
|
34 |
|
35 |
$model = new Scan();
|
36 |
$model->status = Scan::STATUS_INIT;
|
37 |
-
$model->statusText = __( "Initializing...",
|
38 |
$model->save();
|
39 |
|
40 |
return $model;
|
41 |
} else {
|
42 |
-
return new \WP_Error( Error_Code::INVALID, __( "A scan is already in progress",
|
43 |
}
|
44 |
}
|
45 |
|
@@ -189,7 +189,7 @@ class Scan_Api extends Component {
|
|
189 |
$model = self::getActiveScan();
|
190 |
$start = microtime( true );
|
191 |
if ( ! is_object( $model ) ) {
|
192 |
-
return new \WP_Error( Error_Code::INVALID, __( "No scan record exists",
|
193 |
}
|
194 |
|
195 |
if ( $model->status == Scan::STATUS_ERROR ) {
|
@@ -229,13 +229,13 @@ class Scan_Api extends Component {
|
|
229 |
//this is newly, we will update the status text here
|
230 |
switch ( $step ) {
|
231 |
case 'core':
|
232 |
-
$model->statusText = __( "Analyzing WordPress Core...",
|
233 |
break;
|
234 |
case 'content':
|
235 |
-
$model->statusText = __( "Analyzing WordPress Content...",
|
236 |
break;
|
237 |
case 'vuln':
|
238 |
-
$model->statusText = __( "Checking for any published vulnerabilities your plugins & themes...",
|
239 |
break;
|
240 |
}
|
241 |
$model->save();
|
34 |
|
35 |
$model = new Scan();
|
36 |
$model->status = Scan::STATUS_INIT;
|
37 |
+
$model->statusText = __( "Initializing...", "defender-security" );
|
38 |
$model->save();
|
39 |
|
40 |
return $model;
|
41 |
} else {
|
42 |
+
return new \WP_Error( Error_Code::INVALID, __( "A scan is already in progress", "defender-security" ) );
|
43 |
}
|
44 |
}
|
45 |
|
189 |
$model = self::getActiveScan();
|
190 |
$start = microtime( true );
|
191 |
if ( ! is_object( $model ) ) {
|
192 |
+
return new \WP_Error( Error_Code::INVALID, __( "No scan record exists", "defender-security" ) );
|
193 |
}
|
194 |
|
195 |
if ( $model->status == Scan::STATUS_ERROR ) {
|
229 |
//this is newly, we will update the status text here
|
230 |
switch ( $step ) {
|
231 |
case 'core':
|
232 |
+
$model->statusText = __( "Analyzing WordPress Core...", "defender-security" );
|
233 |
break;
|
234 |
case 'content':
|
235 |
+
$model->statusText = __( "Analyzing WordPress Content...", "defender-security" );
|
236 |
break;
|
237 |
case 'vuln':
|
238 |
+
$model->statusText = __( "Checking for any published vulnerabilities your plugins & themes...", "defender-security" );
|
239 |
break;
|
240 |
}
|
241 |
$model->save();
|
app/module/scan/controller/main.php
CHANGED
@@ -178,7 +178,7 @@ class Main extends \WP_Defender\Controller {
|
|
178 |
'message' => _n( "The suspicious file has been successfully ignored.",
|
179 |
"The suspicious files have been successfully ignored.",
|
180 |
count( $items ),
|
181 |
-
|
182 |
) );
|
183 |
break;
|
184 |
case 'unignore':
|
@@ -193,7 +193,7 @@ class Main extends \WP_Defender\Controller {
|
|
193 |
'message' => _n( "The suspicious file has been successfully restored.",
|
194 |
"The suspicious files have been successfully restored.",
|
195 |
count( $items ),
|
196 |
-
|
197 |
) );
|
198 |
break;
|
199 |
case 'delete':
|
@@ -211,11 +211,11 @@ class Main extends \WP_Defender\Controller {
|
|
211 |
wp_send_json_success( array(
|
212 |
'message' => _n( "The suspicious files has been successfully deleted.",
|
213 |
"The suspicious files have been successfully deleted.",
|
214 |
-
count( $items ),
|
215 |
) );
|
216 |
} else {
|
217 |
wp_send_json_error( array(
|
218 |
-
'message' => __( "No item has been deleted",
|
219 |
) );
|
220 |
}
|
221 |
break;
|
@@ -234,11 +234,11 @@ class Main extends \WP_Defender\Controller {
|
|
234 |
wp_send_json_success( array(
|
235 |
'message' => _n( "The suspicious files has been successfully resolved.",
|
236 |
"The suspicious files have been successfully resolved.",
|
237 |
-
count( $items ),
|
238 |
) );
|
239 |
} else {
|
240 |
wp_send_json_error( array(
|
241 |
-
'message' => __( "No item has been resolved",
|
242 |
) );
|
243 |
}
|
244 |
break;
|
@@ -302,7 +302,7 @@ class Main extends \WP_Defender\Controller {
|
|
302 |
$this->scheduleReportTime( $settings );
|
303 |
}
|
304 |
wp_send_json_success( array(
|
305 |
-
'message' => __( "Your settings have been updated.",
|
306 |
) );
|
307 |
}
|
308 |
|
@@ -332,11 +332,11 @@ class Main extends \WP_Defender\Controller {
|
|
332 |
$this->submitStatsToDev();
|
333 |
wp_send_json_success( array(
|
334 |
'mid' => 'mid-' . $model->id,
|
335 |
-
'message' => __( "This item has been resolved.",
|
336 |
) );
|
337 |
} elseif ( $ret === false ) {
|
338 |
wp_send_json_error( array(
|
339 |
-
'message' => __( "Please try again!",
|
340 |
) );
|
341 |
} elseif ( is_string( $ret ) ) {
|
342 |
$this->submitStatsToDev();
|
@@ -347,7 +347,7 @@ class Main extends \WP_Defender\Controller {
|
|
347 |
}
|
348 |
} else {
|
349 |
wp_send_json_error( array(
|
350 |
-
'message' => __( "The item doesn't exist!",
|
351 |
) );
|
352 |
}
|
353 |
}
|
@@ -377,13 +377,13 @@ class Main extends \WP_Defender\Controller {
|
|
377 |
} else {
|
378 |
wp_send_json_success( array(
|
379 |
'mid' => 'mid-' . $model->id,
|
380 |
-
'message' => __( "This item has been permanent removed.",
|
381 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
382 |
) );
|
383 |
}
|
384 |
} else {
|
385 |
wp_send_json_error( array(
|
386 |
-
'message' => __( "The item doesn't exist!",
|
387 |
) );
|
388 |
}
|
389 |
}
|
@@ -407,12 +407,12 @@ class Main extends \WP_Defender\Controller {
|
|
407 |
$this->submitStatsToDev();
|
408 |
wp_send_json_success( array(
|
409 |
'mid' => 'mid-' . $model->id,
|
410 |
-
'message' => __( "The suspicious file has been successfully restored.",
|
411 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
412 |
) );
|
413 |
} else {
|
414 |
wp_send_json_error( array(
|
415 |
-
'message' => __( "The item doesn't exist!",
|
416 |
) );
|
417 |
}
|
418 |
}
|
@@ -436,12 +436,12 @@ class Main extends \WP_Defender\Controller {
|
|
436 |
$this->submitStatsToDev();
|
437 |
wp_send_json_success( array(
|
438 |
'mid' => 'mid-' . $model->id,
|
439 |
-
'message' => __( "The suspicious file has been successfully ignored.",
|
440 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
441 |
) );
|
442 |
} else {
|
443 |
wp_send_json_error( array(
|
444 |
-
'message' => __( "The item doesn't exist!",
|
445 |
) );
|
446 |
}
|
447 |
}
|
@@ -475,7 +475,7 @@ class Main extends \WP_Defender\Controller {
|
|
475 |
//from dashboard
|
476 |
$data['url'] = network_admin_url( 'admin.php?page=wp-defender' );
|
477 |
}
|
478 |
-
$this->sendEmailReport();
|
479 |
$this->submitStatsToDev();
|
480 |
wp_send_json_success( $data );
|
481 |
} else {
|
@@ -516,7 +516,7 @@ class Main extends \WP_Defender\Controller {
|
|
516 |
*/
|
517 |
public function adminMenu() {
|
518 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
519 |
-
add_submenu_page( 'wp-defender', esc_html__( "File Scanning",
|
520 |
&$this,
|
521 |
'actionIndex'
|
522 |
) );
|
@@ -527,8 +527,8 @@ class Main extends \WP_Defender\Controller {
|
|
527 |
*/
|
528 |
public function scripts() {
|
529 |
$data = array(
|
530 |
-
'scanning_title' => __( "Scan In Progress",
|
531 |
-
'no_issues' => __( "Your code is currently clean! There were no issues found during the last scan, though you can always perform a new scan anytime.",
|
532 |
);
|
533 |
if ( $this->isInPage() ) {
|
534 |
\WDEV_Plugin_Ui::load( wp_defender()->getPluginUrl() . 'shared-ui/' );
|
@@ -718,9 +718,9 @@ class Main extends \WP_Defender\Controller {
|
|
718 |
return null;
|
719 |
}
|
720 |
|
721 |
-
public function sendEmailReport() {
|
722 |
$settings = Settings::instance();
|
723 |
-
if ( $settings->notification == false ) {
|
724 |
return false;
|
725 |
}
|
726 |
|
@@ -777,6 +777,7 @@ class Main extends \WP_Defender\Controller {
|
|
777 |
'message' => $email_content
|
778 |
), false );
|
779 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
|
|
780 |
$headers = array(
|
781 |
'From: Defender <' . $no_reply_email . '>',
|
782 |
'Content-Type: text/html; charset=UTF-8'
|
@@ -802,9 +803,9 @@ class Main extends \WP_Defender\Controller {
|
|
802 |
<thead class="results-list-header" style="border-bottom: 2px solid #ff5c28;">
|
803 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
804 |
<th class="result-list-label-title"
|
805 |
-
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left; width: 35%;"><?php esc_html_e( "File",
|
806 |
<th class="result-list-data-title"
|
807 |
-
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left;"><?php esc_html_e( "Issue",
|
808 |
</tr>
|
809 |
</thead>
|
810 |
<tbody class="results-list-content">
|
@@ -838,7 +839,7 @@ class Main extends \WP_Defender\Controller {
|
|
838 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 10px 0 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
839 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
840 |
<a class="plugin-brand" href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"
|
841 |
-
style="Margin: 0; color: #ff5c28; display: inline-block; font: inherit; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;"><?php esc_html_e( "Let’s get your site patched up.",
|
842 |
<img class="icon-arrow-right"
|
843 |
src="<?php echo wp_defender()->getPluginUrl() ?>assets/email-images/icon-arrow-right-defender.png"
|
844 |
alt="Arrow"
|
178 |
'message' => _n( "The suspicious file has been successfully ignored.",
|
179 |
"The suspicious files have been successfully ignored.",
|
180 |
count( $items ),
|
181 |
+
"defender-security" )
|
182 |
) );
|
183 |
break;
|
184 |
case 'unignore':
|
193 |
'message' => _n( "The suspicious file has been successfully restored.",
|
194 |
"The suspicious files have been successfully restored.",
|
195 |
count( $items ),
|
196 |
+
"defender-security" )
|
197 |
) );
|
198 |
break;
|
199 |
case 'delete':
|
211 |
wp_send_json_success( array(
|
212 |
'message' => _n( "The suspicious files has been successfully deleted.",
|
213 |
"The suspicious files have been successfully deleted.",
|
214 |
+
count( $items ), "defender-security" )
|
215 |
) );
|
216 |
} else {
|
217 |
wp_send_json_error( array(
|
218 |
+
'message' => __( "No item has been deleted", "defender-security" )
|
219 |
) );
|
220 |
}
|
221 |
break;
|
234 |
wp_send_json_success( array(
|
235 |
'message' => _n( "The suspicious files has been successfully resolved.",
|
236 |
"The suspicious files have been successfully resolved.",
|
237 |
+
count( $items ), "defender-security" )
|
238 |
) );
|
239 |
} else {
|
240 |
wp_send_json_error( array(
|
241 |
+
'message' => __( "No item has been resolved", "defender-security" )
|
242 |
) );
|
243 |
}
|
244 |
break;
|
302 |
$this->scheduleReportTime( $settings );
|
303 |
}
|
304 |
wp_send_json_success( array(
|
305 |
+
'message' => __( "Your settings have been updated.", "defender-security" )
|
306 |
) );
|
307 |
}
|
308 |
|
332 |
$this->submitStatsToDev();
|
333 |
wp_send_json_success( array(
|
334 |
'mid' => 'mid-' . $model->id,
|
335 |
+
'message' => __( "This item has been resolved.", "defender-security" )
|
336 |
) );
|
337 |
} elseif ( $ret === false ) {
|
338 |
wp_send_json_error( array(
|
339 |
+
'message' => __( "Please try again!", "defender-security" )
|
340 |
) );
|
341 |
} elseif ( is_string( $ret ) ) {
|
342 |
$this->submitStatsToDev();
|
347 |
}
|
348 |
} else {
|
349 |
wp_send_json_error( array(
|
350 |
+
'message' => __( "The item doesn't exist!", "defender-security" )
|
351 |
) );
|
352 |
}
|
353 |
}
|
377 |
} else {
|
378 |
wp_send_json_success( array(
|
379 |
'mid' => 'mid-' . $model->id,
|
380 |
+
'message' => __( "This item has been permanent removed.", "defender-security" ),
|
381 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
382 |
) );
|
383 |
}
|
384 |
} else {
|
385 |
wp_send_json_error( array(
|
386 |
+
'message' => __( "The item doesn't exist!", "defender-security" )
|
387 |
) );
|
388 |
}
|
389 |
}
|
407 |
$this->submitStatsToDev();
|
408 |
wp_send_json_success( array(
|
409 |
'mid' => 'mid-' . $model->id,
|
410 |
+
'message' => __( "The suspicious file has been successfully restored.", "defender-security" ),
|
411 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
412 |
) );
|
413 |
} else {
|
414 |
wp_send_json_error( array(
|
415 |
+
'message' => __( "The item doesn't exist!", "defender-security" )
|
416 |
) );
|
417 |
}
|
418 |
}
|
436 |
$this->submitStatsToDev();
|
437 |
wp_send_json_success( array(
|
438 |
'mid' => 'mid-' . $model->id,
|
439 |
+
'message' => __( "The suspicious file has been successfully ignored.", "defender-security" ),
|
440 |
'counts' => $this->getIssuesAndIgnoredCounts( $model->parentId )
|
441 |
) );
|
442 |
} else {
|
443 |
wp_send_json_error( array(
|
444 |
+
'message' => __( "The item doesn't exist!", "defender-security" )
|
445 |
) );
|
446 |
}
|
447 |
}
|
475 |
//from dashboard
|
476 |
$data['url'] = network_admin_url( 'admin.php?page=wp-defender' );
|
477 |
}
|
478 |
+
$this->sendEmailReport( true );
|
479 |
$this->submitStatsToDev();
|
480 |
wp_send_json_success( $data );
|
481 |
} else {
|
516 |
*/
|
517 |
public function adminMenu() {
|
518 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
519 |
+
add_submenu_page( 'wp-defender', esc_html__( "File Scanning", "defender-security" ), esc_html__( "File Scanning", "defender-security" ), $cap, $this->slug, array(
|
520 |
&$this,
|
521 |
'actionIndex'
|
522 |
) );
|
527 |
*/
|
528 |
public function scripts() {
|
529 |
$data = array(
|
530 |
+
'scanning_title' => __( "Scan In Progress", "defender-security" ) . '<form class="scan-frm float-r"><input type="hidden" name="action" value="cancelScan"/>' . wp_nonce_field( 'cancelScan', '_wpnonce', true, false ) . '<button type="submit" class="button button-small button-secondary">' . __( "Cancel", "defender-security" ) . '</button></form>',
|
531 |
+
'no_issues' => __( "Your code is currently clean! There were no issues found during the last scan, though you can always perform a new scan anytime.", "defender-security" )
|
532 |
);
|
533 |
if ( $this->isInPage() ) {
|
534 |
\WDEV_Plugin_Ui::load( wp_defender()->getPluginUrl() . 'shared-ui/' );
|
718 |
return null;
|
719 |
}
|
720 |
|
721 |
+
public function sendEmailReport( $force = false ) {
|
722 |
$settings = Settings::instance();
|
723 |
+
if ( $settings->notification == false && $force != true ) {
|
724 |
return false;
|
725 |
}
|
726 |
|
777 |
'message' => $email_content
|
778 |
), false );
|
779 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
780 |
+
$no_reply_email = apply_filters( 'wd_scan_noreply_email', $no_reply_email );
|
781 |
$headers = array(
|
782 |
'From: Defender <' . $no_reply_email . '>',
|
783 |
'Content-Type: text/html; charset=UTF-8'
|
803 |
<thead class="results-list-header" style="border-bottom: 2px solid #ff5c28;">
|
804 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
805 |
<th class="result-list-label-title"
|
806 |
+
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left; width: 35%;"><?php esc_html_e( "File", "defender-security" ) ?></th>
|
807 |
<th class="result-list-data-title"
|
808 |
+
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left;"><?php esc_html_e( "Issue", "defender-security" ) ?></th>
|
809 |
</tr>
|
810 |
</thead>
|
811 |
<tbody class="results-list-content">
|
839 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 10px 0 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
840 |
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
841 |
<a class="plugin-brand" href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"
|
842 |
+
style="Margin: 0; color: #ff5c28; display: inline-block; font: inherit; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;"><?php esc_html_e( "Let’s get your site patched up.", "defender-security" ) ?>
|
843 |
<img class="icon-arrow-right"
|
844 |
src="<?php echo wp_defender()->getPluginUrl() ?>assets/email-images/icon-arrow-right-defender.png"
|
845 |
alt="Arrow"
|
app/module/scan/model/settings.php
CHANGED
@@ -102,7 +102,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
102 |
}
|
103 |
|
104 |
public function __construct( $id, $is_multi ) {
|
105 |
-
$this->email_subject = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.',
|
106 |
$this->email_has_issue = __( 'Hi {USER_NAME},
|
107 |
|
108 |
WP Defender here, reporting back from the front.
|
@@ -112,7 +112,7 @@ I\'ve finished scanning {SITE_URL} for vulnerabilities and I found {ISSUES_COUNT
|
|
112 |
|
113 |
Stay Safe,
|
114 |
WP Defender
|
115 |
-
Official WPMU DEV Superhero',
|
116 |
$this->email_all_ok = __( 'Hi {USER_NAME},
|
117 |
|
118 |
WP Defender here, reporting back from the front.
|
@@ -123,7 +123,7 @@ Keep up the good work! With regular security scans and a well-hardened installat
|
|
123 |
|
124 |
Stay safe,
|
125 |
WP Defender
|
126 |
-
Official WPMU DEV Superhero',
|
127 |
//call parent to load stored
|
128 |
if ( is_admin() || is_network_admin() && current_user_can( 'manage_options' ) ) {
|
129 |
$this->receipts[] = get_current_user_id();
|
102 |
}
|
103 |
|
104 |
public function __construct( $id, $is_multi ) {
|
105 |
+
$this->email_subject = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.', "defender-security" );
|
106 |
$this->email_has_issue = __( 'Hi {USER_NAME},
|
107 |
|
108 |
WP Defender here, reporting back from the front.
|
112 |
|
113 |
Stay Safe,
|
114 |
WP Defender
|
115 |
+
Official WPMU DEV Superhero', "defender-security" );
|
116 |
$this->email_all_ok = __( 'Hi {USER_NAME},
|
117 |
|
118 |
WP Defender here, reporting back from the front.
|
123 |
|
124 |
Stay safe,
|
125 |
WP Defender
|
126 |
+
Official WPMU DEV Superhero', "defender-security" );
|
127 |
//call parent to load stored
|
128 |
if ( is_admin() || is_network_admin() && current_user_can( 'manage_options' ) ) {
|
129 |
$this->receipts[] = get_current_user_id();
|
app/module/scan/view/automation-free.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<div class="dev-box report-sale">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Reporting",
|
4 |
<a class="button button-green button-small"
|
5 |
-
href="#pro-feature" rel="dialog"><?php _e( "Upgrade to Pro",
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<form method="post" class="">
|
@@ -11,9 +11,9 @@
|
|
11 |
</div>
|
12 |
<div class="columns">
|
13 |
<div class="column is-one-third">
|
14 |
-
<strong><?php _e( "Schedule scans",
|
15 |
<span class="sub">
|
16 |
-
<?php _e( "Configure Defender to automatically and regularly scan your website and email you reports.",
|
17 |
</span>
|
18 |
</div>
|
19 |
<div class="column">
|
@@ -21,23 +21,23 @@
|
|
21 |
<input type="checkbox" class="toggle-checkbox" name="notification" value="1" id="chk1"/>
|
22 |
<label class="toggle-label" for="chk1"></label>
|
23 |
</span>
|
24 |
-
<label><?php _e( "Run regular scans & reports",
|
25 |
<div class="clear mline"></div>
|
26 |
<div class="well well-white schedule-box">
|
27 |
-
<strong><?php _e( "Schedule",
|
28 |
-
<label><?php _e( "Frequency",
|
29 |
<select name="frequency">
|
30 |
-
<option value="1"><?php _e( "Daily",
|
31 |
</select>
|
32 |
<div class="days-container">
|
33 |
-
<label><?php _e( "Day of the week",
|
34 |
<select name="day">
|
35 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
36 |
<option value="<?php echo $day ?>"><?php echo ucfirst( $day ) ?></option>
|
37 |
<?php endforeach; ?>
|
38 |
</select>
|
39 |
</div>
|
40 |
-
<label><?php _e( "Time of day",
|
41 |
<select name="time">
|
42 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $time ): ?>
|
43 |
<option value="<?php echo $time ?>"><?php echo strftime( '%I:%M %p', strtotime( $time ) ) ?></option>
|
@@ -48,9 +48,9 @@
|
|
48 |
</div>
|
49 |
<div class="columns last">
|
50 |
<div class="column is-one-third">
|
51 |
-
<strong><?php _e( "Email recipients",
|
52 |
<span class="sub">
|
53 |
-
<?php _e( "Choose which of your website’s users will receive scan report results to their email inboxes.",
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
@@ -60,7 +60,7 @@
|
|
60 |
</form>
|
61 |
<div class="presale-text">
|
62 |
<div>
|
63 |
-
<?php printf( __( "Schedule automated file scanning and email reporting for all your websites. This feature is included in a WPMU DEV membership along with 100+ plugins & themes, 24/7 support and lots of handy site management tools – <a href=\"%s\">Try it all FREE today!</a>",
|
64 |
</div>
|
65 |
</div>
|
66 |
</div>
|
1 |
<div class="dev-box report-sale">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Reporting", "defender-security" ) ?></h3>
|
4 |
<a class="button button-green button-small"
|
5 |
+
href="#pro-feature" rel="dialog"><?php _e( "Upgrade to Pro", "defender-security" ) ?></a>
|
6 |
</div>
|
7 |
<div class="box-content">
|
8 |
<form method="post" class="">
|
11 |
</div>
|
12 |
<div class="columns">
|
13 |
<div class="column is-one-third">
|
14 |
+
<strong><?php _e( "Schedule scans", "defender-security" ) ?></strong>
|
15 |
<span class="sub">
|
16 |
+
<?php _e( "Configure Defender to automatically and regularly scan your website and email you reports.", "defender-security" ) ?>
|
17 |
</span>
|
18 |
</div>
|
19 |
<div class="column">
|
21 |
<input type="checkbox" class="toggle-checkbox" name="notification" value="1" id="chk1"/>
|
22 |
<label class="toggle-label" for="chk1"></label>
|
23 |
</span>
|
24 |
+
<label><?php _e( "Run regular scans & reports", "defender-security" ) ?></label>
|
25 |
<div class="clear mline"></div>
|
26 |
<div class="well well-white schedule-box">
|
27 |
+
<strong><?php _e( "Schedule", "defender-security" ) ?></strong>
|
28 |
+
<label><?php _e( "Frequency", "defender-security" ) ?></label>
|
29 |
<select name="frequency">
|
30 |
+
<option value="1"><?php _e( "Daily", "defender-security" ) ?></option>
|
31 |
</select>
|
32 |
<div class="days-container">
|
33 |
+
<label><?php _e( "Day of the week", "defender-security" ) ?></label>
|
34 |
<select name="day">
|
35 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
36 |
<option value="<?php echo $day ?>"><?php echo ucfirst( $day ) ?></option>
|
37 |
<?php endforeach; ?>
|
38 |
</select>
|
39 |
</div>
|
40 |
+
<label><?php _e( "Time of day", "defender-security" ) ?></label>
|
41 |
<select name="time">
|
42 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $time ): ?>
|
43 |
<option value="<?php echo $time ?>"><?php echo strftime( '%I:%M %p', strtotime( $time ) ) ?></option>
|
48 |
</div>
|
49 |
<div class="columns last">
|
50 |
<div class="column is-one-third">
|
51 |
+
<strong><?php _e( "Email recipients", "defender-security" ) ?></strong>
|
52 |
<span class="sub">
|
53 |
+
<?php _e( "Choose which of your website’s users will receive scan report results to their email inboxes.", "defender-security" ) ?>
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
60 |
</form>
|
61 |
<div class="presale-text">
|
62 |
<div>
|
63 |
+
<?php printf( __( "Schedule automated file scanning and email reporting for all your websites. This feature is included in a WPMU DEV membership along with 100+ plugins & themes, 24/7 support and lots of handy site management tools – <a href=\"%s\">Try it all FREE today!</a>", "defender-security" ), "https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade" ) ?>
|
64 |
</div>
|
65 |
</div>
|
66 |
</div>
|
app/module/scan/view/automation.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Reporting",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
-
<strong><?php _e( "Schedule scans",
|
10 |
<span class="sub">
|
11 |
-
<?php _e( "Configure Defender to automatically and regularly scan your website and email you reports.",
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
@@ -18,21 +18,21 @@
|
|
18 |
id="chk1" <?php checked( 1, $setting->notification ) ?>/>
|
19 |
<label class="toggle-label" for="chk1"></label>
|
20 |
</span>
|
21 |
-
<label><?php _e( "Run regular scans & reports",
|
22 |
<div class="clear mline"></div>
|
23 |
<div class="well well-white schedule-box">
|
24 |
-
<strong><?php _e( "Schedule",
|
25 |
-
<label><?php _e( "Frequency",
|
26 |
<select name="frequency">
|
27 |
<option <?php selected( 1, $setting->frequency ) ?>
|
28 |
-
value="1"><?php _e( "Daily",
|
29 |
<option <?php selected( 7, $setting->frequency ) ?>
|
30 |
-
value="7"><?php _e( "Weekly",
|
31 |
<option <?php selected( 30, $setting->frequency ) ?>
|
32 |
-
value="30"><?php _e( "Monthly",
|
33 |
</select>
|
34 |
<div class="days-container">
|
35 |
-
<label><?php _e( "Day of the week",
|
36 |
<select name="day">
|
37 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
38 |
<option <?php selected( $day, $setting->day ) ?>
|
@@ -40,7 +40,7 @@
|
|
40 |
<?php endforeach; ?>
|
41 |
</select>
|
42 |
</div>
|
43 |
-
<label><?php _e( "Time of day",
|
44 |
<select name="time">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $time ): ?>
|
46 |
<option <?php selected( $time, $setting->time ) ?>
|
@@ -52,9 +52,9 @@
|
|
52 |
</div>
|
53 |
<div class="columns">
|
54 |
<div class="column is-one-third">
|
55 |
-
<strong><?php _e( "Email recipients",
|
56 |
<span class="sub">
|
57 |
-
<?php _e( "Choose which of your website’s users will receive scan report results to their email inboxes.",
|
58 |
</span>
|
59 |
</div>
|
60 |
<div class="column">
|
@@ -64,7 +64,7 @@
|
|
64 |
<div class="clear line"></div>
|
65 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
66 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
67 |
-
<button class="button float-r"><?php _e( "Update Settings",
|
68 |
<div class="clear"></div>
|
69 |
</form>
|
70 |
</div>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Reporting", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns">
|
8 |
<div class="column is-one-third">
|
9 |
+
<strong><?php _e( "Schedule scans", "defender-security" ) ?></strong>
|
10 |
<span class="sub">
|
11 |
+
<?php _e( "Configure Defender to automatically and regularly scan your website and email you reports.", "defender-security" ) ?>
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
18 |
id="chk1" <?php checked( 1, $setting->notification ) ?>/>
|
19 |
<label class="toggle-label" for="chk1"></label>
|
20 |
</span>
|
21 |
+
<label><?php _e( "Run regular scans & reports", "defender-security" ) ?></label>
|
22 |
<div class="clear mline"></div>
|
23 |
<div class="well well-white schedule-box">
|
24 |
+
<strong><?php _e( "Schedule", "defender-security" ) ?></strong>
|
25 |
+
<label><?php _e( "Frequency", "defender-security" ) ?></label>
|
26 |
<select name="frequency">
|
27 |
<option <?php selected( 1, $setting->frequency ) ?>
|
28 |
+
value="1"><?php _e( "Daily", "defender-security" ) ?></option>
|
29 |
<option <?php selected( 7, $setting->frequency ) ?>
|
30 |
+
value="7"><?php _e( "Weekly", "defender-security" ) ?></option>
|
31 |
<option <?php selected( 30, $setting->frequency ) ?>
|
32 |
+
value="30"><?php _e( "Monthly", "defender-security" ) ?></option>
|
33 |
</select>
|
34 |
<div class="days-container">
|
35 |
+
<label><?php _e( "Day of the week", "defender-security" ) ?></label>
|
36 |
<select name="day">
|
37 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getDaysOfWeek() as $day ): ?>
|
38 |
<option <?php selected( $day, $setting->day ) ?>
|
40 |
<?php endforeach; ?>
|
41 |
</select>
|
42 |
</div>
|
43 |
+
<label><?php _e( "Time of day", "defender-security" ) ?></label>
|
44 |
<select name="time">
|
45 |
<?php foreach ( \WP_Defender\Behavior\Utils::instance()->getTimes() as $time ): ?>
|
46 |
<option <?php selected( $time, $setting->time ) ?>
|
52 |
</div>
|
53 |
<div class="columns">
|
54 |
<div class="column is-one-third">
|
55 |
+
<strong><?php _e( "Email recipients", "defender-security" ) ?></strong>
|
56 |
<span class="sub">
|
57 |
+
<?php _e( "Choose which of your website’s users will receive scan report results to their email inboxes.", "defender-security" ) ?>
|
58 |
</span>
|
59 |
</div>
|
60 |
<div class="column">
|
64 |
<div class="clear line"></div>
|
65 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
66 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
67 |
+
<button class="button float-r"><?php _e( "Update Settings", "defender-security" ) ?></button>
|
68 |
<div class="clear"></div>
|
69 |
</form>
|
70 |
</div>
|
app/module/scan/view/cleaned.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Ignored",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<?php $table = new \WP_Defender\Module\Scan\Component\Result_Table();
|
@@ -12,7 +12,7 @@
|
|
12 |
?>
|
13 |
<div class="well well-blue with-cap">
|
14 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
15 |
-
<?php _e( "You haven't cleaned any suspicious files yet. When this action is available, any cleaned files will appear here.",
|
16 |
</div>
|
17 |
<?php
|
18 |
}
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Ignored", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<?php $table = new \WP_Defender\Module\Scan\Component\Result_Table();
|
12 |
?>
|
13 |
<div class="well well-blue with-cap">
|
14 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
15 |
+
<?php _e( "You haven't cleaned any suspicious files yet. When this action is available, any cleaned files will appear here.", "defender-security" ) ?>
|
16 |
</div>
|
17 |
<?php
|
18 |
}
|
app/module/scan/view/email-template.php
CHANGED
@@ -414,10 +414,10 @@
|
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
-
<?php _e( "Protected By",
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
-
<?php _e( "Defender!",
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
@@ -474,7 +474,7 @@
|
|
474 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
475 |
<td class="related-items-title brand" align="left"
|
476 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
477 |
-
<?php esc_html_e( "Related plugins worth giving a try",
|
478 |
</td>
|
479 |
</tr>
|
480 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
@@ -495,9 +495,9 @@
|
|
495 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
496 |
<span class="plugin-info"
|
497 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
498 |
-
<span><?php esc_html_e( "Optimize your site with",
|
499 |
<span class="plugin-title hummingbird"
|
500 |
-
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird",
|
501 |
</span>
|
502 |
</a>
|
503 |
</th>
|
@@ -514,9 +514,9 @@
|
|
514 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
515 |
<span class="plugin-info"
|
516 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
517 |
-
<span><?php esc_html_e( "Back up your hard work with",
|
518 |
<span class="plugin-title snapshot"
|
519 |
-
style="color: #642486; display: block;"><strong><?php _e( "Snapshot",
|
520 |
</span>
|
521 |
</a>
|
522 |
</th>
|
@@ -550,7 +550,7 @@
|
|
550 |
<th class="small-12 large-8 columns first copy" align="center"
|
551 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
552 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
553 |
-
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>",
|
554 |
</p>
|
555 |
</th>
|
556 |
</tr>
|
414 |
<td class="hero-title"
|
415 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 18px; text-align: left; vertical-align: bottom; word-wrap: break-word;">
|
416 |
<h2 style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 30px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 9px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
417 |
+
<?php _e( "Protected By", "defender-security" ) ?></h2>
|
418 |
<h1 class="plugin-brand"
|
419 |
style="Margin: 0; Margin-bottom: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 60px; font-weight: 700; line-height: 1em; margin: 0; margin-bottom: 0; padding: 0; padding-left: 6px; text-align: left; text-transform: uppercase; word-wrap: normal;">
|
420 |
+
<?php _e( "Defender!", "defender-security" ) ?></h1>
|
421 |
</td>
|
422 |
<td class="hero-image"
|
423 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
474 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
475 |
<td class="related-items-title brand" align="left"
|
476 |
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #3eb4e4; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 0; padding-bottom: 10px; text-align: left; vertical-align: top; word-wrap: break-word;">
|
477 |
+
<?php esc_html_e( "Related plugins worth giving a try", "defender-security" ) ?>
|
478 |
</td>
|
479 |
</tr>
|
480 |
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
495 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
496 |
<span class="plugin-info"
|
497 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
498 |
+
<span><?php esc_html_e( "Optimize your site with", "defender-security" ) ?></span>
|
499 |
<span class="plugin-title hummingbird"
|
500 |
+
style="color: #febd30; display: block;"><strong><?php esc_html_e( "Hummingbird", "defender-security" ) ?></strong></span>
|
501 |
</span>
|
502 |
</a>
|
503 |
</th>
|
514 |
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: table-cell; max-width: 100%; outline: none; text-decoration: none; width: auto;">
|
515 |
<span class="plugin-info"
|
516 |
style="display: table-cell; padding-left: 10px; vertical-align: bottom;">
|
517 |
+
<span><?php esc_html_e( "Back up your hard work with", "defender-security" ) ?></span>
|
518 |
<span class="plugin-title snapshot"
|
519 |
+
style="color: #642486; display: block;"><strong><?php _e( "Snapshot", "defender-security" ) ?></strong></span>
|
520 |
</span>
|
521 |
</a>
|
522 |
</th>
|
550 |
<th class="small-12 large-8 columns first copy" align="center"
|
551 |
style="Margin: 0 auto; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0 auto; padding: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; text-align: left; width: 394.66667px;">
|
552 |
<p style="Margin: 0; Margin-bottom: 0; color: #707070; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 20px; margin: 0; margin-bottom: 0; padding: 0; text-align: center;">
|
553 |
+
<?php printf( __( "<a href=\"%s\">Configure reporting preferences</a>", "defender-security" ), network_admin_url( "admin.php?page=wdf-scan&view=reporting" ) ) ?>
|
554 |
</p>
|
555 |
</th>
|
556 |
</tr>
|
app/module/scan/view/ignored.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Ignored",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<?php $table = new \WP_Defender\Module\Scan\Component\Result_Table();
|
@@ -8,14 +8,14 @@
|
|
8 |
$table->prepare_items();
|
9 |
if ( $table->get_pagination_arg( 'total_items' ) ) {
|
10 |
?>
|
11 |
-
<p class="line"><?php _e( "Here is a list of the suspicious files you have chosen to ignore.",
|
12 |
<?php
|
13 |
$table->display();
|
14 |
} else {
|
15 |
?>
|
16 |
<div class="well well-blue with-cap">
|
17 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
18 |
-
<?php _e( "You haven't ignored any suspicious files yet. Ignored files appear here and can be restored at any times.",
|
19 |
</div>
|
20 |
<?php
|
21 |
}
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Ignored", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<?php $table = new \WP_Defender\Module\Scan\Component\Result_Table();
|
8 |
$table->prepare_items();
|
9 |
if ( $table->get_pagination_arg( 'total_items' ) ) {
|
10 |
?>
|
11 |
+
<p class="line"><?php _e( "Here is a list of the suspicious files you have chosen to ignore.", "defender-security" ) ?></p>
|
12 |
<?php
|
13 |
$table->display();
|
14 |
} else {
|
15 |
?>
|
16 |
<div class="well well-blue with-cap">
|
17 |
<i class="def-icon icon-warning" aria-hidden="true"></i>
|
18 |
+
<?php _e( "You haven't ignored any suspicious files yet. Ignored files appear here and can be restored at any times.", "defender-security" ) ?>
|
19 |
</div>
|
20 |
<?php
|
21 |
}
|
app/module/scan/view/issues.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
-
<?php _e( "Issues",
|
5 |
<?php $issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE );
|
6 |
if ( $issues ) {
|
7 |
?>
|
@@ -11,14 +11,14 @@
|
|
11 |
?>
|
12 |
</h3>
|
13 |
<!-- <div>-->
|
14 |
-
<!-- <span>--><?php //_e( "Type",
|
15 |
<!-- <select>-->
|
16 |
-
<!-- <option value="all">--><?php //_e( "All",
|
17 |
-
<!-- <option value="core">--><?php //_e( "Core",
|
18 |
<!-- <option value="plugins">-->
|
19 |
-
<?php //_e( "Plugins & Themes",
|
20 |
<!-- <option value="suspicious">-->
|
21 |
-
<?php //_e( "Suspicious",
|
22 |
<!-- </select>-->
|
23 |
<!-- </div>-->
|
24 |
</div>
|
@@ -27,14 +27,14 @@
|
|
27 |
$table->prepare_items();
|
28 |
if ( $table->get_pagination_arg( 'total_items' ) > 0 ) {
|
29 |
?>
|
30 |
-
<p class="line"><?php _e( "Defender has found potentially harmful files on your website. In many cases, the security scan will pick up harmless files, but in some cases you may wish to remove the files listed below that look suspicious.",
|
31 |
<?php
|
32 |
$table->display();
|
33 |
} else {
|
34 |
?>
|
35 |
<div class="well well-green with-cap">
|
36 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
37 |
-
<?php _e( "Your code is currently clean! There were no issues found during the last scan, though you can always perform a new scan anytime.",
|
38 |
</div>
|
39 |
<?php
|
40 |
}
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
<h3 class="def-issues-title">
|
4 |
+
<?php _e( "Issues", "defender-security" ) ?>
|
5 |
<?php $issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE );
|
6 |
if ( $issues ) {
|
7 |
?>
|
11 |
?>
|
12 |
</h3>
|
13 |
<!-- <div>-->
|
14 |
+
<!-- <span>--><?php //_e( "Type", "defender-security" ) ?><!--</span>-->
|
15 |
<!-- <select>-->
|
16 |
+
<!-- <option value="all">--><?php //_e( "All", "defender-security" ) ?><!--</option>-->
|
17 |
+
<!-- <option value="core">--><?php //_e( "Core", "defender-security" ) ?><!--</option>-->
|
18 |
<!-- <option value="plugins">-->
|
19 |
+
<?php //_e( "Plugins & Themes", "defender-security" ) ?><!--</option>-->
|
20 |
<!-- <option value="suspicious">-->
|
21 |
+
<?php //_e( "Suspicious", "defender-security" ) ?><!--</option>-->
|
22 |
<!-- </select>-->
|
23 |
<!-- </div>-->
|
24 |
</div>
|
27 |
$table->prepare_items();
|
28 |
if ( $table->get_pagination_arg( 'total_items' ) > 0 ) {
|
29 |
?>
|
30 |
+
<p class="line"><?php _e( "Defender has found potentially harmful files on your website. In many cases, the security scan will pick up harmless files, but in some cases you may wish to remove the files listed below that look suspicious.", "defender-security" ) ?></p>
|
31 |
<?php
|
32 |
$table->display();
|
33 |
} else {
|
34 |
?>
|
35 |
<div class="well well-green with-cap">
|
36 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
37 |
+
<?php _e( "Your code is currently clean! There were no issues found during the last scan, though you can always perform a new scan anytime.", "defender-security" ) ?>
|
38 |
</div>
|
39 |
<?php
|
40 |
}
|
app/module/scan/view/layouts/layout.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="wdf-scanning">
|
4 |
<h2 class="title">
|
5 |
-
<?php _e( "File Scanning",
|
6 |
<span>
|
7 |
<form id="start-a-scan" method="post" class="scan-frm">
|
8 |
<?php
|
@@ -10,7 +10,7 @@
|
|
10 |
?>
|
11 |
<input type="hidden" name="action" value="startAScan"/>
|
12 |
<button type="submit"
|
13 |
-
class="button button-small"><?php _e( "New Scan",
|
14 |
</form>
|
15 |
</span>
|
16 |
</h2>
|
@@ -23,9 +23,9 @@
|
|
23 |
<div>
|
24 |
<h5 class="def-issues def-issues-top-left"><?php echo $countAll = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE ) ?></h5>
|
25 |
<?php if ( $countAll > 0 ) : ?>
|
26 |
-
<span class="def-issues-top-left-icon" tooltip="<?php esc_attr_e( sprintf( __('You have %d suspicious file(s) needing attention.',
|
27 |
<?php else: ?>
|
28 |
-
<span class="def-issues-top-left-icon" tooltip="<?php esc_attr_e( 'Your code is clean, the skies are clear.',
|
29 |
<?php endif; ?>
|
30 |
<?php
|
31 |
$icon = $countAll == 0 ? ' <i class="def-icon icon-tick" aria-hidden="true"></i>' : ' <i class="def-icon icon-warning fill-red" aria-hidden="true"></i>';
|
@@ -33,17 +33,17 @@
|
|
33 |
?>
|
34 |
</span>
|
35 |
<div class="clear"></div>
|
36 |
-
<span class="sub"><?php _e( "File scanning issues need attention.",
|
37 |
<div class="clear mline"></div>
|
38 |
<strong><?php echo $lastScanDate ?></strong>
|
39 |
-
<span class="sub"><?php _e( "Last scan",
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="column is-5">
|
43 |
<ul class="dev-list bold">
|
44 |
<li>
|
45 |
<div>
|
46 |
-
<span class="list-label"><?php _e( "WordPress Core",
|
47 |
<span class="list-detail def-issues-top-right-wp">
|
48 |
<?php echo $model->getCount( 'core' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . '<span class="def-issues">' . $model->getCount( 'core' ) . '</span></span>' ?>
|
49 |
</span>
|
@@ -51,15 +51,15 @@
|
|
51 |
</li>
|
52 |
<li>
|
53 |
<div>
|
54 |
-
<span class="list-label"><?php _e( "Plugins & Themes",
|
55 |
<span class="list-detail def-issues-top-right-pt">
|
56 |
<?php if ( \WP_Defender\Behavior\Utils::instance()->getAPIKey() ): ?>
|
57 |
<?php echo $model->getCount( 'vuln' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'vuln' ) . '</span>' ?>
|
58 |
<?php else: ?>
|
59 |
<a href="#pro-feature" rel="dialog"
|
60 |
class="button button-pre button-small"
|
61 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
62 |
-
<?php _e( "Pro Feature",
|
63 |
</a>
|
64 |
<?php endif; ?>
|
65 |
</span>
|
@@ -67,15 +67,15 @@
|
|
67 |
</li>
|
68 |
<li>
|
69 |
<div>
|
70 |
-
<span class="list-label"><?php _e( "Suspicious Code",
|
71 |
<span class="list-detail def-issues-top-right-sc">
|
72 |
<?php if ( \WP_Defender\Behavior\Utils::instance()->getAPIKey() ): ?>
|
73 |
<?php echo $model->getCount( 'content' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'content' ) . '</span>' ?>
|
74 |
<?php else: ?>
|
75 |
<a href="#pro-feature" rel="dialog"
|
76 |
class="button button-pre button-small"
|
77 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
78 |
-
<?php _e( "Pro Feature",
|
79 |
</a>
|
80 |
<?php endif; ?>
|
81 |
</span>
|
@@ -93,12 +93,12 @@
|
|
93 |
<li class="issues-nav">
|
94 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
95 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>">
|
96 |
-
<?php _e( "Issues",
|
97 |
<?php
|
98 |
$issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE );
|
99 |
$tooltip = '';
|
100 |
if ( $issues > 0 ) :
|
101 |
-
$tooltip = 'tooltip="' . esc_attr( sprintf( __("You have %d suspicious file(s) needing attention",
|
102 |
endif;
|
103 |
echo $issues > 0 ? '<span class="def-tag tag-error def-issues-below" ' . $tooltip . '>' . $issues . '</span>' : '' ?>
|
104 |
</a>
|
@@ -107,7 +107,7 @@
|
|
107 |
<!-- <a class="-->
|
108 |
<?php //echo $controller->isView( 'cleaned' ) ? 'active' : null ?><!--"-->
|
109 |
<!-- href="-->
|
110 |
-
<?php //echo network_admin_url( 'admin.php?page=wdf-scan&view=cleaned' ) ?><!--">--><?php //_e( "Cleaned",
|
111 |
<!-- <span>-->
|
112 |
<!-- --><?php
|
113 |
// $issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_FIXED );
|
@@ -118,7 +118,7 @@
|
|
118 |
<li>
|
119 |
<a class="<?php echo $controller->isView( 'ignored' ) ? 'active' : null ?>"
|
120 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=ignored' ) ?>">
|
121 |
-
<?php _e( "Ignored",
|
122 |
<span class="def-ignored">
|
123 |
<?php
|
124 |
$issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_IGNORED );
|
@@ -129,12 +129,12 @@
|
|
129 |
<li>
|
130 |
<a class="<?php echo $controller->isView( 'settings' ) ? 'active' : null ?>"
|
131 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=settings' ) ?>">
|
132 |
-
<?php _e( "Settings",
|
133 |
</li>
|
134 |
<li>
|
135 |
<a class="<?php echo $controller->isView( 'reporting' ) ? 'active' : null ?>"
|
136 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>">
|
137 |
-
<?php _e( "Reporting",
|
138 |
</li>
|
139 |
</ul>
|
140 |
</nav>
|
@@ -142,13 +142,13 @@
|
|
142 |
<nav role="navigation" aria-label="Filters">
|
143 |
<select class="mobile-nav">
|
144 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
145 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"><?php _e( "Issues",
|
146 |
<option <?php selected( 'ignored', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
147 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=ignored' ) ?>"><?php _e( "Ignored",
|
148 |
<option <?php selected( 'settings', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
149 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=settings' ) ?>"><?php _e( "Settings",
|
150 |
<option <?php selected( 'reporting', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
151 |
-
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>"><?php _e( "Reporting",
|
152 |
</select>
|
153 |
</nav>
|
154 |
</div>
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="wdf-scanning">
|
4 |
<h2 class="title">
|
5 |
+
<?php _e( "File Scanning", "defender-security" ) ?>
|
6 |
<span>
|
7 |
<form id="start-a-scan" method="post" class="scan-frm">
|
8 |
<?php
|
10 |
?>
|
11 |
<input type="hidden" name="action" value="startAScan"/>
|
12 |
<button type="submit"
|
13 |
+
class="button button-small"><?php _e( "New Scan", "defender-security" ) ?></button>
|
14 |
</form>
|
15 |
</span>
|
16 |
</h2>
|
23 |
<div>
|
24 |
<h5 class="def-issues def-issues-top-left"><?php echo $countAll = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE ) ?></h5>
|
25 |
<?php if ( $countAll > 0 ) : ?>
|
26 |
+
<span class="def-issues-top-left-icon" tooltip="<?php esc_attr_e( sprintf( __('You have %d suspicious file(s) needing attention.', "defender-security" ), $countAll ) ); ?>">
|
27 |
<?php else: ?>
|
28 |
+
<span class="def-issues-top-left-icon" tooltip="<?php esc_attr_e( 'Your code is clean, the skies are clear.', "defender-security" ); ?>">
|
29 |
<?php endif; ?>
|
30 |
<?php
|
31 |
$icon = $countAll == 0 ? ' <i class="def-icon icon-tick" aria-hidden="true"></i>' : ' <i class="def-icon icon-warning fill-red" aria-hidden="true"></i>';
|
33 |
?>
|
34 |
</span>
|
35 |
<div class="clear"></div>
|
36 |
+
<span class="sub"><?php _e( "File scanning issues need attention.", "defender-security" ) ?></span>
|
37 |
<div class="clear mline"></div>
|
38 |
<strong><?php echo $lastScanDate ?></strong>
|
39 |
+
<span class="sub"><?php _e( "Last scan", "defender-security" ) ?></span>
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="column is-5">
|
43 |
<ul class="dev-list bold">
|
44 |
<li>
|
45 |
<div>
|
46 |
+
<span class="list-label"><?php _e( "WordPress Core", "defender-security" ) ?></span>
|
47 |
<span class="list-detail def-issues-top-right-wp">
|
48 |
<?php echo $model->getCount( 'core' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . '<span class="def-issues">' . $model->getCount( 'core' ) . '</span></span>' ?>
|
49 |
</span>
|
51 |
</li>
|
52 |
<li>
|
53 |
<div>
|
54 |
+
<span class="list-label"><?php _e( "Plugins & Themes", "defender-security" ) ?></span>
|
55 |
<span class="list-detail def-issues-top-right-pt">
|
56 |
<?php if ( \WP_Defender\Behavior\Utils::instance()->getAPIKey() ): ?>
|
57 |
<?php echo $model->getCount( 'vuln' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'vuln' ) . '</span>' ?>
|
58 |
<?php else: ?>
|
59 |
<a href="#pro-feature" rel="dialog"
|
60 |
class="button button-pre button-small"
|
61 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>">
|
62 |
+
<?php _e( "Pro Feature", "defender-security" ) ?>
|
63 |
</a>
|
64 |
<?php endif; ?>
|
65 |
</span>
|
67 |
</li>
|
68 |
<li>
|
69 |
<div>
|
70 |
+
<span class="list-label"><?php _e( "Suspicious Code", "defender-security" ) ?></span>
|
71 |
<span class="list-detail def-issues-top-right-sc">
|
72 |
<?php if ( \WP_Defender\Behavior\Utils::instance()->getAPIKey() ): ?>
|
73 |
<?php echo $model->getCount( 'content' ) == 0 ? ' <i class="def-icon icon-tick"></i>' : '<span class="def-tag tag-error">' . $model->getCount( 'content' ) . '</span>' ?>
|
74 |
<?php else: ?>
|
75 |
<a href="#pro-feature" rel="dialog"
|
76 |
class="button button-pre button-small"
|
77 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>" >
|
78 |
+
<?php _e( "Pro Feature", "defender-security" ) ?>
|
79 |
</a>
|
80 |
<?php endif; ?>
|
81 |
</span>
|
93 |
<li class="issues-nav">
|
94 |
<a class="<?php echo \Hammer\Helper\HTTP_Helper::retrieve_get( 'view', false ) == false ? 'active' : null ?>"
|
95 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>">
|
96 |
+
<?php _e( "Issues", "defender-security" ) ?>
|
97 |
<?php
|
98 |
$issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_ISSUE );
|
99 |
$tooltip = '';
|
100 |
if ( $issues > 0 ) :
|
101 |
+
$tooltip = 'tooltip="' . esc_attr( sprintf( __("You have %d suspicious file(s) needing attention", "defender-security" ), $countAll ) ) . '"';
|
102 |
endif;
|
103 |
echo $issues > 0 ? '<span class="def-tag tag-error def-issues-below" ' . $tooltip . '>' . $issues . '</span>' : '' ?>
|
104 |
</a>
|
107 |
<!-- <a class="-->
|
108 |
<?php //echo $controller->isView( 'cleaned' ) ? 'active' : null ?><!--"-->
|
109 |
<!-- href="-->
|
110 |
+
<?php //echo network_admin_url( 'admin.php?page=wdf-scan&view=cleaned' ) ?><!--">--><?php //_e( "Cleaned", "defender-security" ) ?>
|
111 |
<!-- <span>-->
|
112 |
<!-- --><?php
|
113 |
// $issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_FIXED );
|
118 |
<li>
|
119 |
<a class="<?php echo $controller->isView( 'ignored' ) ? 'active' : null ?>"
|
120 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=ignored' ) ?>">
|
121 |
+
<?php _e( "Ignored", "defender-security" ) ?>
|
122 |
<span class="def-ignored">
|
123 |
<?php
|
124 |
$issues = $model->countAll( \WP_Defender\Module\Scan\Model\Result_Item::STATUS_IGNORED );
|
129 |
<li>
|
130 |
<a class="<?php echo $controller->isView( 'settings' ) ? 'active' : null ?>"
|
131 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=settings' ) ?>">
|
132 |
+
<?php _e( "Settings", "defender-security" ) ?></a>
|
133 |
</li>
|
134 |
<li>
|
135 |
<a class="<?php echo $controller->isView( 'reporting' ) ? 'active' : null ?>"
|
136 |
href="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>">
|
137 |
+
<?php _e( "Reporting", "defender-security" ) ?></a>
|
138 |
</li>
|
139 |
</ul>
|
140 |
</nav>
|
142 |
<nav role="navigation" aria-label="Filters">
|
143 |
<select class="mobile-nav">
|
144 |
<option <?php selected( '', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
145 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"><?php _e( "Issues", "defender-security" ) ?></option>
|
146 |
<option <?php selected( 'ignored', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
147 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=ignored' ) ?>"><?php _e( "Ignored", "defender-security" ) ?></option>
|
148 |
<option <?php selected( 'settings', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
149 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=settings' ) ?>"><?php _e( "Settings", "defender-security" ) ?></option>
|
150 |
<option <?php selected( 'reporting', \Hammer\Helper\HTTP_Helper::retrieve_get( 'view' ) ) ?>
|
151 |
+
value="<?php echo network_admin_url( 'admin.php?page=wdf-scan&view=reporting' ) ?>"><?php _e( "Reporting", "defender-security" ) ?></option>
|
152 |
</select>
|
153 |
</nav>
|
154 |
</div>
|
app/module/scan/view/new.php
CHANGED
@@ -3,19 +3,19 @@
|
|
3 |
<div class="wdf-scanning">
|
4 |
<div class="dev-box">
|
5 |
<div class="box-title">
|
6 |
-
<h3><?php _e( "GET STARTED",
|
7 |
</div>
|
8 |
<div class="box-content tc">
|
9 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/scan-man.svg" class="mline">
|
10 |
<div class="line max-600">
|
11 |
-
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and get notified about anything suspicious. Defender will keep an eye on your code without you having to worry.",
|
12 |
</div>
|
13 |
<form id="start-a-scan" method="post" class="scan-frm">
|
14 |
<?php
|
15 |
wp_nonce_field( 'startAScan' );
|
16 |
?>
|
17 |
<input type="hidden" name="action" value="startAScan"/>
|
18 |
-
<button type="submit" class="button"><?php _e( "RUN SCAN",
|
19 |
</form>
|
20 |
</div>
|
21 |
</div>
|
3 |
<div class="wdf-scanning">
|
4 |
<div class="dev-box">
|
5 |
<div class="box-title">
|
6 |
+
<h3><?php _e( "GET STARTED", "defender-security" ) ?></h3>
|
7 |
</div>
|
8 |
<div class="box-content tc">
|
9 |
<img src="<?php echo wp_defender()->getPluginUrl() ?>assets/img/scan-man.svg" class="mline">
|
10 |
<div class="line max-600">
|
11 |
+
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and get notified about anything suspicious. Defender will keep an eye on your code without you having to worry.", "defender-security" ) ?>
|
12 |
</div>
|
13 |
<form id="start-a-scan" method="post" class="scan-frm">
|
14 |
<?php
|
15 |
wp_nonce_field( 'startAScan' );
|
16 |
?>
|
17 |
<input type="hidden" name="action" value="startAScan"/>
|
18 |
+
<button type="submit" class="button"><?php _e( "RUN SCAN", "defender-security" ) ?></button>
|
19 |
</form>
|
20 |
</div>
|
21 |
</div>
|
app/module/scan/view/pro-feature.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features",
|
2 |
<div class="wp-defender">
|
3 |
-
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;",
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
6 |
-
<strong><?php _e( "Automatic Full File Scans & Notifications",
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
-
issues arise.",
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
15 |
-
<strong><?php _e( "Advanced File Scanning",
|
16 |
<p class="sub">
|
17 |
-
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.",
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
22 |
-
<strong><?php _e( "Audit Logging",
|
23 |
<p class="sub">
|
24 |
-
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.",
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
29 |
-
<strong><?php _e( "Tailored Reporting",
|
30 |
<p class="sub">
|
31 |
-
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.",
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
-
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free",
|
36 |
-
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.",
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
1 |
+
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features", "defender-security" ) ?>">
|
2 |
<div class="wp-defender">
|
3 |
+
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;", "defender-security" ) ?></p>
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
6 |
+
<strong><?php _e( "Automatic Full File Scans & Notifications", "defender-security" ) ?></strong>
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
+
issues arise.", "defender-security" ) ?>
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
15 |
+
<strong><?php _e( "Advanced File Scanning", "defender-security" ) ?></strong>
|
16 |
<p class="sub">
|
17 |
+
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.", "defender-security" ) ?>
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
22 |
+
<strong><?php _e( "Audit Logging", "defender-security" ) ?></strong>
|
23 |
<p class="sub">
|
24 |
+
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.", "defender-security" ) ?>
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue" aria-hidden="true"></i>
|
29 |
+
<strong><?php _e( "Tailored Reporting", "defender-security" ) ?></strong>
|
30 |
<p class="sub">
|
31 |
+
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.", "defender-security" ) ?>
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
+
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free", "defender-security" ) ?></a>
|
36 |
+
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.", "defender-security" ) ?></p>
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
app/module/scan/view/scanning.php
CHANGED
@@ -3,15 +3,15 @@
|
|
3 |
<div class="wp-defender">
|
4 |
<div class="wdf-scanning">
|
5 |
<h2 class="title">
|
6 |
-
<?php _e( "File Scanning",
|
7 |
-
<span><?php echo $lastScanDate == null ? null : sprintf( __( "Last scan: %s",
|
8 |
<form id="start-a-scan" method="post" class="scan-frm">
|
9 |
<?php
|
10 |
wp_nonce_field( 'startAScan' );
|
11 |
?>
|
12 |
<input type="hidden" name="action" value="startAScan"/>
|
13 |
<button type="submit"
|
14 |
-
class="button button-small"><?php _e( "New Scan",
|
15 |
</form>
|
16 |
</span>
|
17 |
</h2>
|
@@ -21,7 +21,7 @@
|
|
21 |
</div>
|
22 |
<dialog id="scanning" class="<?php echo wp_defender()->isFree ? 'scanning-free' : null ?>">
|
23 |
<div class="line">
|
24 |
-
<?php _e( "Defender is scanning your files for malicious code. This will take a few minutes depending on the size of your website.",
|
25 |
</div>
|
26 |
<div class="well mline">
|
27 |
<div class="scan-progress">
|
@@ -47,7 +47,7 @@
|
|
47 |
<div>
|
48 |
<?php printf( __( "Did you know the Pro version of Defender comes with advanced full code scanning and automated reporting?
|
49 |
Get enhanced security protection as part of a WPMU DEV membership including 100+ plugins & themes, 24/7
|
50 |
-
support and lots of handy site management tools – <a href=\"%s\">Try Defender Pro today for FREE</a>",
|
51 |
</div>
|
52 |
</div>
|
53 |
<?php endif; ?>
|
3 |
<div class="wp-defender">
|
4 |
<div class="wdf-scanning">
|
5 |
<h2 class="title">
|
6 |
+
<?php _e( "File Scanning", "defender-security" ) ?>
|
7 |
+
<span><?php echo $lastScanDate == null ? null : sprintf( __( "Last scan: %s", "defender-security" ), $lastScanDate ) ?>
|
8 |
<form id="start-a-scan" method="post" class="scan-frm">
|
9 |
<?php
|
10 |
wp_nonce_field( 'startAScan' );
|
11 |
?>
|
12 |
<input type="hidden" name="action" value="startAScan"/>
|
13 |
<button type="submit"
|
14 |
+
class="button button-small"><?php _e( "New Scan", "defender-security" ) ?></button>
|
15 |
</form>
|
16 |
</span>
|
17 |
</h2>
|
21 |
</div>
|
22 |
<dialog id="scanning" class="<?php echo wp_defender()->isFree ? 'scanning-free' : null ?>">
|
23 |
<div class="line">
|
24 |
+
<?php _e( "Defender is scanning your files for malicious code. This will take a few minutes depending on the size of your website.", "defender-security" ) ?>
|
25 |
</div>
|
26 |
<div class="well mline">
|
27 |
<div class="scan-progress">
|
47 |
<div>
|
48 |
<?php printf( __( "Did you know the Pro version of Defender comes with advanced full code scanning and automated reporting?
|
49 |
Get enhanced security protection as part of a WPMU DEV membership including 100+ plugins & themes, 24/7
|
50 |
+
support and lots of handy site management tools – <a href=\"%s\">Try Defender Pro today for FREE</a>", "defender-security" ), "https://premium.wpmudev.org/project/wp-defender/" ) ?>
|
51 |
</div>
|
52 |
</div>
|
53 |
<?php endif; ?>
|
app/module/scan/view/setting-free.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Settings",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns <?php echo wp_defender()->isFree ? 'has-presale' : null ?>">
|
8 |
<div class="column is-one-third">
|
9 |
-
<strong><?php _e( "Scan Types",
|
10 |
<span class="sub">
|
11 |
-
<?php _e( "Choose the scan types you would like to include in your default scan. It's recommended you enable all types.",
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
@@ -18,38 +18,38 @@
|
|
18 |
<?php checked( true, $setting->scan_core ) ?>/>
|
19 |
<label class="toggle-label" for="core-scan"></label>
|
20 |
</span>
|
21 |
-
<label for="core-scan"><?php _e( "WordPress Core",
|
22 |
<span class="sub inpos">
|
23 |
-
<?php _e( "Defender checks for any modifications or additions to WordPress core files.",
|
24 |
</span>
|
25 |
<div class="clear mline"></div>
|
26 |
<div class="feature-pre-require">
|
27 |
<div></div>
|
28 |
<a href="#pro-feature" role="button" rel="dialog" class="button button-small button-pre"
|
29 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
30 |
-
<?php _e( "Pro Feature",
|
31 |
<span class="toggle" aria-hidden="true" role="presentation">
|
32 |
<input role="presentation" type="checkbox" class="toggle-checkbox" value="1" id="scan-vuln"/>
|
33 |
<label class="toggle-label" aria-hidden="true" for="scan-vuln"></label>
|
34 |
</span>
|
35 |
-
<label for="scan-vuln"><?php _e( "Plugins & Themes",
|
36 |
<span class="sub inpos">
|
37 |
-
<?php _e( "Defender looks for publicly reported vulnerabilities in your installed plugins and themes.",
|
38 |
</span>
|
39 |
</div>
|
40 |
<div class="clear mline"></div>
|
41 |
<div class="feature-pre-require">
|
42 |
<div></div>
|
43 |
<a href="#pro-feature" role="button" rel="dialog" class="button button-small button-pre"
|
44 |
-
tooltip="<?php esc_attr_e( "Try Defender Pro free today",
|
45 |
-
<?php _e( "Pro Feature",
|
46 |
<span class="toggle" aria-hidden="true" role="presentation">
|
47 |
<input role="presentation" type="checkbox" class="toggle-checkbox" value="1" id="scan-content"/>
|
48 |
<label class="toggle-label" aria-hidden="true" for="scan-content"></label>
|
49 |
</span>
|
50 |
-
<label for="scan-content"><?php _e( "Suspicious Code",
|
51 |
<span class="sub inpos">
|
52 |
-
<?php _e( "Defender looks inside all of your files for suspicious and potentially harmful code.",
|
53 |
</span>
|
54 |
</div>
|
55 |
</div>
|
@@ -57,27 +57,27 @@
|
|
57 |
<div class="presale-text">
|
58 |
<div>
|
59 |
<?php printf( __( "Defenders scans through every line of code on your website, searching for anything suspicious. This feature is included when you join WPMU DEV, along with 100+ plugins and themes, 24/7 support and lots of handy site management tools. – <a href=\"%s\" role='button'>Try it all FREE today!
|
60 |
-
</a>",
|
61 |
</div>
|
62 |
</div>
|
63 |
</div>
|
64 |
<div class="columns">
|
65 |
<div class="column is-one-third">
|
66 |
-
<strong><?php _e( "Maximum included file size",
|
67 |
<span class="sub">
|
68 |
-
<?php _e( "Defender will skip any files larger than this size. The smaller the number, the faster Defender will scan your website.",
|
69 |
</span>
|
70 |
</div>
|
71 |
<div class="column">
|
72 |
<input type="text" size="4" value="<?php echo esc_attr( $setting->max_filesize ) ?>"
|
73 |
-
name="max_filesize"> <?php _e( "MB",
|
74 |
</div>
|
75 |
</div>
|
76 |
<div class="columns">
|
77 |
<div class="column is-one-third">
|
78 |
-
<strong><?php _e( "Optional emails",
|
79 |
<span class="sub">
|
80 |
-
<?php _e( "By default, you'll only get email reports when your site runs into trouble. Turn this option on to get reports even when your site is running smoothly.",
|
81 |
</span>
|
82 |
</div>
|
83 |
<div class="column">
|
@@ -87,12 +87,12 @@
|
|
87 |
id="always_send" <?php checked( true, $setting->always_send ) ?>/>
|
88 |
<label class="toggle-label" aria-hidden="true" for="always_send"></label>
|
89 |
</span>
|
90 |
-
<label><?php _e( "Send all scan report emails",
|
91 |
</div>
|
92 |
</div>
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
-
<strong><?php _e( "Email subject",
|
96 |
</div>
|
97 |
<div class="column">
|
98 |
<input type="text" name="email_subject" value="<?php echo esc_attr( $setting->email_subject ) ?>"/>
|
@@ -100,26 +100,26 @@
|
|
100 |
</div>
|
101 |
<div class="columns">
|
102 |
<div class="column is-one-third">
|
103 |
-
<strong><?php _e( "Email templates",
|
104 |
<span class="sub">
|
105 |
-
<?php _e( "When Defender scans your website, a report will be generated with any issues that have been found. You can choose to have reports emailed to you.",
|
106 |
</span>
|
107 |
</div>
|
108 |
<div class="column">
|
109 |
<ul class="dev-list">
|
110 |
<li>
|
111 |
<div>
|
112 |
-
<span class="list-label"><?php _e( "When an issue is found",
|
113 |
<span class="list-detail tr">
|
114 |
-
<a href="#issue-found" rel="dialog" role='button'><?php _e( "Edit",
|
115 |
</div>
|
116 |
</li>
|
117 |
<li>
|
118 |
<div>
|
119 |
-
<span class="list-label"><?php _e( "When no issues are found",
|
120 |
<span class="list-detail tr">
|
121 |
<a href="#all-ok"
|
122 |
-
rel="dialog" role='button'><?php _e( "Edit",
|
123 |
</div>
|
124 |
</li>
|
125 |
</ul>
|
@@ -128,24 +128,24 @@
|
|
128 |
<div class="clear line"></div>
|
129 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
130 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
131 |
-
<button class="button float-r"><?php _e( "Update Settings",
|
132 |
<div class="clear"></div>
|
133 |
</form>
|
134 |
</div>
|
135 |
</div>
|
136 |
-
<dialog id="issue-found" title="<?php esc_attr_e( "Issues found",
|
137 |
<form method="post" class="scan-frm scan-settings">
|
138 |
<textarea rows="12" name="email_has_issue"><?php echo $setting->email_has_issue ?></textarea>
|
139 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
140 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
141 |
-
<button class="button"><?php _e( "Save",
|
142 |
</form>
|
143 |
</dialog>
|
144 |
-
<dialog id="all-ok" title="<?php esc_attr_e( 'All OK',
|
145 |
<form method="post" class="scan-frm scan-settings">
|
146 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
147 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
148 |
<textarea rows="12" name="email_all_ok"><?php echo $setting->email_all_ok ?></textarea>
|
149 |
-
<button class="button"><?php _e( "Save",
|
150 |
</form>
|
151 |
</dialog>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Settings", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns <?php echo wp_defender()->isFree ? 'has-presale' : null ?>">
|
8 |
<div class="column is-one-third">
|
9 |
+
<strong><?php _e( "Scan Types", "defender-security" ) ?></strong>
|
10 |
<span class="sub">
|
11 |
+
<?php _e( "Choose the scan types you would like to include in your default scan. It's recommended you enable all types.", "defender-security" ) ?>
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
18 |
<?php checked( true, $setting->scan_core ) ?>/>
|
19 |
<label class="toggle-label" for="core-scan"></label>
|
20 |
</span>
|
21 |
+
<label for="core-scan"><?php _e( "WordPress Core", "defender-security" ) ?></label>
|
22 |
<span class="sub inpos">
|
23 |
+
<?php _e( "Defender checks for any modifications or additions to WordPress core files.", "defender-security" ) ?>
|
24 |
</span>
|
25 |
<div class="clear mline"></div>
|
26 |
<div class="feature-pre-require">
|
27 |
<div></div>
|
28 |
<a href="#pro-feature" role="button" rel="dialog" class="button button-small button-pre"
|
29 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>" >
|
30 |
+
<?php _e( "Pro Feature", "defender-security" ) ?></a>
|
31 |
<span class="toggle" aria-hidden="true" role="presentation">
|
32 |
<input role="presentation" type="checkbox" class="toggle-checkbox" value="1" id="scan-vuln"/>
|
33 |
<label class="toggle-label" aria-hidden="true" for="scan-vuln"></label>
|
34 |
</span>
|
35 |
+
<label for="scan-vuln"><?php _e( "Plugins & Themes", "defender-security" ) ?></label>
|
36 |
<span class="sub inpos">
|
37 |
+
<?php _e( "Defender looks for publicly reported vulnerabilities in your installed plugins and themes.", "defender-security" ) ?>
|
38 |
</span>
|
39 |
</div>
|
40 |
<div class="clear mline"></div>
|
41 |
<div class="feature-pre-require">
|
42 |
<div></div>
|
43 |
<a href="#pro-feature" role="button" rel="dialog" class="button button-small button-pre"
|
44 |
+
tooltip="<?php esc_attr_e( "Try Defender Pro free today", "defender-security" ) ?>">
|
45 |
+
<?php _e( "Pro Feature", "defender-security" ) ?></a>
|
46 |
<span class="toggle" aria-hidden="true" role="presentation">
|
47 |
<input role="presentation" type="checkbox" class="toggle-checkbox" value="1" id="scan-content"/>
|
48 |
<label class="toggle-label" aria-hidden="true" for="scan-content"></label>
|
49 |
</span>
|
50 |
+
<label for="scan-content"><?php _e( "Suspicious Code", "defender-security" ) ?></label>
|
51 |
<span class="sub inpos">
|
52 |
+
<?php _e( "Defender looks inside all of your files for suspicious and potentially harmful code.", "defender-security" ) ?>
|
53 |
</span>
|
54 |
</div>
|
55 |
</div>
|
57 |
<div class="presale-text">
|
58 |
<div>
|
59 |
<?php printf( __( "Defenders scans through every line of code on your website, searching for anything suspicious. This feature is included when you join WPMU DEV, along with 100+ plugins and themes, 24/7 support and lots of handy site management tools. – <a href=\"%s\" role='button'>Try it all FREE today!
|
60 |
+
</a>", "defender-security" ), "https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade" ) ?>
|
61 |
</div>
|
62 |
</div>
|
63 |
</div>
|
64 |
<div class="columns">
|
65 |
<div class="column is-one-third">
|
66 |
+
<strong><?php _e( "Maximum included file size", "defender-security" ) ?></strong>
|
67 |
<span class="sub">
|
68 |
+
<?php _e( "Defender will skip any files larger than this size. The smaller the number, the faster Defender will scan your website.", "defender-security" ) ?>
|
69 |
</span>
|
70 |
</div>
|
71 |
<div class="column">
|
72 |
<input type="text" size="4" value="<?php echo esc_attr( $setting->max_filesize ) ?>"
|
73 |
+
name="max_filesize"> <?php _e( "MB", "defender-security" ) ?>
|
74 |
</div>
|
75 |
</div>
|
76 |
<div class="columns">
|
77 |
<div class="column is-one-third">
|
78 |
+
<strong><?php _e( "Optional emails", "defender-security" ) ?></strong>
|
79 |
<span class="sub">
|
80 |
+
<?php _e( "By default, you'll only get email reports when your site runs into trouble. Turn this option on to get reports even when your site is running smoothly.", "defender-security" ) ?>
|
81 |
</span>
|
82 |
</div>
|
83 |
<div class="column">
|
87 |
id="always_send" <?php checked( true, $setting->always_send ) ?>/>
|
88 |
<label class="toggle-label" aria-hidden="true" for="always_send"></label>
|
89 |
</span>
|
90 |
+
<label><?php _e( "Send all scan report emails", "defender-security" ) ?></label>
|
91 |
</div>
|
92 |
</div>
|
93 |
<div class="columns">
|
94 |
<div class="column is-one-third">
|
95 |
+
<strong><?php _e( "Email subject", "defender-security" ) ?></strong>
|
96 |
</div>
|
97 |
<div class="column">
|
98 |
<input type="text" name="email_subject" value="<?php echo esc_attr( $setting->email_subject ) ?>"/>
|
100 |
</div>
|
101 |
<div class="columns">
|
102 |
<div class="column is-one-third">
|
103 |
+
<strong><?php _e( "Email templates", "defender-security" ) ?></strong>
|
104 |
<span class="sub">
|
105 |
+
<?php _e( "When Defender scans your website, a report will be generated with any issues that have been found. You can choose to have reports emailed to you.", "defender-security" ) ?>
|
106 |
</span>
|
107 |
</div>
|
108 |
<div class="column">
|
109 |
<ul class="dev-list">
|
110 |
<li>
|
111 |
<div>
|
112 |
+
<span class="list-label"><?php _e( "When an issue is found", "defender-security" ) ?></span>
|
113 |
<span class="list-detail tr">
|
114 |
+
<a href="#issue-found" rel="dialog" role='button'><?php _e( "Edit", "defender-security" ) ?></a></span>
|
115 |
</div>
|
116 |
</li>
|
117 |
<li>
|
118 |
<div>
|
119 |
+
<span class="list-label"><?php _e( "When no issues are found", "defender-security" ) ?></span>
|
120 |
<span class="list-detail tr">
|
121 |
<a href="#all-ok"
|
122 |
+
rel="dialog" role='button'><?php _e( "Edit", "defender-security" ) ?></a></span>
|
123 |
</div>
|
124 |
</li>
|
125 |
</ul>
|
128 |
<div class="clear line"></div>
|
129 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
130 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
131 |
+
<button class="button float-r"><?php _e( "Update Settings", "defender-security" ) ?></button>
|
132 |
<div class="clear"></div>
|
133 |
</form>
|
134 |
</div>
|
135 |
</div>
|
136 |
+
<dialog id="issue-found" title="<?php esc_attr_e( "Issues found", "defender-security" ) ?>">
|
137 |
<form method="post" class="scan-frm scan-settings">
|
138 |
<textarea rows="12" name="email_has_issue"><?php echo $setting->email_has_issue ?></textarea>
|
139 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
140 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
141 |
+
<button class="button"><?php _e( "Save", "defender-security" ) ?></button>
|
142 |
</form>
|
143 |
</dialog>
|
144 |
+
<dialog id="all-ok" title="<?php esc_attr_e( 'All OK', "defender-security" ) ?>">
|
145 |
<form method="post" class="scan-frm scan-settings">
|
146 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
147 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
148 |
<textarea rows="12" name="email_all_ok"><?php echo $setting->email_all_ok ?></textarea>
|
149 |
+
<button class="button"><?php _e( "Save", "defender-security" ) ?></button>
|
150 |
</form>
|
151 |
</dialog>
|
app/module/scan/view/setting.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
-
<h3><?php _e( "Settings",
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns <?php echo wp_defender()->isFree ? 'has-presale' : null ?>">
|
8 |
<div class="column is-one-third">
|
9 |
-
<strong><?php _e( "Scan Types",
|
10 |
<span class="sub">
|
11 |
-
<?php _e( "Choose the scan types you would like to include in your default scan. It's recommended you enable all types.",
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
@@ -18,9 +18,9 @@
|
|
18 |
<?php checked( true, $setting->scan_core ) ?>/>
|
19 |
<label aria-hidden="true" class="toggle-label" for="core-scan"></label>
|
20 |
</span>
|
21 |
-
<label for="core-scan"><?php _e( "WordPress Core",
|
22 |
<span class="sub inpos">
|
23 |
-
<?php _e( "Defender checks for any modifications or additions to WordPress core files.",
|
24 |
</span>
|
25 |
<div class="clear mline"></div>
|
26 |
<span class="toggle" aria-hidden="true" role="presentation">
|
@@ -29,9 +29,9 @@
|
|
29 |
id="scan-vuln" <?php checked( true, $setting->scan_vuln ) ?>/>
|
30 |
<label aria-hidden="true" class="toggle-label" for="scan-vuln"></label>
|
31 |
</span>
|
32 |
-
<label for="scan-vuln"><?php _e( "Plugins & Themes",
|
33 |
<span class="sub inpos">
|
34 |
-
<?php _e( "Defender looks for publicly reported vulnerabilities in your installed plugins and themes.",
|
35 |
</span>
|
36 |
<div class="clear mline"></div>
|
37 |
<span class="toggle" aria-hidden="true" role="presentation">
|
@@ -40,29 +40,29 @@
|
|
40 |
id="scan-content" <?php checked( true, $setting->scan_content ) ?>/>
|
41 |
<label aria-hidden="true" class="toggle-label" for="scan-content"></label>
|
42 |
</span>
|
43 |
-
<label for="scan-content"><?php _e( "Suspicious Code",
|
44 |
<span class="sub inpos">
|
45 |
-
<?php _e( "Defender looks inside all of your files for suspicious and potentially harmful code.",
|
46 |
</span>
|
47 |
</div>
|
48 |
</div>
|
49 |
<div class="columns">
|
50 |
<div class="column is-one-third">
|
51 |
-
<strong><?php _e( "Maximum included file size",
|
52 |
<span class="sub">
|
53 |
-
<?php _e( "Defender will skip any files larger than this size. The smaller the number, the faster Defender will scan your website.",
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
57 |
<input type="text" size="4" value="<?php echo esc_attr( $setting->max_filesize ) ?>"
|
58 |
-
name="max_filesize"> <?php _e( "MB",
|
59 |
</div>
|
60 |
</div>
|
61 |
<div class="columns">
|
62 |
<div class="column is-one-third">
|
63 |
-
<strong><?php _e( "Optional emails",
|
64 |
<span class="sub">
|
65 |
-
<?php _e( "By default, you'll only get email reports when your site runs into trouble. Turn this option on to get reports even when your site is running smoothly.",
|
66 |
</span>
|
67 |
</div>
|
68 |
<div class="column">
|
@@ -72,12 +72,12 @@
|
|
72 |
id="always_send" <?php checked( true, $setting->always_send ) ?>/>
|
73 |
<label class="toggle-label" for="always_send"></label>
|
74 |
</span>
|
75 |
-
<label><?php _e( "Send all scan report emails",
|
76 |
</div>
|
77 |
</div>
|
78 |
<div class="columns">
|
79 |
<div class="column is-one-third">
|
80 |
-
<strong><?php _e( "Email subject",
|
81 |
</div>
|
82 |
<div class="column">
|
83 |
<input type="text" name="email_subject" value="<?php echo esc_attr( $setting->email_subject ) ?>"/>
|
@@ -85,26 +85,26 @@
|
|
85 |
</div>
|
86 |
<div class="columns">
|
87 |
<div class="column is-one-third">
|
88 |
-
<strong><?php _e( "Email templates",
|
89 |
<span class="sub">
|
90 |
-
<?php _e( "When Defender scans your website, a report will be generated with any issues that have been found. You can choose to have reports emailed to you.",
|
91 |
</span>
|
92 |
</div>
|
93 |
<div class="column">
|
94 |
<ul class="dev-list">
|
95 |
<li>
|
96 |
<div>
|
97 |
-
<span class="list-label"><?php _e( "When an issue is found",
|
98 |
<span class="list-detail tr">
|
99 |
-
<a href="#issue-found" rel="dialog" role="button"><?php _e( "Edit",
|
100 |
</div>
|
101 |
</li>
|
102 |
<li>
|
103 |
<div>
|
104 |
-
<span class="list-label"><?php _e( "When no issues are found",
|
105 |
<span class="list-detail tr">
|
106 |
<a href="#all-ok"
|
107 |
-
rel="dialog" role="button"><?php _e( "Edit",
|
108 |
</div>
|
109 |
</li>
|
110 |
</ul>
|
@@ -113,17 +113,17 @@
|
|
113 |
<div class="clear line"></div>
|
114 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
115 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
116 |
-
<button class="button float-r"><?php _e( "Update Settings",
|
117 |
<div class="clear"></div>
|
118 |
</form>
|
119 |
</div>
|
120 |
</div>
|
121 |
-
<dialog id="issue-found" title="<?php esc_attr_e( "Issues found",
|
122 |
<div class="wp-defender">
|
123 |
<form method="post" class="scan-frm scan-settings">
|
124 |
<textarea rows="12" name="email_has_issue"><?php echo $setting->email_has_issue ?></textarea>
|
125 |
<strong class="small">
|
126 |
-
<?php _e( "Available variables",
|
127 |
</strong>
|
128 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
129 |
<div class="clearfix"></div>
|
@@ -135,19 +135,19 @@
|
|
135 |
<div class="clearfix mline"></div>
|
136 |
<hr class="mline"/>
|
137 |
<button type="button"
|
138 |
-
class="button button-light close"><?php _e( "Cancel",
|
139 |
-
<button class="button float-r"><?php _e( "Save Template",
|
140 |
</form>
|
141 |
</div>
|
142 |
</dialog>
|
143 |
-
<dialog id="all-ok" title="<?php esc_attr_e( 'All OK',
|
144 |
<div class="wp-defender">
|
145 |
<form method="post" class="scan-frm scan-settings">
|
146 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
147 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
148 |
<textarea rows="12" name="email_all_ok"><?php echo $setting->email_all_ok ?></textarea>
|
149 |
<strong class="small">
|
150 |
-
<?php _e( "Available variables",
|
151 |
</strong>
|
152 |
<div class="clearfix"></div>
|
153 |
<span class="def-tag tag-generic">{USER_NAME}</span>
|
@@ -155,8 +155,8 @@
|
|
155 |
<div class="clearfix mline"></div>
|
156 |
<hr class="mline"/>
|
157 |
<button type="button"
|
158 |
-
class="button button-light close"><?php _e( "Cancel",
|
159 |
-
<button class="button float-r"><?php _e( "Save Template",
|
160 |
</form>
|
161 |
</div>
|
162 |
</dialog>
|
1 |
<div class="dev-box">
|
2 |
<div class="box-title">
|
3 |
+
<h3><?php _e( "Settings", "defender-security" ) ?></h3>
|
4 |
</div>
|
5 |
<div class="box-content">
|
6 |
<form method="post" class="scan-frm scan-settings">
|
7 |
<div class="columns <?php echo wp_defender()->isFree ? 'has-presale' : null ?>">
|
8 |
<div class="column is-one-third">
|
9 |
+
<strong><?php _e( "Scan Types", "defender-security" ) ?></strong>
|
10 |
<span class="sub">
|
11 |
+
<?php _e( "Choose the scan types you would like to include in your default scan. It's recommended you enable all types.", "defender-security" ) ?>
|
12 |
</span>
|
13 |
</div>
|
14 |
<div class="column">
|
18 |
<?php checked( true, $setting->scan_core ) ?>/>
|
19 |
<label aria-hidden="true" class="toggle-label" for="core-scan"></label>
|
20 |
</span>
|
21 |
+
<label for="core-scan"><?php _e( "WordPress Core", "defender-security" ) ?></label>
|
22 |
<span class="sub inpos">
|
23 |
+
<?php _e( "Defender checks for any modifications or additions to WordPress core files.", "defender-security" ) ?>
|
24 |
</span>
|
25 |
<div class="clear mline"></div>
|
26 |
<span class="toggle" aria-hidden="true" role="presentation">
|
29 |
id="scan-vuln" <?php checked( true, $setting->scan_vuln ) ?>/>
|
30 |
<label aria-hidden="true" class="toggle-label" for="scan-vuln"></label>
|
31 |
</span>
|
32 |
+
<label for="scan-vuln"><?php _e( "Plugins & Themes", "defender-security" ) ?></label>
|
33 |
<span class="sub inpos">
|
34 |
+
<?php _e( "Defender looks for publicly reported vulnerabilities in your installed plugins and themes.", "defender-security" ) ?>
|
35 |
</span>
|
36 |
<div class="clear mline"></div>
|
37 |
<span class="toggle" aria-hidden="true" role="presentation">
|
40 |
id="scan-content" <?php checked( true, $setting->scan_content ) ?>/>
|
41 |
<label aria-hidden="true" class="toggle-label" for="scan-content"></label>
|
42 |
</span>
|
43 |
+
<label for="scan-content"><?php _e( "Suspicious Code", "defender-security" ) ?></label>
|
44 |
<span class="sub inpos">
|
45 |
+
<?php _e( "Defender looks inside all of your files for suspicious and potentially harmful code.", "defender-security" ) ?>
|
46 |
</span>
|
47 |
</div>
|
48 |
</div>
|
49 |
<div class="columns">
|
50 |
<div class="column is-one-third">
|
51 |
+
<strong><?php _e( "Maximum included file size", "defender-security" ) ?></strong>
|
52 |
<span class="sub">
|
53 |
+
<?php _e( "Defender will skip any files larger than this size. The smaller the number, the faster Defender will scan your website.", "defender-security" ) ?>
|
54 |
</span>
|
55 |
</div>
|
56 |
<div class="column">
|
57 |
<input type="text" size="4" value="<?php echo esc_attr( $setting->max_filesize ) ?>"
|
58 |
+
name="max_filesize"> <?php _e( "MB", "defender-security" ) ?>
|
59 |
</div>
|
60 |
</div>
|
61 |
<div class="columns">
|
62 |
<div class="column is-one-third">
|
63 |
+
<strong><?php _e( "Optional emails", "defender-security" ) ?></strong>
|
64 |
<span class="sub">
|
65 |
+
<?php _e( "By default, you'll only get email reports when your site runs into trouble. Turn this option on to get reports even when your site is running smoothly.", "defender-security" ) ?>
|
66 |
</span>
|
67 |
</div>
|
68 |
<div class="column">
|
72 |
id="always_send" <?php checked( true, $setting->always_send ) ?>/>
|
73 |
<label class="toggle-label" for="always_send"></label>
|
74 |
</span>
|
75 |
+
<label><?php _e( "Send all scan report emails", "defender-security" ) ?></label>
|
76 |
</div>
|
77 |
</div>
|
78 |
<div class="columns">
|
79 |
<div class="column is-one-third">
|
80 |
+
<strong><?php _e( "Email subject", "defender-security" ) ?></strong>
|
81 |
</div>
|
82 |
<div class="column">
|
83 |
<input type="text" name="email_subject" value="<?php echo esc_attr( $setting->email_subject ) ?>"/>
|
85 |
</div>
|
86 |
<div class="columns">
|
87 |
<div class="column is-one-third">
|
88 |
+
<strong><?php _e( "Email templates", "defender-security" ) ?></strong>
|
89 |
<span class="sub">
|
90 |
+
<?php _e( "When Defender scans your website, a report will be generated with any issues that have been found. You can choose to have reports emailed to you.", "defender-security" ) ?>
|
91 |
</span>
|
92 |
</div>
|
93 |
<div class="column">
|
94 |
<ul class="dev-list">
|
95 |
<li>
|
96 |
<div>
|
97 |
+
<span class="list-label"><?php _e( "When an issue is found", "defender-security" ) ?></span>
|
98 |
<span class="list-detail tr">
|
99 |
+
<a href="#issue-found" rel="dialog" role="button"><?php _e( "Edit", "defender-security" ) ?></a></span>
|
100 |
</div>
|
101 |
</li>
|
102 |
<li>
|
103 |
<div>
|
104 |
+
<span class="list-label"><?php _e( "When no issues are found", "defender-security" ) ?></span>
|
105 |
<span class="list-detail tr">
|
106 |
<a href="#all-ok"
|
107 |
+
rel="dialog" role="button"><?php _e( "Edit", "defender-security" ) ?></a></span>
|
108 |
</div>
|
109 |
</li>
|
110 |
</ul>
|
113 |
<div class="clear line"></div>
|
114 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
115 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
116 |
+
<button class="button float-r"><?php _e( "Update Settings", "defender-security" ) ?></button>
|
117 |
<div class="clear"></div>
|
118 |
</form>
|
119 |
</div>
|
120 |
</div>
|
121 |
+
<dialog id="issue-found" title="<?php esc_attr_e( "Issues found", "defender-security" ) ?>">
|
122 |
<div class="wp-defender">
|
123 |
<form method="post" class="scan-frm scan-settings">
|
124 |
<textarea rows="12" name="email_has_issue"><?php echo $setting->email_has_issue ?></textarea>
|
125 |
<strong class="small">
|
126 |
+
<?php _e( "Available variables", "defender-security" ) ?>
|
127 |
</strong>
|
128 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
129 |
<div class="clearfix"></div>
|
135 |
<div class="clearfix mline"></div>
|
136 |
<hr class="mline"/>
|
137 |
<button type="button"
|
138 |
+
class="button button-light close"><?php _e( "Cancel", "defender-security" ) ?></button>
|
139 |
+
<button class="button float-r"><?php _e( "Save Template", "defender-security" ) ?></button>
|
140 |
</form>
|
141 |
</div>
|
142 |
</dialog>
|
143 |
+
<dialog id="all-ok" title="<?php esc_attr_e( 'All OK', "defender-security" ) ?>">
|
144 |
<div class="wp-defender">
|
145 |
<form method="post" class="scan-frm scan-settings">
|
146 |
<input type="hidden" name="action" value="saveScanSettings"/>
|
147 |
<?php wp_nonce_field( 'saveScanSettings' ) ?>
|
148 |
<textarea rows="12" name="email_all_ok"><?php echo $setting->email_all_ok ?></textarea>
|
149 |
<strong class="small">
|
150 |
+
<?php _e( "Available variables", "defender-security" ) ?>
|
151 |
</strong>
|
152 |
<div class="clearfix"></div>
|
153 |
<span class="def-tag tag-generic">{USER_NAME}</span>
|
155 |
<div class="clearfix mline"></div>
|
156 |
<hr class="mline"/>
|
157 |
<button type="button"
|
158 |
+
class="button button-light close"><?php _e( "Cancel", "defender-security" ) ?></button>
|
159 |
+
<button class="button float-r"><?php _e( "Save Template", "defender-security" ) ?></button>
|
160 |
</form>
|
161 |
</div>
|
162 |
</dialog>
|
app/view/activator-free.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<dialog id="activator">
|
2 |
<div class="activate-picker">
|
3 |
<div class="line end">
|
4 |
-
<?php _e( "Welcome to Defender! Let's quickly set up the most important security features, then you can fine tune each setting later. Our recommendations are turned on by default.",
|
5 |
</div>
|
6 |
<form method="post">
|
7 |
<input type="hidden" value="activateModule" name="action"/>
|
@@ -10,12 +10,12 @@
|
|
10 |
<div class="column is-10">
|
11 |
<strong><?php
|
12 |
if ( wp_defender()->isFree ) {
|
13 |
-
_e( "File Scanning",
|
14 |
} else {
|
15 |
-
_e( "Automatic File Scans & Reporting",
|
16 |
} ?></strong>
|
17 |
<p class="sub">
|
18 |
-
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious.",
|
19 |
</p>
|
20 |
</div>
|
21 |
<div class="column is-2">
|
@@ -30,9 +30,9 @@
|
|
30 |
</div>
|
31 |
<div class="columns">
|
32 |
<div class="column is-10">
|
33 |
-
<strong><?php _e( "IP Lockouts",
|
34 |
<p class="sub">
|
35 |
-
<?php _e( "Protect your login area and give Defender the nod to automatically lockout any suspicious behavior.",
|
36 |
</p>
|
37 |
</div>
|
38 |
<div class="column is-2">
|
@@ -46,18 +46,18 @@
|
|
46 |
<div class="columns last">
|
47 |
<div class="column is-9">
|
48 |
<p class="sub">
|
49 |
-
<?php _e( "These services will be configured with recommended settings. You can change these at any time.",
|
50 |
</p>
|
51 |
</div>
|
52 |
<div class="column is-3 tr">
|
53 |
-
<button type="submit" class="button"><?php _e( "Get Started",
|
54 |
</div>
|
55 |
</div>
|
56 |
</form>
|
57 |
</div>
|
58 |
<div class="activate-progress wd-hide">
|
59 |
<div class="line">
|
60 |
-
<?php _e( "Just a moment while Defender activates those services for you...",
|
61 |
</div>
|
62 |
<div class="well mline">
|
63 |
<div class="scan-progress">
|
1 |
<dialog id="activator">
|
2 |
<div class="activate-picker">
|
3 |
<div class="line end">
|
4 |
+
<?php _e( "Welcome to Defender! Let's quickly set up the most important security features, then you can fine tune each setting later. Our recommendations are turned on by default.", "defender-security" ) ?>
|
5 |
</div>
|
6 |
<form method="post">
|
7 |
<input type="hidden" value="activateModule" name="action"/>
|
10 |
<div class="column is-10">
|
11 |
<strong><?php
|
12 |
if ( wp_defender()->isFree ) {
|
13 |
+
_e( "File Scanning", "defender-security" );
|
14 |
} else {
|
15 |
+
_e( "Automatic File Scans & Reporting", "defender-security" );
|
16 |
} ?></strong>
|
17 |
<p class="sub">
|
18 |
+
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious.", "defender-security" ) ?>
|
19 |
</p>
|
20 |
</div>
|
21 |
<div class="column is-2">
|
30 |
</div>
|
31 |
<div class="columns">
|
32 |
<div class="column is-10">
|
33 |
+
<strong><?php _e( "IP Lockouts", "defender-security" ) ?></strong>
|
34 |
<p class="sub">
|
35 |
+
<?php _e( "Protect your login area and give Defender the nod to automatically lockout any suspicious behavior.", "defender-security" ) ?>
|
36 |
</p>
|
37 |
</div>
|
38 |
<div class="column is-2">
|
46 |
<div class="columns last">
|
47 |
<div class="column is-9">
|
48 |
<p class="sub">
|
49 |
+
<?php _e( "These services will be configured with recommended settings. You can change these at any time.", "defender-security" ) ?>
|
50 |
</p>
|
51 |
</div>
|
52 |
<div class="column is-3 tr">
|
53 |
+
<button type="submit" class="button"><?php _e( "Get Started", "defender-security" ) ?></button>
|
54 |
</div>
|
55 |
</div>
|
56 |
</form>
|
57 |
</div>
|
58 |
<div class="activate-progress wd-hide">
|
59 |
<div class="line">
|
60 |
+
<?php _e( "Just a moment while Defender activates those services for you...", "defender-security" ) ?>
|
61 |
</div>
|
62 |
<div class="well mline">
|
63 |
<div class="scan-progress">
|
app/view/activator.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<dialog id="activator">
|
2 |
<div class="activate-picker">
|
3 |
<div class="line end">
|
4 |
-
<?php _e( "Welcome to Defender Pro! Let's quickly set up the most important security features, then you can fine tune each setting later. Our recommendations are turned on by default.",
|
5 |
</div>
|
6 |
<form method="post">
|
7 |
<input type="hidden" value="activateModule" name="action"/>
|
@@ -10,12 +10,12 @@
|
|
10 |
<div class="column is-10">
|
11 |
<strong><?php
|
12 |
if ( wp_defender()->isFree ) {
|
13 |
-
_e( "File Scanning",
|
14 |
} else {
|
15 |
-
_e( "Automatic File Scans & Reporting",
|
16 |
} ?></strong>
|
17 |
<p class="sub">
|
18 |
-
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and get notified about anything suspicious.",
|
19 |
</p>
|
20 |
</div>
|
21 |
<div class="column is-2">
|
@@ -30,9 +30,9 @@
|
|
30 |
</div>
|
31 |
<div class="columns">
|
32 |
<div class="column is-10">
|
33 |
-
<strong><?php _e( "Audit Logging",
|
34 |
<p class="sub">
|
35 |
-
<?php _e( "Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes.",
|
36 |
</p>
|
37 |
</div>
|
38 |
<div class="column is-2">
|
@@ -46,9 +46,9 @@
|
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-10">
|
49 |
-
<strong><?php _e( "IP Lockouts",
|
50 |
<p class="sub">
|
51 |
-
<?php _e( "Protect your login area and give Defender the nod to automatically lockout any suspicious behavior.",
|
52 |
</p>
|
53 |
</div>
|
54 |
<div class="column is-2">
|
@@ -63,9 +63,9 @@
|
|
63 |
if ( ! is_wp_error( $blStats ) ):?>
|
64 |
<div class="columns">
|
65 |
<div class="column is-10">
|
66 |
-
<strong><?php _e( "Blacklist Monitor",
|
67 |
<p class="sub">
|
68 |
-
<?php _e( "Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email.",
|
69 |
</p>
|
70 |
</div>
|
71 |
<div class="column is-2">
|
@@ -81,18 +81,18 @@
|
|
81 |
<div class="columns last">
|
82 |
<div class="column is-9">
|
83 |
<p class="sub">
|
84 |
-
<?php _e( "These services will be configured with recommended settings. You can change these at any time.",
|
85 |
</p>
|
86 |
</div>
|
87 |
<div class="column is-3 tr">
|
88 |
-
<button type="submit" class="button"><?php _e( "Get Started",
|
89 |
</div>
|
90 |
</div>
|
91 |
</form>
|
92 |
</div>
|
93 |
<div class="activate-progress wd-hide">
|
94 |
<div class="line">
|
95 |
-
<?php _e( "Just a moment while Defender activates those services for you...",
|
96 |
</div>
|
97 |
<div class="well mline">
|
98 |
<div class="scan-progress">
|
1 |
<dialog id="activator">
|
2 |
<div class="activate-picker">
|
3 |
<div class="line end">
|
4 |
+
<?php _e( "Welcome to Defender Pro! Let's quickly set up the most important security features, then you can fine tune each setting later. Our recommendations are turned on by default.", "defender-security" ) ?>
|
5 |
</div>
|
6 |
<form method="post">
|
7 |
<input type="hidden" value="activateModule" name="action"/>
|
10 |
<div class="column is-10">
|
11 |
<strong><?php
|
12 |
if ( wp_defender()->isFree ) {
|
13 |
+
_e( "File Scanning", "defender-security" );
|
14 |
} else {
|
15 |
+
_e( "Automatic File Scans & Reporting", "defender-security" );
|
16 |
} ?></strong>
|
17 |
<p class="sub">
|
18 |
+
<?php _e( "Scan your website for file changes, vulnerabilities and injected code and get and get notified about anything suspicious.", "defender-security" ) ?>
|
19 |
</p>
|
20 |
</div>
|
21 |
<div class="column is-2">
|
30 |
</div>
|
31 |
<div class="columns">
|
32 |
<div class="column is-10">
|
33 |
+
<strong><?php _e( "Audit Logging", "defender-security" ) ?></strong>
|
34 |
<p class="sub">
|
35 |
+
<?php _e( "Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes.", "defender-security" ) ?>
|
36 |
</p>
|
37 |
</div>
|
38 |
<div class="column is-2">
|
46 |
</div>
|
47 |
<div class="columns">
|
48 |
<div class="column is-10">
|
49 |
+
<strong><?php _e( "IP Lockouts", "defender-security" ) ?></strong>
|
50 |
<p class="sub">
|
51 |
+
<?php _e( "Protect your login area and give Defender the nod to automatically lockout any suspicious behavior.", "defender-security" ) ?>
|
52 |
</p>
|
53 |
</div>
|
54 |
<div class="column is-2">
|
63 |
if ( ! is_wp_error( $blStats ) ):?>
|
64 |
<div class="columns">
|
65 |
<div class="column is-10">
|
66 |
+
<strong><?php _e( "Blacklist Monitor", "defender-security" ) ?></strong>
|
67 |
<p class="sub">
|
68 |
+
<?php _e( "Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email.", "defender-security" ) ?>
|
69 |
</p>
|
70 |
</div>
|
71 |
<div class="column is-2">
|
81 |
<div class="columns last">
|
82 |
<div class="column is-9">
|
83 |
<p class="sub">
|
84 |
+
<?php _e( "These services will be configured with recommended settings. You can change these at any time.", "defender-security" ) ?>
|
85 |
</p>
|
86 |
</div>
|
87 |
<div class="column is-3 tr">
|
88 |
+
<button type="submit" class="button"><?php _e( "Get Started", "defender-security" ) ?></button>
|
89 |
</div>
|
90 |
</div>
|
91 |
</form>
|
92 |
</div>
|
93 |
<div class="activate-progress wd-hide">
|
94 |
<div class="line">
|
95 |
+
<?php _e( "Just a moment while Defender activates those services for you...", "defender-security" ) ?>
|
96 |
</div>
|
97 |
<div class="well mline">
|
98 |
<div class="scan-progress">
|
app/view/dashboard.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="wrap">
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="def-dashboard">
|
4 |
-
<h2 class="title"><?php _e( "Dashboard",
|
5 |
<div class="dev-box summary-box">
|
6 |
<div class="box-content">
|
7 |
<div class="columns">
|
@@ -13,37 +13,37 @@
|
|
13 |
?></h5>
|
14 |
<?php if ( $countAll == 0 ): ?>
|
15 |
<span class=""
|
16 |
-
tooltip="<?php esc_attr_e( 'You have no outstanding security issues.',
|
17 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
18 |
<?php else: ?>
|
19 |
<?php
|
20 |
if ( $sCount > 0 && $hCount > 0 ) :
|
21 |
?>
|
22 |
<span class=""
|
23 |
-
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d security tweak(s) and %d suspicious file(s) needing attention.',
|
24 |
<?php elseif ( $hCount > 0 ): ?>
|
25 |
<span class=""
|
26 |
-
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d security tweak(s) needing attention.',
|
27 |
<?php elseif ( $sCount > 0 ): ?>
|
28 |
<span class=""
|
29 |
-
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d suspicious file(s) needing attention.',
|
30 |
<?php else: ?>
|
31 |
<span class=""
|
32 |
-
tooltip="<?php esc_attr_e( 'You have no outstanding security issues.',
|
33 |
<?php endif; ?>
|
34 |
<i class="def-icon icon-warning icon-yellow <?php echo $sCount > 0 ? 'fill-red' : null ?>" aria-hidden="true"></i>
|
35 |
<?php endif; ?>
|
36 |
</span>
|
37 |
<div class="clear"></div>
|
38 |
<span class="sub"><?php
|
39 |
-
_e( "security issues",
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="column is-5">
|
43 |
<ul class="dev-list bold">
|
44 |
<li>
|
45 |
<div>
|
46 |
-
<span class="list-label"><?php _e( "Security tweaks actioned",
|
47 |
<span class="list-detail"><span>
|
48 |
<?php
|
49 |
$settings = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
@@ -55,7 +55,7 @@
|
|
55 |
</li>
|
56 |
<li>
|
57 |
<div>
|
58 |
-
<span class="list-label"><?php _e( "File Scan Issues",
|
59 |
<span class="list-detail">
|
60 |
<?php echo $controller->renderScanStatusText() ?>
|
61 |
</span>
|
@@ -81,17 +81,17 @@
|
|
81 |
<?php if ( wp_defender()->isFree ): ?>
|
82 |
<div class="dev-box dev-team">
|
83 |
<div class="box-title">
|
84 |
-
<h3><?php _e( "TRY PRO FEATURES FOR FREE!",
|
85 |
</div>
|
86 |
<div class="box-content tc">
|
87 |
<div class="line">
|
88 |
-
<?php _e( "Upgrade to Defender Pro to unlock Advanced File Scanning, Blacklist Monitoring, Audit Logging and automated reporting for Audit Logging, IP Lockouts and File Scans.",
|
89 |
</div>
|
90 |
<div class="line">
|
91 |
-
<?php _e( "Get all this as part of a WPMU DEV Membership, and the best part is you can try everything absolutely free.",
|
92 |
</div>
|
93 |
<a href="https://premium.wpmudev.org/project/wp-defender/" target="_blank"
|
94 |
-
class="button button-green"><?php _e( "FIND OUT MORE",
|
95 |
</div>
|
96 |
</div>
|
97 |
<?php endif; ?>
|
1 |
<div class="wrap">
|
2 |
<div id="wp-defender" class="wp-defender">
|
3 |
<div class="def-dashboard">
|
4 |
+
<h2 class="title"><?php _e( "Dashboard", "defender-security" ) ?></h2>
|
5 |
<div class="dev-box summary-box">
|
6 |
<div class="box-content">
|
7 |
<div class="columns">
|
13 |
?></h5>
|
14 |
<?php if ( $countAll == 0 ): ?>
|
15 |
<span class=""
|
16 |
+
tooltip="<?php esc_attr_e( 'You have no outstanding security issues.', "defender-security" ); ?>">
|
17 |
<i class="def-icon icon-tick" aria-hidden="true"></i>
|
18 |
<?php else: ?>
|
19 |
<?php
|
20 |
if ( $sCount > 0 && $hCount > 0 ) :
|
21 |
?>
|
22 |
<span class=""
|
23 |
+
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d security tweak(s) and %d suspicious file(s) needing attention.', "defender-security" ), $hCount, $sCount ) ); ?>">
|
24 |
<?php elseif ( $hCount > 0 ): ?>
|
25 |
<span class=""
|
26 |
+
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d security tweak(s) needing attention.', "defender-security" ), $hCount ) ); ?>">
|
27 |
<?php elseif ( $sCount > 0 ): ?>
|
28 |
<span class=""
|
29 |
+
tooltip="<?php esc_attr_e( sprintf( __( 'You have %d suspicious file(s) needing attention.', "defender-security" ), $sCount ) ); ?>">
|
30 |
<?php else: ?>
|
31 |
<span class=""
|
32 |
+
tooltip="<?php esc_attr_e( 'You have no outstanding security issues.', "defender-security" ); ?>">
|
33 |
<?php endif; ?>
|
34 |
<i class="def-icon icon-warning icon-yellow <?php echo $sCount > 0 ? 'fill-red' : null ?>" aria-hidden="true"></i>
|
35 |
<?php endif; ?>
|
36 |
</span>
|
37 |
<div class="clear"></div>
|
38 |
<span class="sub"><?php
|
39 |
+
_e( "security issues", "defender-security" ) ?></span>
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="column is-5">
|
43 |
<ul class="dev-list bold">
|
44 |
<li>
|
45 |
<div>
|
46 |
+
<span class="list-label"><?php _e( "Security tweaks actioned", "defender-security" ) ?></span>
|
47 |
<span class="list-detail"><span>
|
48 |
<?php
|
49 |
$settings = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
55 |
</li>
|
56 |
<li>
|
57 |
<div>
|
58 |
+
<span class="list-label"><?php _e( "File Scan Issues", "defender-security" ) ?></span>
|
59 |
<span class="list-detail">
|
60 |
<?php echo $controller->renderScanStatusText() ?>
|
61 |
</span>
|
81 |
<?php if ( wp_defender()->isFree ): ?>
|
82 |
<div class="dev-box dev-team">
|
83 |
<div class="box-title">
|
84 |
+
<h3><?php _e( "TRY PRO FEATURES FOR FREE!", "defender-security" ) ?></h3>
|
85 |
</div>
|
86 |
<div class="box-content tc">
|
87 |
<div class="line">
|
88 |
+
<?php _e( "Upgrade to Defender Pro to unlock Advanced File Scanning, Blacklist Monitoring, Audit Logging and automated reporting for Audit Logging, IP Lockouts and File Scans.", "defender-security" ) ?>
|
89 |
</div>
|
90 |
<div class="line">
|
91 |
+
<?php _e( "Get all this as part of a WPMU DEV Membership, and the best part is you can try everything absolutely free.", "defender-security" ) ?>
|
92 |
</div>
|
93 |
<a href="https://premium.wpmudev.org/project/wp-defender/" target="_blank"
|
94 |
+
class="button button-green"><?php _e( "FIND OUT MORE", "defender-security" ) ?></a>
|
95 |
</div>
|
96 |
</div>
|
97 |
<?php endif; ?>
|
app/view/pro-feature.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features",
|
2 |
<div class="wp-defender">
|
3 |
-
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;",
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
-
<strong><?php _e( "Automatic Full File Scans & Notifications",
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
-
issues arise.",
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
-
<strong><?php _e( "Advanced File Scanning",
|
16 |
<p class="sub">
|
17 |
-
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.",
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
-
<strong><?php _e( "Audit Logging",
|
23 |
<p class="sub">
|
24 |
-
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.",
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
-
<strong><?php _e( "Tailored Reporting",
|
30 |
<p class="sub">
|
31 |
-
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.",
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
-
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free",
|
36 |
-
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.",
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
1 |
+
<dialog class="dev-team" id="pro-feature" title="<?php _e( "Defender Pro Features", "defender-security" ) ?>">
|
2 |
<div class="wp-defender">
|
3 |
+
<p class=""><?php _e( "Here’s what you’ll get by upgrading to Defender Pro;", "defender-security" ) ?></p>
|
4 |
<div class="well well-blank with-cap">
|
5 |
<i class="def-icon icon-tick fill-blue"></i>
|
6 |
+
<strong><?php _e( "Automatic Full File Scans & Notifications", "defender-security" ) ?></strong>
|
7 |
<p class="sub">
|
8 |
<?php _e( "Schedule Defender to automatically run a full file scan daily, weekly or monthly and get email reports
|
9 |
when
|
10 |
+
issues arise.", "defender-security" ) ?>
|
11 |
</p>
|
12 |
</div>
|
13 |
<div class="well well-blank with-cap">
|
14 |
<i class="def-icon icon-tick fill-blue"></i>
|
15 |
+
<strong><?php _e( "Advanced File Scanning", "defender-security" ) ?></strong>
|
16 |
<p class="sub">
|
17 |
+
<?php _e( "Defender will go beyond just plugins and themes and scan your entire file system for suspicious code.", "defender-security" ) ?>
|
18 |
</p>
|
19 |
</div>
|
20 |
<div class="well well-blank with-cap">
|
21 |
<i class="def-icon icon-tick fill-blue"></i>
|
22 |
+
<strong><?php _e( "Audit Logging", "defender-security" ) ?></strong>
|
23 |
<p class="sub">
|
24 |
+
<?php _e( "Track and log each and every event when changes are made to your website and get detailed reports on what’s going on behind the scenes, including any hacking attempts on your site.", "defender-security" ) ?>
|
25 |
</p>
|
26 |
</div>
|
27 |
<div class="well well-blank with-cap mline">
|
28 |
<i class="def-icon icon-tick fill-blue"></i>
|
29 |
+
<strong><?php _e( "Tailored Reporting", "defender-security" ) ?></strong>
|
30 |
<p class="sub">
|
31 |
+
<?php _e( "Get tailored security reports for File Scanning, Audit Logging and IP Lockouts delivered to your inbox so you don’t have to worry about checking in.", "defender-security" ) ?>
|
32 |
</p>
|
33 |
</div>
|
34 |
<div class="tc">
|
35 |
+
<a class="button button-green mline" href="https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_modal_upgrade"><?php _e( "Get Defender Pro for Free", "defender-security" ) ?></a>
|
36 |
+
<p class="is-marginless"><?php _e( "As part part of a WPMU DEV free trial.", "defender-security" ) ?></p>
|
37 |
</div>
|
38 |
</div>
|
39 |
</dialog>
|
app/view/requirement.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
<dialog id="requirement">
|
10 |
<div class="line">
|
11 |
<?php _e( "Defender is currently scanning your files for malicious code, please be patient this should on take a
|
12 |
-
few minutes depending on the size of your website.",
|
13 |
</div>
|
14 |
|
15 |
</dialog>
|
9 |
<dialog id="requirement">
|
10 |
<div class="line">
|
11 |
<?php _e( "Defender is currently scanning your files for malicious code, please be patient this should on take a
|
12 |
+
few minutes depending on the size of your website.", "defender-security" ) ?>
|
13 |
</div>
|
14 |
|
15 |
</dialog>
|
app/view/settings.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div class="wp-defender">
|
4 |
<div class="wd-settings">
|
5 |
<section id="header">
|
6 |
-
<h1 class="tl"><?php esc_html_e( "Settings",
|
7 |
</section>
|
8 |
<?php if ( $controller->has_flash( 'updated' ) ): ?>
|
9 |
<div class="wd-success wd-left">
|
@@ -16,16 +16,16 @@
|
|
16 |
<?php endif; ?>
|
17 |
<section class="dev-box">
|
18 |
<div class="box-title">
|
19 |
-
<h3><?php esc_html_e( "General Settings",
|
20 |
</div>
|
21 |
<div class="box-content">
|
22 |
<form method="post">
|
23 |
<div class="row setting-field">
|
24 |
<div class="col-left">
|
25 |
-
<label><?php esc_html_e( "Scan types",
|
26 |
|
27 |
<div class="setting-description">
|
28 |
-
<?php esc_html_e( "By default we recommend running all scans but you can turn these off if you choose",
|
29 |
<div class="wd-clearfix"></div>
|
30 |
<br/>
|
31 |
</div>
|
@@ -34,10 +34,10 @@
|
|
34 |
<div class="group">
|
35 |
<?php
|
36 |
$key = 'use_' . WD_Scan_Api::SCAN_CORE_INTEGRITY . '_scan';
|
37 |
-
$tooltip = WD_Utils::get_setting( $key ) == 1 ? esc_html__( "Disable This Scan",
|
38 |
?>
|
39 |
<div class="col span_4_of_12">
|
40 |
-
<label><?php esc_html_e( "WP Core Integrity",
|
41 |
</div>
|
42 |
<div class="col span_8_of_12">
|
43 |
<div class="group">
|
@@ -52,7 +52,7 @@
|
|
52 |
</div>
|
53 |
<div class="col span_11_of_12">
|
54 |
<small class="">
|
55 |
-
<?php esc_html_e( "Defender checks for any modifications or additions to WP core files.",
|
56 |
</small>
|
57 |
</div>
|
58 |
</div>
|
@@ -62,14 +62,14 @@
|
|
62 |
</div>
|
63 |
<div class="group wd-relative-position">
|
64 |
<div class="col span_4_of_12">
|
65 |
-
<label><?php esc_html_e( "Plugin & Theme Vulnerabilities",
|
66 |
</div>
|
67 |
<div class="col span_8_of_12">
|
68 |
<div class="group">
|
69 |
<div class="col span_1_of_12">
|
70 |
<?php
|
71 |
$key = 'use_' . WD_Scan_Api::SCAN_VULN_DB . '_scan';
|
72 |
-
$tooltip = WD_Utils::get_setting( 'use_' . WD_Scan_Api::SCAN_VULN_DB . '_scan' ) == 1 ? esc_html__( "Disable This Scan",
|
73 |
?>
|
74 |
<span class="toggle"
|
75 |
tooltip="<?php echo esc_attr( $tooltip ) ?>">
|
@@ -81,28 +81,28 @@
|
|
81 |
</div>
|
82 |
<div class="col span_11_of_12">
|
83 |
<small>
|
84 |
-
<?php esc_html_e( "Defender looks for published vulnerabilities in your installed plugins and themes.",
|
85 |
</small>
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
89 |
<?php if ( WD_Utils::get_dev_api() == false ): ?>
|
90 |
<div
|
91 |
-
tooltip="<?php esc_attr_e( "WPMU DEV Dashboard is required for this scan",
|
92 |
class="wd-overlay"></div>
|
93 |
<?php endif; ?>
|
94 |
<div class="wd-clear"></div>
|
95 |
</div>
|
96 |
<div class="group wd-relative-position">
|
97 |
<div class="col span_4_of_12">
|
98 |
-
<label><?php esc_html_e( "Suspicious Code",
|
99 |
</div>
|
100 |
<div class="col span_8_of_12">
|
101 |
<div class="group">
|
102 |
<div class="col span_1_of_12">
|
103 |
<?php
|
104 |
$key = 'use_' . WD_Scan_Api::SCAN_SUSPICIOUS_FILE . '_scan';
|
105 |
-
$tooltip = WD_Utils::get_setting( $key ) == 1 ? esc_html__( "Disable This Scan",
|
106 |
?>
|
107 |
<span class="toggle"
|
108 |
tooltip="<?php echo esc_attr( $tooltip ) ?>">
|
@@ -114,14 +114,14 @@
|
|
114 |
</div>
|
115 |
<div class="col span_11_of_12">
|
116 |
<small>
|
117 |
-
<?php esc_html_e( "Defender looks inside all of your files for suspicious and potentially harmful code.",
|
118 |
</small>
|
119 |
</div>
|
120 |
</div>
|
121 |
</div>
|
122 |
<?php if ( WD_Utils::get_dev_api() == false ): ?>
|
123 |
<div
|
124 |
-
tooltip="<?php esc_attr_e( "WPMU DEV Dashboard is required for this scan",
|
125 |
class="wd-overlay"></div>
|
126 |
<?php endif; ?>
|
127 |
<div class="wd-clearfix"></div>
|
@@ -131,10 +131,10 @@
|
|
131 |
</div>
|
132 |
<div class="row setting-field">
|
133 |
<div class="col-left">
|
134 |
-
<label><?php esc_html_e( "Max included file size (MB)",
|
135 |
|
136 |
<div class="setting-description">
|
137 |
-
<?php esc_html_e( "Defender will skip any files larger than this size. The smaller this number is the faster Defender can scan through your system.",
|
138 |
<div class="wd-clearfix"></div>
|
139 |
<br/>
|
140 |
</div>
|
@@ -151,10 +151,10 @@
|
|
151 |
</div>
|
152 |
<div class="row setting-field">
|
153 |
<div class="col-left">
|
154 |
-
<label><?php esc_html_e( "Enable all email reports",
|
155 |
|
156 |
<div class="setting-description">
|
157 |
-
<?php esc_html_e( "By default, Defender will email you when it runs into trouble on your site. Enabling this option will ensure you are always kept up-to-date, even when your site is running smoothly.",
|
158 |
<div class="wd-clearfix"></div>
|
159 |
<br/>
|
160 |
</div>
|
@@ -164,7 +164,7 @@
|
|
164 |
<div class="col span_4_of_12">
|
165 |
<?php
|
166 |
$key = 'always_notify';
|
167 |
-
//$tooltip = WD_Utils::get_setting( $key, 0 ) == 1 ? esc_html__( "Send only problem",
|
168 |
?>
|
169 |
<span class="toggle">
|
170 |
<input type="checkbox" class="toggle-checkbox"
|
@@ -184,7 +184,7 @@
|
|
184 |
<div class="wd-clearfix"></div>
|
185 |
<div class="wd-right">
|
186 |
<button type="submit" class="button wd-button">
|
187 |
-
<?php esc_html_e( "Save Settings",
|
188 |
</button>
|
189 |
</div>
|
190 |
</form>
|
@@ -193,23 +193,23 @@
|
|
193 |
</section>
|
194 |
<section class="dev-box">
|
195 |
<div class="box-title">
|
196 |
-
<h3><?php esc_html_e( "Email Recipients",
|
197 |
</div>
|
198 |
<div class="box-content">
|
199 |
<form id="email-recipients-frm">
|
200 |
<p>
|
201 |
-
<?php esc_html_e( "Choose which of your website’s users will receive scan report results to their email inboxes.",
|
202 |
</p>
|
203 |
<div class="wd-error wd-hide"></div>
|
204 |
<div class="wd-clear"></div>
|
205 |
<br/>
|
206 |
<?php echo $controller->display_recipients() ?>
|
207 |
<input name="username" id="email-recipient" class="user-search"
|
208 |
-
data-empty-msg="<?php esc_attr_e( "We did not find an admin user with this name...",
|
209 |
-
placeholder="<?php esc_attr_e( "Type a user’s name",
|
210 |
type="search"/>
|
211 |
<button type="submit" disabled="disabled"
|
212 |
-
class="button wd-button"><?php esc_html_e( "Add",
|
213 |
<div class="clearfix"></div>
|
214 |
<input type="hidden" name="action" value="wd_add_recipient">
|
215 |
<?php wp_nonce_field( 'wd_add_recipient', 'wd_settings_nonce' ) ?>
|
@@ -218,15 +218,15 @@
|
|
218 |
</section>
|
219 |
<section class="dev-box">
|
220 |
<div class="box-title">
|
221 |
-
<h3><?php esc_html_e( "Email Templates",
|
222 |
</div>
|
223 |
<div class="box-content">
|
224 |
<p>
|
225 |
-
<?php esc_html_e( "When Defender scans this website it will generate a report of any issues. You can choose to email those notifications to a particular email address and change the copy below.",
|
226 |
</p>
|
227 |
|
228 |
<p>
|
229 |
-
<?php esc_html_e( "Available variables",
|
230 |
</p>
|
231 |
|
232 |
<div class="wd-well">
|
@@ -235,7 +235,7 @@
|
|
235 |
<p>{USER_NAME}</p>
|
236 |
</div>
|
237 |
<div class="col span_8_of_12">
|
238 |
-
<?php esc_html_e( "We’ll grab the users first name, or display name is first name isn’t available",
|
239 |
</div>
|
240 |
</div>
|
241 |
<div class="wd-clearfix"></div>
|
@@ -244,7 +244,7 @@
|
|
244 |
<p>{ISSUES_COUNT}</p>
|
245 |
</div>
|
246 |
<div class="col span_8_of_12">
|
247 |
-
<?php esc_html_e( "The number of issues Defender found",
|
248 |
</div>
|
249 |
</div>
|
250 |
<div class="wd-clearfix"></div>
|
@@ -253,7 +253,7 @@
|
|
253 |
<p>{ISSUES_LIST}</p>
|
254 |
</div>
|
255 |
<div class="col span_8_of_12">
|
256 |
-
<?php esc_html_e( "The list of issues",
|
257 |
</div>
|
258 |
</div>
|
259 |
<div class="wd-clearfix"></div>
|
@@ -262,7 +262,7 @@
|
|
262 |
<p>{SCAN_PAGE_LINK}</p>
|
263 |
</div>
|
264 |
<div class="col span_8_of_12">
|
265 |
-
<?php esc_html_e( "A link back to the Scans tab of this website",
|
266 |
</div>
|
267 |
</div>
|
268 |
</div>
|
@@ -272,7 +272,7 @@
|
|
272 |
<div class="setting-field">
|
273 |
<div class="col-left">
|
274 |
<label
|
275 |
-
for="completed_scan_email_subject"><?php esc_html_e( "Subject",
|
276 |
</div>
|
277 |
<div class="col-right">
|
278 |
<input type="text" id="completed_scan_email_subject"
|
@@ -284,10 +284,10 @@
|
|
284 |
<div class="setting-field">
|
285 |
<div class="col-left">
|
286 |
<label
|
287 |
-
for="completed_scan_email_content_error"><?php esc_html_e( "Issues found",
|
288 |
|
289 |
<div class="setting-description">
|
290 |
-
<?php esc_html_e( "When an issue has been found during an automated scan, Defender will send this email to your recipients.",
|
291 |
<div class="wd-clearfix"></div>
|
292 |
<br/>
|
293 |
</div>
|
@@ -301,10 +301,10 @@
|
|
301 |
<div class="setting-field">
|
302 |
<div class="col-left">
|
303 |
<label for="completed_scan_email_content_success">
|
304 |
-
<?php esc_html_e( "All OK",
|
305 |
|
306 |
<div class="setting-description">
|
307 |
-
<?php esc_html_e( "When there are no issues detected by the scan your recipients will receive this email.",
|
308 |
<div class="wd-clearfix"></div>
|
309 |
<br/>
|
310 |
</div>
|
@@ -323,7 +323,7 @@
|
|
323 |
|
324 |
<div class="wd-right">
|
325 |
<button type="submit" class="button wd-button">
|
326 |
-
<?php esc_html_e( "Save Settings",
|
327 |
</button>
|
328 |
</div>
|
329 |
</form>
|
3 |
<div class="wp-defender">
|
4 |
<div class="wd-settings">
|
5 |
<section id="header">
|
6 |
+
<h1 class="tl"><?php esc_html_e( "Settings", "defender-security" ) ?></h1>
|
7 |
</section>
|
8 |
<?php if ( $controller->has_flash( 'updated' ) ): ?>
|
9 |
<div class="wd-success wd-left">
|
16 |
<?php endif; ?>
|
17 |
<section class="dev-box">
|
18 |
<div class="box-title">
|
19 |
+
<h3><?php esc_html_e( "General Settings", "defender-security" ) ?></h3>
|
20 |
</div>
|
21 |
<div class="box-content">
|
22 |
<form method="post">
|
23 |
<div class="row setting-field">
|
24 |
<div class="col-left">
|
25 |
+
<label><?php esc_html_e( "Scan types", "defender-security" ) ?></label>
|
26 |
|
27 |
<div class="setting-description">
|
28 |
+
<?php esc_html_e( "By default we recommend running all scans but you can turn these off if you choose", "defender-security" ) ?>
|
29 |
<div class="wd-clearfix"></div>
|
30 |
<br/>
|
31 |
</div>
|
34 |
<div class="group">
|
35 |
<?php
|
36 |
$key = 'use_' . WD_Scan_Api::SCAN_CORE_INTEGRITY . '_scan';
|
37 |
+
$tooltip = WD_Utils::get_setting( $key ) == 1 ? esc_html__( "Disable This Scan", "defender-security" ) : esc_html__( "Enable This Scan", "defender-security" );
|
38 |
?>
|
39 |
<div class="col span_4_of_12">
|
40 |
+
<label><?php esc_html_e( "WP Core Integrity", "defender-security" ) ?></label>
|
41 |
</div>
|
42 |
<div class="col span_8_of_12">
|
43 |
<div class="group">
|
52 |
</div>
|
53 |
<div class="col span_11_of_12">
|
54 |
<small class="">
|
55 |
+
<?php esc_html_e( "Defender checks for any modifications or additions to WP core files.", "defender-security" ) ?>
|
56 |
</small>
|
57 |
</div>
|
58 |
</div>
|
62 |
</div>
|
63 |
<div class="group wd-relative-position">
|
64 |
<div class="col span_4_of_12">
|
65 |
+
<label><?php esc_html_e( "Plugin & Theme Vulnerabilities", "defender-security" ) ?></label>
|
66 |
</div>
|
67 |
<div class="col span_8_of_12">
|
68 |
<div class="group">
|
69 |
<div class="col span_1_of_12">
|
70 |
<?php
|
71 |
$key = 'use_' . WD_Scan_Api::SCAN_VULN_DB . '_scan';
|
72 |
+
$tooltip = WD_Utils::get_setting( 'use_' . WD_Scan_Api::SCAN_VULN_DB . '_scan' ) == 1 ? esc_html__( "Disable This Scan", "defender-security" ) : esc_html__( "Enable This Scan", "defender-security" );
|
73 |
?>
|
74 |
<span class="toggle"
|
75 |
tooltip="<?php echo esc_attr( $tooltip ) ?>">
|
81 |
</div>
|
82 |
<div class="col span_11_of_12">
|
83 |
<small>
|
84 |
+
<?php esc_html_e( "Defender looks for published vulnerabilities in your installed plugins and themes.", "defender-security" ) ?>
|
85 |
</small>
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
89 |
<?php if ( WD_Utils::get_dev_api() == false ): ?>
|
90 |
<div
|
91 |
+
tooltip="<?php esc_attr_e( "WPMU DEV Dashboard is required for this scan", "defender-security" ) ?>"
|
92 |
class="wd-overlay"></div>
|
93 |
<?php endif; ?>
|
94 |
<div class="wd-clear"></div>
|
95 |
</div>
|
96 |
<div class="group wd-relative-position">
|
97 |
<div class="col span_4_of_12">
|
98 |
+
<label><?php esc_html_e( "Suspicious Code", "defender-security" ) ?></label>
|
99 |
</div>
|
100 |
<div class="col span_8_of_12">
|
101 |
<div class="group">
|
102 |
<div class="col span_1_of_12">
|
103 |
<?php
|
104 |
$key = 'use_' . WD_Scan_Api::SCAN_SUSPICIOUS_FILE . '_scan';
|
105 |
+
$tooltip = WD_Utils::get_setting( $key ) == 1 ? esc_html__( "Disable This Scan", "defender-security" ) : esc_html__( "Enable This Scan", "defender-security" );
|
106 |
?>
|
107 |
<span class="toggle"
|
108 |
tooltip="<?php echo esc_attr( $tooltip ) ?>">
|
114 |
</div>
|
115 |
<div class="col span_11_of_12">
|
116 |
<small>
|
117 |
+
<?php esc_html_e( "Defender looks inside all of your files for suspicious and potentially harmful code.", "defender-security" ) ?>
|
118 |
</small>
|
119 |
</div>
|
120 |
</div>
|
121 |
</div>
|
122 |
<?php if ( WD_Utils::get_dev_api() == false ): ?>
|
123 |
<div
|
124 |
+
tooltip="<?php esc_attr_e( "WPMU DEV Dashboard is required for this scan", "defender-security" ) ?>"
|
125 |
class="wd-overlay"></div>
|
126 |
<?php endif; ?>
|
127 |
<div class="wd-clearfix"></div>
|
131 |
</div>
|
132 |
<div class="row setting-field">
|
133 |
<div class="col-left">
|
134 |
+
<label><?php esc_html_e( "Max included file size (MB)", "defender-security" ) ?></label>
|
135 |
|
136 |
<div class="setting-description">
|
137 |
+
<?php esc_html_e( "Defender will skip any files larger than this size. The smaller this number is the faster Defender can scan through your system.", "defender-security" ) ?>
|
138 |
<div class="wd-clearfix"></div>
|
139 |
<br/>
|
140 |
</div>
|
151 |
</div>
|
152 |
<div class="row setting-field">
|
153 |
<div class="col-left">
|
154 |
+
<label><?php esc_html_e( "Enable all email reports", "defender-security" ) ?></label>
|
155 |
|
156 |
<div class="setting-description">
|
157 |
+
<?php esc_html_e( "By default, Defender will email you when it runs into trouble on your site. Enabling this option will ensure you are always kept up-to-date, even when your site is running smoothly.", "defender-security" ) ?>
|
158 |
<div class="wd-clearfix"></div>
|
159 |
<br/>
|
160 |
</div>
|
164 |
<div class="col span_4_of_12">
|
165 |
<?php
|
166 |
$key = 'always_notify';
|
167 |
+
//$tooltip = WD_Utils::get_setting( $key, 0 ) == 1 ? esc_html__( "Send only problem", "defender-security" ) : esc_html__( "Always send", "defender-security" );
|
168 |
?>
|
169 |
<span class="toggle">
|
170 |
<input type="checkbox" class="toggle-checkbox"
|
184 |
<div class="wd-clearfix"></div>
|
185 |
<div class="wd-right">
|
186 |
<button type="submit" class="button wd-button">
|
187 |
+
<?php esc_html_e( "Save Settings", "defender-security" ) ?>
|
188 |
</button>
|
189 |
</div>
|
190 |
</form>
|
193 |
</section>
|
194 |
<section class="dev-box">
|
195 |
<div class="box-title">
|
196 |
+
<h3><?php esc_html_e( "Email Recipients", "defender-security" ) ?></h3>
|
197 |
</div>
|
198 |
<div class="box-content">
|
199 |
<form id="email-recipients-frm">
|
200 |
<p>
|
201 |
+
<?php esc_html_e( "Choose which of your website’s users will receive scan report results to their email inboxes.", "defender-security" ) ?>
|
202 |
</p>
|
203 |
<div class="wd-error wd-hide"></div>
|
204 |
<div class="wd-clear"></div>
|
205 |
<br/>
|
206 |
<?php echo $controller->display_recipients() ?>
|
207 |
<input name="username" id="email-recipient" class="user-search"
|
208 |
+
data-empty-msg="<?php esc_attr_e( "We did not find an admin user with this name...", "defender-security" ) ?>"
|
209 |
+
placeholder="<?php esc_attr_e( "Type a user’s name", "defender-security" ) ?>"
|
210 |
type="search"/>
|
211 |
<button type="submit" disabled="disabled"
|
212 |
+
class="button wd-button"><?php esc_html_e( "Add", "defender-security" ) ?></button>
|
213 |
<div class="clearfix"></div>
|
214 |
<input type="hidden" name="action" value="wd_add_recipient">
|
215 |
<?php wp_nonce_field( 'wd_add_recipient', 'wd_settings_nonce' ) ?>
|
218 |
</section>
|
219 |
<section class="dev-box">
|
220 |
<div class="box-title">
|
221 |
+
<h3><?php esc_html_e( "Email Templates", "defender-security" ) ?></h3>
|
222 |
</div>
|
223 |
<div class="box-content">
|
224 |
<p>
|
225 |
+
<?php esc_html_e( "When Defender scans this website it will generate a report of any issues. You can choose to email those notifications to a particular email address and change the copy below.", "defender-security" ) ?>
|
226 |
</p>
|
227 |
|
228 |
<p>
|
229 |
+
<?php esc_html_e( "Available variables", "defender-security" ) ?>
|
230 |
</p>
|
231 |
|
232 |
<div class="wd-well">
|
235 |
<p>{USER_NAME}</p>
|
236 |
</div>
|
237 |
<div class="col span_8_of_12">
|
238 |
+
<?php esc_html_e( "We’ll grab the users first name, or display name is first name isn’t available", "defender-security" ) ?>
|
239 |
</div>
|
240 |
</div>
|
241 |
<div class="wd-clearfix"></div>
|
244 |
<p>{ISSUES_COUNT}</p>
|
245 |
</div>
|
246 |
<div class="col span_8_of_12">
|
247 |
+
<?php esc_html_e( "The number of issues Defender found", "defender-security" ) ?>
|
248 |
</div>
|
249 |
</div>
|
250 |
<div class="wd-clearfix"></div>
|
253 |
<p>{ISSUES_LIST}</p>
|
254 |
</div>
|
255 |
<div class="col span_8_of_12">
|
256 |
+
<?php esc_html_e( "The list of issues", "defender-security" ) ?><br/>
|
257 |
</div>
|
258 |
</div>
|
259 |
<div class="wd-clearfix"></div>
|
262 |
<p>{SCAN_PAGE_LINK}</p>
|
263 |
</div>
|
264 |
<div class="col span_8_of_12">
|
265 |
+
<?php esc_html_e( "A link back to the Scans tab of this website", "defender-security" ) ?>
|
266 |
</div>
|
267 |
</div>
|
268 |
</div>
|
272 |
<div class="setting-field">
|
273 |
<div class="col-left">
|
274 |
<label
|
275 |
+
for="completed_scan_email_subject"><?php esc_html_e( "Subject", "defender-security" ) ?></label>
|
276 |
</div>
|
277 |
<div class="col-right">
|
278 |
<input type="text" id="completed_scan_email_subject"
|
284 |
<div class="setting-field">
|
285 |
<div class="col-left">
|
286 |
<label
|
287 |
+
for="completed_scan_email_content_error"><?php esc_html_e( "Issues found", "defender-security" ) ?></label>
|
288 |
|
289 |
<div class="setting-description">
|
290 |
+
<?php esc_html_e( "When an issue has been found during an automated scan, Defender will send this email to your recipients.", "defender-security" ) ?>
|
291 |
<div class="wd-clearfix"></div>
|
292 |
<br/>
|
293 |
</div>
|
301 |
<div class="setting-field">
|
302 |
<div class="col-left">
|
303 |
<label for="completed_scan_email_content_success">
|
304 |
+
<?php esc_html_e( "All OK", "defender-security" ) ?></label>
|
305 |
|
306 |
<div class="setting-description">
|
307 |
+
<?php esc_html_e( "When there are no issues detected by the scan your recipients will receive this email.", "defender-security" ) ?>
|
308 |
<div class="wd-clearfix"></div>
|
309 |
<br/>
|
310 |
</div>
|
323 |
|
324 |
<div class="wd-right">
|
325 |
<button type="submit" class="button wd-button">
|
326 |
+
<?php esc_html_e( "Save Settings", "defender-security" ) ?>
|
327 |
</button>
|
328 |
</div>
|
329 |
</form>
|
assets/css/styles.css
CHANGED
@@ -1457,7 +1457,13 @@
|
|
1457 |
color: #AAAAAA;
|
1458 |
font-size: 13px; }
|
1459 |
.wp-defender .well.well-small {
|
1460 |
-
padding:
|
|
|
|
|
|
|
|
|
|
|
|
|
1461 |
.wp-defender ul.inner-nav {
|
1462 |
list-style-type: none;
|
1463 |
margin: 15px 0 0;
|
@@ -2313,6 +2319,19 @@
|
|
2313 |
font-size: 13px;
|
2314 |
line-height: 22px;
|
2315 |
margin-bottom: 10px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2316 |
.wp-defender .toggle-row {
|
2317 |
display: none; }
|
2318 |
@media screen and (min-width: 769px) and (max-width: 979px) {
|
1457 |
color: #AAAAAA;
|
1458 |
font-size: 13px; }
|
1459 |
.wp-defender .well.well-small {
|
1460 |
+
padding: 15px 20px; }
|
1461 |
+
.wp-defender .well.well-small.with-cap {
|
1462 |
+
padding-left: 50px; }
|
1463 |
+
.wp-defender .well.well-small.with-cap i {
|
1464 |
+
position: absolute;
|
1465 |
+
top: 18px;
|
1466 |
+
left: 20px; }
|
1467 |
.wp-defender ul.inner-nav {
|
1468 |
list-style-type: none;
|
1469 |
margin: 15px 0 0;
|
2319 |
font-size: 13px;
|
2320 |
line-height: 22px;
|
2321 |
margin-bottom: 10px; }
|
2322 |
+
.wp-defender .advanced-tools .at-line .well span {
|
2323 |
+
color: #333;
|
2324 |
+
margin-bottom: 0; }
|
2325 |
+
.wp-defender .advanced-tools .at-line .well.well-yellow a {
|
2326 |
+
opacity: 0.5;
|
2327 |
+
color: #000000;
|
2328 |
+
font-size: 12px;
|
2329 |
+
font-weight: bold;
|
2330 |
+
line-height: 22px;
|
2331 |
+
text-decoration: none;
|
2332 |
+
text-transform: uppercase; }
|
2333 |
+
.wp-defender .advanced-tools .at-line .well.well-yellow a:hover {
|
2334 |
+
opacity: 1; }
|
2335 |
.wp-defender .toggle-row {
|
2336 |
display: none; }
|
2337 |
@media screen and (min-width: 769px) and (max-width: 979px) {
|
changelog.txt
CHANGED
@@ -4,6 +4,13 @@ Tested up to: 4.7.4
|
|
4 |
|
5 |
Change Log:
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
1.7.1 - 2017-25-09
|
8 |
----------------------------------------------------------------------
|
9 |
- Improvement: Audit logging logs will be stored up to 1 year, query range can be set up to 3 months
|
4 |
|
5 |
Change Log:
|
6 |
|
7 |
+
1.7.2 - 2017-09-10
|
8 |
+
----------------------------------------------------------------------
|
9 |
+
- Improvement: Improvement: IPv6 support for both whitelisting and blacklisting, requires IPv6 support on the server.
|
10 |
+
- Improvement: Better UI/UX for Two-factor authentication.
|
11 |
+
- Fix: Security tweak "Prevent PHP Execution" and "Protect Information" now support Apache 2.4 htaccess rules.
|
12 |
+
- Other minor enhancements/fixes
|
13 |
+
|
14 |
1.7.1 - 2017-25-09
|
15 |
----------------------------------------------------------------------
|
16 |
- Improvement: Audit logging logs will be stored up to 1 year, query range can be set up to 3 months
|
languages/wpdef-default.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GNU General Public License (Version 2 - GPLv2).
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP Defender Pro 1.7.
|
6 |
"Report-Msgid-Bugs-To: https://wpmudev.org\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -152,17 +152,17 @@ msgid "Lockout reports are active scheduled to send %s"
|
|
152 |
msgstr ""
|
153 |
|
154 |
#: app/behavior/report-free.php:129 app/behavior/report.php:224
|
155 |
-
#: app/behavior/utils.php:
|
156 |
msgid "daily"
|
157 |
msgstr ""
|
158 |
|
159 |
#: app/behavior/report-free.php:132 app/behavior/report.php:227
|
160 |
-
#: app/behavior/utils.php:
|
161 |
msgid "weekly"
|
162 |
msgstr ""
|
163 |
|
164 |
#: app/behavior/report-free.php:135 app/behavior/report.php:230
|
165 |
-
#: app/behavior/utils.php:
|
166 |
msgid "monthly"
|
167 |
msgstr ""
|
168 |
|
@@ -216,27 +216,22 @@ msgstr ""
|
|
216 |
msgid "Guest"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: app/behavior/utils.php:
|
220 |
msgid "WordPress Core Integrity"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: app/behavior/utils.php:
|
224 |
msgid "Plugins & Themes vulnerability"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: app/behavior/utils.php:
|
228 |
#: app/module/scan/view/layouts/layout.php:70
|
229 |
#: app/module/scan/view/setting-free.php:50 app/module/scan/view/setting.php:43
|
230 |
#: app/view/settings.php:98
|
231 |
msgid "Suspicious Code"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: app/behavior/utils.php:
|
235 |
-
#: app/module/ip-lockout/controller/main.php:92
|
236 |
-
msgid "Never"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: app/behavior/utils.php:787 free/utils.php:639
|
240 |
msgid "Please upgrade to 5.3 or later"
|
241 |
msgstr ""
|
242 |
|
@@ -310,7 +305,7 @@ msgid "Defender%s"
|
|
310 |
msgstr ""
|
311 |
|
312 |
#: app/module/advanced-tools/behavior/at-widget.php:17
|
313 |
-
#: app/module/advanced-tools/controller/main.php:
|
314 |
#: app/module/advanced-tools/view/layouts/layout.php:5
|
315 |
msgid "Advanced Tools"
|
316 |
msgstr ""
|
@@ -322,27 +317,43 @@ msgid ""
|
|
322 |
msgstr ""
|
323 |
|
324 |
#: app/module/advanced-tools/behavior/at-widget.php:27
|
325 |
-
#: app/module/advanced-tools/view/disabled.php:4
|
326 |
#: app/module/advanced-tools/view/layouts/layout.php:13
|
327 |
-
#: app/module/advanced-tools/view/layouts/layout.php:20
|
328 |
-
#: app/module/advanced-tools/view/login/disabled.php:6
|
329 |
-
#: app/module/advanced-tools/view/login/enabled.php:6
|
330 |
#: app/module/advanced-tools/view/main.php:4
|
331 |
-
msgid "
|
332 |
msgstr ""
|
333 |
|
334 |
#: app/module/advanced-tools/behavior/at-widget.php:31
|
335 |
msgid ""
|
336 |
-
"
|
337 |
-
"
|
|
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: app/module/advanced-tools/behavior/at-widget.php:
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: app/module/advanced-tools/behavior/at-widget.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
#: app/module/advanced-tools/view/disabled.php:19
|
347 |
#: app/module/audit/behavior/audit.php:43 app/module/audit/view/new.php:15
|
348 |
#: app/module/ip-lockout/behavior/widget.php:37
|
@@ -351,18 +362,18 @@ msgstr ""
|
|
351 |
|
352 |
#: app/module/advanced-tools/controller/main.php:58
|
353 |
msgid ""
|
354 |
-
"You enabled Jetpack WordPress.com login, so Defender will disable the
|
355 |
"factors login for avoiding conflict"
|
356 |
msgstr ""
|
357 |
|
358 |
#: app/module/advanced-tools/controller/main.php:61
|
359 |
msgid ""
|
360 |
-
"You enabled the plugin Theme My Login, so Defender will disable the
|
361 |
"factors login for avoiding conflict"
|
362 |
msgstr ""
|
363 |
|
364 |
#: app/module/advanced-tools/controller/main.php:135
|
365 |
-
msgid "
|
366 |
msgstr ""
|
367 |
|
368 |
#: app/module/advanced-tools/controller/main.php:158
|
@@ -385,23 +396,30 @@ msgstr ""
|
|
385 |
msgid "Some error happen"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: app/module/advanced-tools/controller/main.php:
|
389 |
msgid "Whoops, the passcode you entered was incorrect or expired."
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: app/module/advanced-tools/controller/main.php:
|
393 |
#: app/module/audit/controller/main.php:196
|
394 |
-
#: app/module/ip-lockout/controller/main.php:
|
395 |
#: app/module/scan/controller/main.php:305
|
396 |
msgid "Your settings have been updated."
|
397 |
msgstr ""
|
398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
#: app/module/advanced-tools/view/disabled.php:10
|
400 |
msgid ""
|
401 |
-
"Beef up your website’s security with
|
402 |
-
"
|
403 |
-
"
|
404 |
-
"attacks."
|
405 |
msgstr ""
|
406 |
|
407 |
#: app/module/advanced-tools/view/login/disabled.php:2
|
@@ -421,8 +439,8 @@ msgid "Use the Google Authenticator app to sign in with a separate passcode."
|
|
421 |
msgstr ""
|
422 |
|
423 |
#: app/module/advanced-tools/view/login/disabled.php:20
|
424 |
-
#: app/module/
|
425 |
-
#: app/module/scan/view/setting.php:
|
426 |
msgid "Cancel"
|
427 |
msgstr ""
|
428 |
|
@@ -460,6 +478,10 @@ msgstr ""
|
|
460 |
msgid "Verify"
|
461 |
msgstr ""
|
462 |
|
|
|
|
|
|
|
|
|
463 |
#: app/module/advanced-tools/view/login/enabled.php:12
|
464 |
msgid "Disabled"
|
465 |
msgstr ""
|
@@ -494,73 +516,87 @@ msgstr ""
|
|
494 |
msgid "Lost your device?"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: app/module/advanced-tools/view/main.php:
|
498 |
msgid ""
|
499 |
-
"Configure your
|
500 |
-
"by default."
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: app/module/advanced-tools/view/main.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
msgid "User Roles"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: app/module/advanced-tools/view/main.php:
|
508 |
msgid ""
|
509 |
-
"Choose
|
510 |
-
"
|
|
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: app/module/advanced-tools/view/main.php:
|
514 |
msgid "User role"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: app/module/advanced-tools/view/main.php:
|
518 |
msgid "Lost Phone"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: app/module/advanced-tools/view/main.php:
|
522 |
msgid ""
|
523 |
"If a user is unable to access their phone, you can allow an option to send "
|
524 |
"the one time password to their registered email."
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: app/module/advanced-tools/view/main.php:
|
528 |
msgid "Enable lost phone option"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: app/module/advanced-tools/view/main.php:
|
532 |
msgid "App Download"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: app/module/advanced-tools/view/main.php:
|
536 |
msgid "Need the app? Here’s links to the official Google Authenticator apps."
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: app/module/advanced-tools/view/main.php:
|
540 |
msgid "Active Users"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: app/module/advanced-tools/view/main.php:
|
544 |
msgid ""
|
545 |
-
"Here’s a quick link to see which of your users have enabled
|
546 |
"verification."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: app/module/advanced-tools/view/main.php:
|
550 |
msgid "<a href=\"%s\">View users</a> who have enabled this feature."
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: app/module/advanced-tools/view/main.php:
|
554 |
-
#: app/module/advanced-tools/view/main.php:
|
555 |
#: app/module/audit/view/settings.php:10
|
556 |
msgid "Deactivate"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: app/module/advanced-tools/view/main.php:
|
560 |
-
msgid "
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: app/module/advanced-tools/view/main.php:
|
564 |
msgid "SAVE SETTINGS"
|
565 |
msgstr ""
|
566 |
|
@@ -1233,7 +1269,7 @@ msgid "password reset"
|
|
1233 |
msgstr ""
|
1234 |
|
1235 |
#: app/module/audit/controller/main-free.php:36
|
1236 |
-
#: app/module/audit/controller/main.php:
|
1237 |
#: app/module/audit/view/pro-feature.php:22
|
1238 |
#: app/module/ip-lockout/view/pro-feature.php:22
|
1239 |
#: app/module/scan/view/pro-feature.php:22 app/view/activator.php:33
|
@@ -1270,6 +1306,11 @@ msgstr ""
|
|
1270 |
msgid "User"
|
1271 |
msgstr ""
|
1272 |
|
|
|
|
|
|
|
|
|
|
|
1273 |
#: app/module/audit/controller/main.php:203
|
1274 |
#: app/module/audit/view/layouts/layout.php:39
|
1275 |
msgid "at %s"
|
@@ -1307,15 +1348,15 @@ msgid "There were no events logged for %s"
|
|
1307 |
msgstr ""
|
1308 |
|
1309 |
#: app/module/audit/controller/main.php:441
|
1310 |
-
#: app/module/audit/controller/main.php:
|
1311 |
msgid "Here’s what’s been happening at %s"
|
1312 |
msgstr ""
|
1313 |
|
1314 |
-
#: app/module/audit/controller/main.php:
|
1315 |
msgid "Type a user’s name"
|
1316 |
msgstr ""
|
1317 |
|
1318 |
-
#: app/module/audit/controller/main.php:
|
1319 |
msgid "We did not find an user with this name..."
|
1320 |
msgstr ""
|
1321 |
|
@@ -1715,15 +1756,15 @@ msgstr ""
|
|
1715 |
#: app/module/hardener/component/disable-file-editor-service.php:32
|
1716 |
#: app/module/hardener/component/disable-file-editor-service.php:66
|
1717 |
#: app/module/hardener/component/hide-error-service.php:61
|
1718 |
-
#: app/module/hardener/component/protect-information-service.php:
|
1719 |
-
#: app/module/hardener/component/protect-information-service.php:
|
1720 |
#: app/module/hardener/component/security-key-service.php:48
|
1721 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1722 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1723 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1724 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1725 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1726 |
-
#: app/module/hardener/component/servers/apache-service.php:
|
1727 |
msgid "The file %s is not writeable"
|
1728 |
msgstr ""
|
1729 |
|
@@ -1817,12 +1858,12 @@ msgstr ""
|
|
1817 |
msgid "Update PHP to latest version"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
-
#: app/module/hardener/component/prevent-php-service.php:
|
1821 |
msgid "Process is not possible on your current server"
|
1822 |
msgstr ""
|
1823 |
|
1824 |
-
#: app/module/hardener/component/prevent-php-service.php:
|
1825 |
-
#: app/module/hardener/component/protect-information-service.php:
|
1826 |
msgid "Revert is not possible on your current server"
|
1827 |
msgstr ""
|
1828 |
|
@@ -2219,38 +2260,38 @@ msgid "Add .htaccess file"
|
|
2219 |
msgstr ""
|
2220 |
|
2221 |
#: app/module/hardener/view/rules/prevent-php-executed.php:138
|
2222 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2223 |
msgid "For NGINX servers:"
|
2224 |
msgstr ""
|
2225 |
|
2226 |
#: app/module/hardener/view/rules/prevent-php-executed.php:141
|
2227 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2228 |
msgid ""
|
2229 |
"Copy the generated code into your site specific .conf file usually located "
|
2230 |
"in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/..."
|
2231 |
msgstr ""
|
2232 |
|
2233 |
#: app/module/hardener/view/rules/prevent-php-executed.php:144
|
2234 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2235 |
msgid ""
|
2236 |
"Add the code above inside the <strong>server</strong> section in the file, "
|
2237 |
"right before the php location block. Looks something like:"
|
2238 |
msgstr ""
|
2239 |
|
2240 |
#: app/module/hardener/view/rules/prevent-php-executed.php:148
|
2241 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2242 |
msgid "Reload NGINX."
|
2243 |
msgstr ""
|
2244 |
|
2245 |
#: app/module/hardener/view/rules/prevent-php-executed.php:151
|
2246 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2247 |
msgid ""
|
2248 |
"Still having trouble? <a target='_blank' href=\"%s\">Open a support "
|
2249 |
"ticket</a>."
|
2250 |
msgstr ""
|
2251 |
|
2252 |
#: app/module/hardener/view/rules/prevent-php-executed.php:161
|
2253 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2254 |
msgid "For IIS servers, <a href=\"%s\">visit Microsoft TechNet</a>"
|
2255 |
msgstr ""
|
2256 |
|
@@ -2294,7 +2335,7 @@ msgstr ""
|
|
2294 |
msgid "Your WordPress is protected."
|
2295 |
msgstr ""
|
2296 |
|
2297 |
-
#: app/module/hardener/view/rules/protect-information.php:
|
2298 |
msgid "For IIS 7 servers, <a href=\"%s\">visit Microsoft TechNet</a>"
|
2299 |
msgstr ""
|
2300 |
|
@@ -2369,7 +2410,7 @@ msgstr ""
|
|
2369 |
msgid "In the month"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
-
#: app/module/ip-lockout/behavior/pro/reporting.php:
|
2373 |
msgid "Defender Lockouts Report for %s"
|
2374 |
msgstr ""
|
2375 |
|
@@ -2405,8 +2446,8 @@ msgid "Lockout notifications are disabled"
|
|
2405 |
msgstr ""
|
2406 |
|
2407 |
#: app/module/ip-lockout/component/login-protection-api.php:61
|
2408 |
-
#: app/module/ip-lockout/controller/main.php:
|
2409 |
-
#: app/module/ip-lockout/controller/main.php:
|
2410 |
msgid ""
|
2411 |
"You have been locked out by the administrator for attempting to login with "
|
2412 |
"a banned username"
|
@@ -2549,60 +2590,60 @@ msgstr ""
|
|
2549 |
msgid "404 lockout alert for %s"
|
2550 |
msgstr ""
|
2551 |
|
2552 |
-
#: app/module/ip-lockout/controller/main.php:
|
2553 |
msgid "Login lockout alert for %s"
|
2554 |
msgstr ""
|
2555 |
|
2556 |
-
#: app/module/ip-lockout/controller/main.php:
|
2557 |
msgid "Failed login attempt with username %s"
|
2558 |
msgstr ""
|
2559 |
|
2560 |
-
#: app/module/ip-lockout/controller/main.php:
|
2561 |
-
#: app/module/ip-lockout/controller/main.php:
|
2562 |
msgid "%d login attempts remaining"
|
2563 |
msgstr ""
|
2564 |
|
2565 |
-
#: app/module/ip-lockout/controller/main.php:
|
2566 |
msgid ""
|
2567 |
"Your settings have been updated, however some IPs were removed because "
|
2568 |
"invalid format, or you blacklist yourself"
|
2569 |
msgstr ""
|
2570 |
|
2571 |
-
#: app/module/ip-lockout/controller/main.php:
|
2572 |
msgid "Login Protection has been activated."
|
2573 |
msgstr ""
|
2574 |
|
2575 |
-
#: app/module/ip-lockout/controller/main.php:
|
2576 |
msgid "Login Protection has been deactivated."
|
2577 |
msgstr ""
|
2578 |
|
2579 |
-
#: app/module/ip-lockout/controller/main.php:
|
2580 |
msgid "404 Detection has been activated."
|
2581 |
msgstr ""
|
2582 |
|
2583 |
-
#: app/module/ip-lockout/controller/main.php:
|
2584 |
msgid "404 Detection has been deactivated."
|
2585 |
msgstr ""
|
2586 |
|
2587 |
-
#: app/module/ip-lockout/controller/main.php:
|
2588 |
#: app/view/activator-free.php:33 app/view/activator.php:49
|
2589 |
msgid "IP Lockouts"
|
2590 |
msgstr ""
|
2591 |
|
2592 |
-
#: app/module/ip-lockout/controller/main.php:
|
2593 |
-
#: app/module/ip-lockout/controller/main.php:
|
2594 |
msgid "Your file is invalid!"
|
2595 |
msgstr ""
|
2596 |
|
2597 |
-
#: app/module/ip-lockout/controller/main.php:
|
2598 |
msgid "Your file content is invalid!"
|
2599 |
msgstr ""
|
2600 |
|
2601 |
-
#: app/module/ip-lockout/controller/main.php:
|
2602 |
msgid "Your whitelist/blacklist has been successfully imported."
|
2603 |
msgstr ""
|
2604 |
|
2605 |
-
#: app/module/ip-lockout/controller/main.php:
|
2606 |
msgid "Thanks for your patience. All set."
|
2607 |
msgstr ""
|
2608 |
|
@@ -3520,7 +3561,7 @@ msgid "Suspicious File"
|
|
3520 |
msgstr ""
|
3521 |
|
3522 |
#: app/module/scan/component/result-table.php:35
|
3523 |
-
#: app/module/scan/controller/main.php:
|
3524 |
msgid "Issue"
|
3525 |
msgstr ""
|
3526 |
|
@@ -3651,11 +3692,11 @@ msgid ""
|
|
3651 |
"scan, though you can always perform a new scan anytime."
|
3652 |
msgstr ""
|
3653 |
|
3654 |
-
#: app/module/scan/controller/main.php:
|
3655 |
msgid "File"
|
3656 |
msgstr ""
|
3657 |
|
3658 |
-
#: app/module/scan/controller/main.php:
|
3659 |
msgid "Let’s get your site patched up."
|
3660 |
msgstr ""
|
3661 |
|
2 |
# This file is distributed under the GNU General Public License (Version 2 - GPLv2).
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP Defender Pro 1.7.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wpmudev.org\n"
|
7 |
+
"POT-Creation-Date: 2017-10-11 04:26:45+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
152 |
msgstr ""
|
153 |
|
154 |
#: app/behavior/report-free.php:129 app/behavior/report.php:224
|
155 |
+
#: app/behavior/utils.php:846 free/utils.php:656
|
156 |
msgid "daily"
|
157 |
msgstr ""
|
158 |
|
159 |
#: app/behavior/report-free.php:132 app/behavior/report.php:227
|
160 |
+
#: app/behavior/utils.php:849 free/utils.php:659
|
161 |
msgid "weekly"
|
162 |
msgstr ""
|
163 |
|
164 |
#: app/behavior/report-free.php:135 app/behavior/report.php:230
|
165 |
+
#: app/behavior/utils.php:852 free/utils.php:662
|
166 |
msgid "monthly"
|
167 |
msgstr ""
|
168 |
|
216 |
msgid "Guest"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: app/behavior/utils.php:729
|
220 |
msgid "WordPress Core Integrity"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: app/behavior/utils.php:730
|
224 |
msgid "Plugins & Themes vulnerability"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: app/behavior/utils.php:731 app/module/scan/behavior/scan.php:145
|
228 |
#: app/module/scan/view/layouts/layout.php:70
|
229 |
#: app/module/scan/view/setting-free.php:50 app/module/scan/view/setting.php:43
|
230 |
#: app/view/settings.php:98
|
231 |
msgid "Suspicious Code"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: app/behavior/utils.php:829 free/utils.php:639
|
|
|
|
|
|
|
|
|
|
|
235 |
msgid "Please upgrade to 5.3 or later"
|
236 |
msgstr ""
|
237 |
|
305 |
msgstr ""
|
306 |
|
307 |
#: app/module/advanced-tools/behavior/at-widget.php:17
|
308 |
+
#: app/module/advanced-tools/controller/main.php:393
|
309 |
#: app/module/advanced-tools/view/layouts/layout.php:5
|
310 |
msgid "Advanced Tools"
|
311 |
msgstr ""
|
317 |
msgstr ""
|
318 |
|
319 |
#: app/module/advanced-tools/behavior/at-widget.php:27
|
|
|
320 |
#: app/module/advanced-tools/view/layouts/layout.php:13
|
|
|
|
|
|
|
321 |
#: app/module/advanced-tools/view/main.php:4
|
322 |
+
msgid "Two-Factor Authentication"
|
323 |
msgstr ""
|
324 |
|
325 |
#: app/module/advanced-tools/behavior/at-widget.php:31
|
326 |
msgid ""
|
327 |
+
"Add an extra layer of security to your WordPress account to ensure that "
|
328 |
+
"you’re the only person who can log in, even if someone else knows your "
|
329 |
+
"password"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: app/module/advanced-tools/behavior/at-widget.php:43
|
333 |
+
msgid ""
|
334 |
+
"<strong>Two-factor authentication is now active.</strong> To turn on this "
|
335 |
+
"feature for your account, go to <a href='%s'>Your Profile</a> to complete "
|
336 |
+
"setup and sync your account with the Authenticator app."
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: app/module/advanced-tools/behavior/at-widget.php:51
|
340 |
+
msgid ""
|
341 |
+
"Two-factor authentication is currently inactive. Configure and save your "
|
342 |
+
"settings to finish setup. "
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: app/module/advanced-tools/behavior/at-widget.php:53
|
346 |
+
msgid "Finish Setup"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: app/module/advanced-tools/behavior/at-widget.php:58
|
350 |
+
msgid ""
|
351 |
+
"Note: Each user on your website must individually enable two-factor "
|
352 |
+
"authentication via their user profile in order to enable and use this "
|
353 |
+
"security feature."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: app/module/advanced-tools/behavior/at-widget.php:67
|
357 |
#: app/module/advanced-tools/view/disabled.php:19
|
358 |
#: app/module/audit/behavior/audit.php:43 app/module/audit/view/new.php:15
|
359 |
#: app/module/ip-lockout/behavior/widget.php:37
|
362 |
|
363 |
#: app/module/advanced-tools/controller/main.php:58
|
364 |
msgid ""
|
365 |
+
"You enabled Jetpack WordPress.com login, so Defender will disable the two "
|
366 |
"factors login for avoiding conflict"
|
367 |
msgstr ""
|
368 |
|
369 |
#: app/module/advanced-tools/controller/main.php:61
|
370 |
msgid ""
|
371 |
+
"You enabled the plugin Theme My Login, so Defender will disable the two "
|
372 |
"factors login for avoiding conflict"
|
373 |
msgstr ""
|
374 |
|
375 |
#: app/module/advanced-tools/controller/main.php:135
|
376 |
+
msgid "Two Factor"
|
377 |
msgstr ""
|
378 |
|
379 |
#: app/module/advanced-tools/controller/main.php:158
|
396 |
msgid "Some error happen"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: app/module/advanced-tools/controller/main.php:327
|
400 |
msgid "Whoops, the passcode you entered was incorrect or expired."
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: app/module/advanced-tools/controller/main.php:458
|
404 |
#: app/module/audit/controller/main.php:196
|
405 |
+
#: app/module/ip-lockout/controller/main.php:665
|
406 |
#: app/module/scan/controller/main.php:305
|
407 |
msgid "Your settings have been updated."
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: app/module/advanced-tools/view/disabled.php:4
|
411 |
+
#: app/module/advanced-tools/view/layouts/layout.php:20
|
412 |
+
#: app/module/advanced-tools/view/login/disabled.php:6
|
413 |
+
#: app/module/advanced-tools/view/login/enabled.php:6
|
414 |
+
msgid "Two Factor Authentication"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
#: app/module/advanced-tools/view/disabled.php:10
|
418 |
msgid ""
|
419 |
+
"Beef up your website’s security with two-factor authentication. Add an "
|
420 |
+
"extra step in the login process so that users are required to enter a "
|
421 |
+
"password and an app-generated passcode using their phone – the best "
|
422 |
+
"protection against brute force attacks."
|
423 |
msgstr ""
|
424 |
|
425 |
#: app/module/advanced-tools/view/login/disabled.php:2
|
439 |
msgstr ""
|
440 |
|
441 |
#: app/module/advanced-tools/view/login/disabled.php:20
|
442 |
+
#: app/module/scan/controller/main.php:530 app/module/scan/view/setting.php:138
|
443 |
+
#: app/module/scan/view/setting.php:158
|
444 |
msgid "Cancel"
|
445 |
msgstr ""
|
446 |
|
478 |
msgid "Verify"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: app/module/advanced-tools/view/login/enabled.php:9
|
482 |
+
msgid "Two factor authentication is active."
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
#: app/module/advanced-tools/view/login/enabled.php:12
|
486 |
msgid "Disabled"
|
487 |
msgstr ""
|
516 |
msgid "Lost your device?"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: app/module/advanced-tools/view/main.php:14
|
520 |
msgid ""
|
521 |
+
"Configure your two-factor authentication settings. Our recommendations are "
|
522 |
+
"enabled by default."
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: app/module/advanced-tools/view/main.php:27
|
526 |
+
msgid ""
|
527 |
+
"<strong>Two-factor authentication is now active.</strong> User roles with "
|
528 |
+
"this feature enabled must visit their <a href='%s'>Profile page</a> to "
|
529 |
+
"complete setup and sync their account with the Authenticator app."
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: app/module/advanced-tools/view/main.php:35
|
533 |
+
msgid ""
|
534 |
+
"<strong>Two-factor authentication is currently inactive.</strong> Configure "
|
535 |
+
"and save your settings to complete setup."
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: app/module/advanced-tools/view/main.php:41
|
539 |
msgid "User Roles"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: app/module/advanced-tools/view/main.php:43
|
543 |
msgid ""
|
544 |
+
"Choose the user roles you want to enable two-factor authentication for. "
|
545 |
+
"Users with those roles will then be required to use the Google "
|
546 |
+
"Authenticator app to login."
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: app/module/advanced-tools/view/main.php:50
|
550 |
msgid "User role"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: app/module/advanced-tools/view/main.php:82
|
554 |
msgid "Lost Phone"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: app/module/advanced-tools/view/main.php:84
|
558 |
msgid ""
|
559 |
"If a user is unable to access their phone, you can allow an option to send "
|
560 |
"the one time password to their registered email."
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: app/module/advanced-tools/view/main.php:94
|
564 |
msgid "Enable lost phone option"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: app/module/advanced-tools/view/main.php:99
|
568 |
msgid "App Download"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: app/module/advanced-tools/view/main.php:101
|
572 |
msgid "Need the app? Here’s links to the official Google Authenticator apps."
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: app/module/advanced-tools/view/main.php:115
|
576 |
msgid "Active Users"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: app/module/advanced-tools/view/main.php:117
|
580 |
msgid ""
|
581 |
+
"Here’s a quick link to see which of your users have enabled two-factor "
|
582 |
"verification."
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: app/module/advanced-tools/view/main.php:121
|
586 |
msgid "<a href=\"%s\">View users</a> who have enabled this feature."
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: app/module/advanced-tools/view/main.php:126
|
590 |
+
#: app/module/advanced-tools/view/main.php:133
|
591 |
#: app/module/audit/view/settings.php:10
|
592 |
msgid "Deactivate"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: app/module/advanced-tools/view/main.php:128
|
596 |
+
msgid "Disable two-factor authentication on your website."
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: app/module/advanced-tools/view/main.php:141
|
600 |
msgid "SAVE SETTINGS"
|
601 |
msgstr ""
|
602 |
|
1269 |
msgstr ""
|
1270 |
|
1271 |
#: app/module/audit/controller/main-free.php:36
|
1272 |
+
#: app/module/audit/controller/main.php:503
|
1273 |
#: app/module/audit/view/pro-feature.php:22
|
1274 |
#: app/module/ip-lockout/view/pro-feature.php:22
|
1275 |
#: app/module/scan/view/pro-feature.php:22 app/view/activator.php:33
|
1306 |
msgid "User"
|
1307 |
msgstr ""
|
1308 |
|
1309 |
+
#: app/module/audit/controller/main.php:143
|
1310 |
+
#: app/module/ip-lockout/controller/main.php:92
|
1311 |
+
msgid "Never"
|
1312 |
+
msgstr ""
|
1313 |
+
|
1314 |
#: app/module/audit/controller/main.php:203
|
1315 |
#: app/module/audit/view/layouts/layout.php:39
|
1316 |
msgid "at %s"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
#: app/module/audit/controller/main.php:441
|
1351 |
+
#: app/module/audit/controller/main.php:467
|
1352 |
msgid "Here’s what’s been happening at %s"
|
1353 |
msgstr ""
|
1354 |
|
1355 |
+
#: app/module/audit/controller/main.php:559 app/view/settings.php:209
|
1356 |
msgid "Type a user’s name"
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: app/module/audit/controller/main.php:560
|
1360 |
msgid "We did not find an user with this name..."
|
1361 |
msgstr ""
|
1362 |
|
1756 |
#: app/module/hardener/component/disable-file-editor-service.php:32
|
1757 |
#: app/module/hardener/component/disable-file-editor-service.php:66
|
1758 |
#: app/module/hardener/component/hide-error-service.php:61
|
1759 |
+
#: app/module/hardener/component/protect-information-service.php:45
|
1760 |
+
#: app/module/hardener/component/protect-information-service.php:68
|
1761 |
#: app/module/hardener/component/security-key-service.php:48
|
1762 |
+
#: app/module/hardener/component/servers/apache-service.php:62
|
1763 |
+
#: app/module/hardener/component/servers/apache-service.php:66
|
1764 |
+
#: app/module/hardener/component/servers/apache-service.php:106
|
1765 |
+
#: app/module/hardener/component/servers/apache-service.php:110
|
1766 |
+
#: app/module/hardener/component/servers/apache-service.php:161
|
1767 |
+
#: app/module/hardener/component/servers/apache-service.php:192
|
1768 |
msgid "The file %s is not writeable"
|
1769 |
msgstr ""
|
1770 |
|
1858 |
msgid "Update PHP to latest version"
|
1859 |
msgstr ""
|
1860 |
|
1861 |
+
#: app/module/hardener/component/prevent-php-service.php:50
|
1862 |
msgid "Process is not possible on your current server"
|
1863 |
msgstr ""
|
1864 |
|
1865 |
+
#: app/module/hardener/component/prevent-php-service.php:57
|
1866 |
+
#: app/module/hardener/component/protect-information-service.php:85
|
1867 |
msgid "Revert is not possible on your current server"
|
1868 |
msgstr ""
|
1869 |
|
2260 |
msgstr ""
|
2261 |
|
2262 |
#: app/module/hardener/view/rules/prevent-php-executed.php:138
|
2263 |
+
#: app/module/hardener/view/rules/protect-information.php:93
|
2264 |
msgid "For NGINX servers:"
|
2265 |
msgstr ""
|
2266 |
|
2267 |
#: app/module/hardener/view/rules/prevent-php-executed.php:141
|
2268 |
+
#: app/module/hardener/view/rules/protect-information.php:96
|
2269 |
msgid ""
|
2270 |
"Copy the generated code into your site specific .conf file usually located "
|
2271 |
"in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/..."
|
2272 |
msgstr ""
|
2273 |
|
2274 |
#: app/module/hardener/view/rules/prevent-php-executed.php:144
|
2275 |
+
#: app/module/hardener/view/rules/protect-information.php:99
|
2276 |
msgid ""
|
2277 |
"Add the code above inside the <strong>server</strong> section in the file, "
|
2278 |
"right before the php location block. Looks something like:"
|
2279 |
msgstr ""
|
2280 |
|
2281 |
#: app/module/hardener/view/rules/prevent-php-executed.php:148
|
2282 |
+
#: app/module/hardener/view/rules/protect-information.php:103
|
2283 |
msgid "Reload NGINX."
|
2284 |
msgstr ""
|
2285 |
|
2286 |
#: app/module/hardener/view/rules/prevent-php-executed.php:151
|
2287 |
+
#: app/module/hardener/view/rules/protect-information.php:106
|
2288 |
msgid ""
|
2289 |
"Still having trouble? <a target='_blank' href=\"%s\">Open a support "
|
2290 |
"ticket</a>."
|
2291 |
msgstr ""
|
2292 |
|
2293 |
#: app/module/hardener/view/rules/prevent-php-executed.php:161
|
2294 |
+
#: app/module/hardener/view/rules/protect-information.php:112
|
2295 |
msgid "For IIS servers, <a href=\"%s\">visit Microsoft TechNet</a>"
|
2296 |
msgstr ""
|
2297 |
|
2335 |
msgid "Your WordPress is protected."
|
2336 |
msgstr ""
|
2337 |
|
2338 |
+
#: app/module/hardener/view/rules/protect-information.php:117
|
2339 |
msgid "For IIS 7 servers, <a href=\"%s\">visit Microsoft TechNet</a>"
|
2340 |
msgstr ""
|
2341 |
|
2410 |
msgid "In the month"
|
2411 |
msgstr ""
|
2412 |
|
2413 |
+
#: app/module/ip-lockout/behavior/pro/reporting.php:73
|
2414 |
msgid "Defender Lockouts Report for %s"
|
2415 |
msgstr ""
|
2416 |
|
2446 |
msgstr ""
|
2447 |
|
2448 |
#: app/module/ip-lockout/component/login-protection-api.php:61
|
2449 |
+
#: app/module/ip-lockout/controller/main.php:560
|
2450 |
+
#: app/module/ip-lockout/controller/main.php:569
|
2451 |
msgid ""
|
2452 |
"You have been locked out by the administrator for attempting to login with "
|
2453 |
"a banned username"
|
2590 |
msgid "404 lockout alert for %s"
|
2591 |
msgstr ""
|
2592 |
|
2593 |
+
#: app/module/ip-lockout/controller/main.php:429
|
2594 |
msgid "Login lockout alert for %s"
|
2595 |
msgstr ""
|
2596 |
|
2597 |
+
#: app/module/ip-lockout/controller/main.php:499
|
2598 |
msgid "Failed login attempt with username %s"
|
2599 |
msgstr ""
|
2600 |
|
2601 |
+
#: app/module/ip-lockout/controller/main.php:562
|
2602 |
+
#: app/module/ip-lockout/controller/main.php:572
|
2603 |
msgid "%d login attempts remaining"
|
2604 |
msgstr ""
|
2605 |
|
2606 |
+
#: app/module/ip-lockout/controller/main.php:661
|
2607 |
msgid ""
|
2608 |
"Your settings have been updated, however some IPs were removed because "
|
2609 |
"invalid format, or you blacklist yourself"
|
2610 |
msgstr ""
|
2611 |
|
2612 |
+
#: app/module/ip-lockout/controller/main.php:672
|
2613 |
msgid "Login Protection has been activated."
|
2614 |
msgstr ""
|
2615 |
|
2616 |
+
#: app/module/ip-lockout/controller/main.php:674
|
2617 |
msgid "Login Protection has been deactivated."
|
2618 |
msgstr ""
|
2619 |
|
2620 |
+
#: app/module/ip-lockout/controller/main.php:679
|
2621 |
msgid "404 Detection has been activated."
|
2622 |
msgstr ""
|
2623 |
|
2624 |
+
#: app/module/ip-lockout/controller/main.php:681
|
2625 |
msgid "404 Detection has been deactivated."
|
2626 |
msgstr ""
|
2627 |
|
2628 |
+
#: app/module/ip-lockout/controller/main.php:710 app/module/ip-lockout.php:35
|
2629 |
#: app/view/activator-free.php:33 app/view/activator.php:49
|
2630 |
msgid "IP Lockouts"
|
2631 |
msgstr ""
|
2632 |
|
2633 |
+
#: app/module/ip-lockout/controller/main.php:727
|
2634 |
+
#: app/module/ip-lockout/controller/main.php:733
|
2635 |
msgid "Your file is invalid!"
|
2636 |
msgstr ""
|
2637 |
|
2638 |
+
#: app/module/ip-lockout/controller/main.php:739
|
2639 |
msgid "Your file content is invalid!"
|
2640 |
msgstr ""
|
2641 |
|
2642 |
+
#: app/module/ip-lockout/controller/main.php:748
|
2643 |
msgid "Your whitelist/blacklist has been successfully imported."
|
2644 |
msgstr ""
|
2645 |
|
2646 |
+
#: app/module/ip-lockout/controller/main.php:933
|
2647 |
msgid "Thanks for your patience. All set."
|
2648 |
msgstr ""
|
2649 |
|
3561 |
msgstr ""
|
3562 |
|
3563 |
#: app/module/scan/component/result-table.php:35
|
3564 |
+
#: app/module/scan/controller/main.php:808
|
3565 |
msgid "Issue"
|
3566 |
msgstr ""
|
3567 |
|
3692 |
"scan, though you can always perform a new scan anytime."
|
3693 |
msgstr ""
|
3694 |
|
3695 |
+
#: app/module/scan/controller/main.php:806
|
3696 |
msgid "File"
|
3697 |
msgstr ""
|
3698 |
|
3699 |
+
#: app/module/scan/controller/main.php:842
|
3700 |
msgid "Let’s get your site patched up."
|
3701 |
msgstr ""
|
3702 |
|
main-activator.php
CHANGED
@@ -63,7 +63,7 @@ class WD_Main_Activator {
|
|
63 |
'WP Defender',
|
64 |
'/plugins/defender-security/',
|
65 |
/* 4 Email Button CTA */
|
66 |
-
__( 'Get Members!',
|
67 |
/* 5 getdrip Plugin param */
|
68 |
'WP Defender'
|
69 |
);
|
@@ -71,7 +71,7 @@ class WD_Main_Activator {
|
|
71 |
}
|
72 |
|
73 |
public function defenderAdsMessage( $message ) {
|
74 |
-
$message = __( "We're happy that you've chosen to install Defender! Are you interested in how to make the most of this plugin? How would you like a quick 5 day email crash course with actionable advice on making your website security bulletproof? Only the info you want, no subscription!",
|
75 |
|
76 |
return $message;
|
77 |
}
|
@@ -113,9 +113,9 @@ class WD_Main_Activator {
|
|
113 |
|
114 |
public function showUpgradeNotification() {
|
115 |
$class = 'notice notice-info is-dismissible wp-defender-notice';
|
116 |
-
$message = sprintf( __( "%s, you now have access to Defender's pro features but you still have the free version installed. Let's upgrade Defender and unlock all those juicy features! %s",
|
117 |
\WP_Defender\Behavior\Utils::instance()->getDisplayName(),
|
118 |
-
'<button id="install-defender-pro" type="button" data-id="1081723" data-nonce="' . wp_create_nonce( 'installDefenderPro' ) . '" class="button button-small">' . __( "Upgrade",
|
119 |
);
|
120 |
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
|
121 |
}
|
@@ -143,7 +143,7 @@ class WD_Main_Activator {
|
|
143 |
) );
|
144 |
} else {
|
145 |
wp_send_json_error( array(
|
146 |
-
'message' => __( "<br/>Something went wrong. Please try again later!",
|
147 |
) );
|
148 |
}
|
149 |
|
@@ -155,7 +155,7 @@ class WD_Main_Activator {
|
|
155 |
*/
|
156 |
public function addSettingsLink( $links ) {
|
157 |
$mylinks = array(
|
158 |
-
'<a href="' . admin_url( 'admin.php?page=wp-defender' ) . '">' . __( "Settings",
|
159 |
);
|
160 |
|
161 |
return array_merge( $mylinks, $links );
|
63 |
'WP Defender',
|
64 |
'/plugins/defender-security/',
|
65 |
/* 4 Email Button CTA */
|
66 |
+
__( 'Get Members!', "defender-security" ),
|
67 |
/* 5 getdrip Plugin param */
|
68 |
'WP Defender'
|
69 |
);
|
71 |
}
|
72 |
|
73 |
public function defenderAdsMessage( $message ) {
|
74 |
+
$message = __( "We're happy that you've chosen to install Defender! Are you interested in how to make the most of this plugin? How would you like a quick 5 day email crash course with actionable advice on making your website security bulletproof? Only the info you want, no subscription!", "defender-security" );
|
75 |
|
76 |
return $message;
|
77 |
}
|
113 |
|
114 |
public function showUpgradeNotification() {
|
115 |
$class = 'notice notice-info is-dismissible wp-defender-notice';
|
116 |
+
$message = sprintf( __( "%s, you now have access to Defender's pro features but you still have the free version installed. Let's upgrade Defender and unlock all those juicy features! %s", "defender-security" ),
|
117 |
\WP_Defender\Behavior\Utils::instance()->getDisplayName(),
|
118 |
+
'<button id="install-defender-pro" type="button" data-id="1081723" data-nonce="' . wp_create_nonce( 'installDefenderPro' ) . '" class="button button-small">' . __( "Upgrade", "defender-security" ) . '</button>'
|
119 |
);
|
120 |
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
|
121 |
}
|
143 |
) );
|
144 |
} else {
|
145 |
wp_send_json_error( array(
|
146 |
+
'message' => __( "<br/>Something went wrong. Please try again later!", "defender-security" )
|
147 |
) );
|
148 |
}
|
149 |
|
155 |
*/
|
156 |
public function addSettingsLink( $links ) {
|
157 |
$mylinks = array(
|
158 |
+
'<a href="' . admin_url( 'admin.php?page=wp-defender' ) . '">' . __( "Settings", "defender-security" ) . '</a>',
|
159 |
);
|
160 |
|
161 |
return array_merge( $mylinks, $links );
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Defender Security, Monitoring, and Hack Protection ===
|
2 |
Plugin Name: Defender Security, Monitoring, and Hack Protection
|
3 |
-
Version: 1.7.
|
4 |
Author: WPMU DEV
|
5 |
Author URI: http://premium.wpmudev.org/
|
6 |
Contributors: WPMUDEV
|
7 |
Tags: Security, Security Tweaks, Hardening, IP lockout, Monitoring, Blacklist, Site Protection, Hacked, Security Scan
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 4.8
|
10 |
-
Stable tag: 1.7.
|
11 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
12 |
|
13 |
Protect WordPress from hackers with security tweaks, code scans, 2-Step Verification, IP lockouts, and monitoring.
|
@@ -111,7 +111,13 @@ Hackers and bot attacks are not the only threat to your site. No matter what se
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
-
= 1.7.
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
* Added: widget for 2 factors authentication
|
116 |
* Fix: Defender does not detect the right IP when CloudFlare is being used
|
117 |
* Fix: Conflict with TM Photo Gallery Plugin
|
1 |
=== Defender Security, Monitoring, and Hack Protection ===
|
2 |
Plugin Name: Defender Security, Monitoring, and Hack Protection
|
3 |
+
Version: 1.7.2
|
4 |
Author: WPMU DEV
|
5 |
Author URI: http://premium.wpmudev.org/
|
6 |
Contributors: WPMUDEV
|
7 |
Tags: Security, Security Tweaks, Hardening, IP lockout, Monitoring, Blacklist, Site Protection, Hacked, Security Scan
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 4.8
|
10 |
+
Stable tag: 1.7.2
|
11 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
12 |
|
13 |
Protect WordPress from hackers with security tweaks, code scans, 2-Step Verification, IP lockouts, and monitoring.
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 1.7.2 =
|
115 |
+
* Improvement: Improvement: IPv6 support for both whitelisting and blacklisting, requires IPv6 support on the server.
|
116 |
+
* Improvement: Better UI/UX for Two-factor authentication.
|
117 |
+
* Fix: Security tweak "Prevent PHP Execution" and "Protect Information" now support Apache 2.4 htaccess rules.
|
118 |
+
* Other minor enhancements/fixes
|
119 |
+
|
120 |
+
= 1.7.1 =
|
121 |
* Added: widget for 2 factors authentication
|
122 |
* Fix: Defender does not detect the right IP when CloudFlare is being used
|
123 |
* Fix: Conflict with TM Photo Gallery Plugin
|
vendor/email-search.php
CHANGED
@@ -105,7 +105,7 @@ class Email_Search extends Component {
|
|
105 |
|
106 |
public function renderInput() {
|
107 |
if ( empty( $this->placeholder ) ) {
|
108 |
-
$this->placeholder = __( "Enter a username",
|
109 |
}
|
110 |
?>
|
111 |
<?php if ( $this->lite == false ): ?>
|
@@ -117,11 +117,11 @@ class Email_Search extends Component {
|
|
117 |
<li><?php echo get_avatar( $user->ID, 30 ) ?>
|
118 |
<span class="name"><?php echo esc_html( $this->getDisplayName( $user->ID ) ) ?></span>
|
119 |
<?php if ( get_current_user_id() == $user->ID ): ?>
|
120 |
-
<span class="def-tag tag-generic"><?php esc_html_e( "You",
|
121 |
<?php endif; ?>
|
122 |
<a data-id="<?php echo esc_attr( $user->ID ) ?>"
|
123 |
class="remove wd-remove-recipient float-r"
|
124 |
-
href="#"><?php esc_html_e( "Remove",
|
125 |
</li>
|
126 |
<?php endif; ?>
|
127 |
<?php endforeach; ?>
|
@@ -132,7 +132,7 @@ class Email_Search extends Component {
|
|
132 |
id="wd-username-search"
|
133 |
type="search"/></span>
|
134 |
<button type="submit" disabled id="add-receipt"
|
135 |
-
class="button button-grey"><?php _e( "Add",
|
136 |
</div>
|
137 |
</div>
|
138 |
<?php else: ?>
|
@@ -229,13 +229,13 @@ class Email_Search extends Component {
|
|
229 |
}));
|
230 |
user_row.append($('<span class="name"/>').html(data.name));
|
231 |
if (data.is_current) {
|
232 |
-
user_row.append($('<span/>').addClass('def-tag tag-generic').html('<?php esc_html_e( "You",
|
233 |
}
|
234 |
user_row.append($('<a/>').attr({
|
235 |
'data-id': data.user_id,
|
236 |
'class': 'remove float-r wd-remove-recipient',
|
237 |
'href': '#'
|
238 |
-
}).html('<?php esc_html_e( "Remove",
|
239 |
|
240 |
$('.receipt ul').append(user_row);
|
241 |
$("#wd-username-search").trigger('results:clear');
|
105 |
|
106 |
public function renderInput() {
|
107 |
if ( empty( $this->placeholder ) ) {
|
108 |
+
$this->placeholder = __( "Enter a username", "defender-security" );
|
109 |
}
|
110 |
?>
|
111 |
<?php if ( $this->lite == false ): ?>
|
117 |
<li><?php echo get_avatar( $user->ID, 30 ) ?>
|
118 |
<span class="name"><?php echo esc_html( $this->getDisplayName( $user->ID ) ) ?></span>
|
119 |
<?php if ( get_current_user_id() == $user->ID ): ?>
|
120 |
+
<span class="def-tag tag-generic"><?php esc_html_e( "You", "defender-security" ) ?></span>
|
121 |
<?php endif; ?>
|
122 |
<a data-id="<?php echo esc_attr( $user->ID ) ?>"
|
123 |
class="remove wd-remove-recipient float-r"
|
124 |
+
href="#"><?php esc_html_e( "Remove", "defender-security" ) ?></a>
|
125 |
</li>
|
126 |
<?php endif; ?>
|
127 |
<?php endforeach; ?>
|
132 |
id="wd-username-search"
|
133 |
type="search"/></span>
|
134 |
<button type="submit" disabled id="add-receipt"
|
135 |
+
class="button button-grey"><?php _e( "Add", "defender-security" ) ?></button>
|
136 |
</div>
|
137 |
</div>
|
138 |
<?php else: ?>
|
229 |
}));
|
230 |
user_row.append($('<span class="name"/>').html(data.name));
|
231 |
if (data.is_current) {
|
232 |
+
user_row.append($('<span/>').addClass('def-tag tag-generic').html('<?php esc_html_e( "You", "defender-security" ) ?>'))
|
233 |
}
|
234 |
user_row.append($('<a/>').attr({
|
235 |
'data-id': data.user_id,
|
236 |
'class': 'remove float-r wd-remove-recipient',
|
237 |
'href': '#'
|
238 |
+
}).html('<?php esc_html_e( "Remove", "defender-security" ) ?>'))
|
239 |
|
240 |
$('.receipt ul').append(user_row);
|
241 |
$("#wd-username-search").trigger('results:clear');
|
wp-defender.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
/**
|
4 |
* Plugin Name: WP Defender
|
5 |
* Plugin URI: https://premium.wpmudev.org/project/wp-defender/
|
6 |
-
* Version: 1.7.
|
7 |
* Description: Get regular security scans, vulnerability reports, safety recommendations and customized hardening for your site in just a few clicks. Defender is the analyst and enforcer who never sleeps.
|
8 |
* Author: WPMU DEV
|
9 |
* Author URI: http://premium.wpmudev.org/
|
10 |
* License: GNU General Public License (Version 2 - GPLv2)
|
11 |
-
* Text Domain:
|
12 |
* Network: true
|
13 |
*/
|
14 |
class WP_Defender_Free {
|
@@ -45,7 +45,7 @@ class WP_Defender_Free {
|
|
45 |
/**
|
46 |
* @var string
|
47 |
*/
|
48 |
-
public $domain = '
|
49 |
|
50 |
/**
|
51 |
* @var string
|
@@ -86,6 +86,7 @@ class WP_Defender_Free {
|
|
86 |
$this->includeVendors();
|
87 |
$this->autoload();
|
88 |
add_action( 'admin_enqueue_scripts', array( &$this, 'register_styles' ) );
|
|
|
89 |
$phpVersion = phpversion();
|
90 |
if ( version_compare( $phpVersion, '5.3', '>=' ) ) {
|
91 |
include_once $this->getPluginPath() . 'main-activator.php';
|
@@ -96,6 +97,10 @@ class WP_Defender_Free {
|
|
96 |
}
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
99 |
/**
|
100 |
* Init values
|
101 |
*/
|
3 |
/**
|
4 |
* Plugin Name: WP Defender
|
5 |
* Plugin URI: https://premium.wpmudev.org/project/wp-defender/
|
6 |
+
* Version: 1.7.2
|
7 |
* Description: Get regular security scans, vulnerability reports, safety recommendations and customized hardening for your site in just a few clicks. Defender is the analyst and enforcer who never sleeps.
|
8 |
* Author: WPMU DEV
|
9 |
* Author URI: http://premium.wpmudev.org/
|
10 |
* License: GNU General Public License (Version 2 - GPLv2)
|
11 |
+
* Text Domain: defender-security
|
12 |
* Network: true
|
13 |
*/
|
14 |
class WP_Defender_Free {
|
45 |
/**
|
46 |
* @var string
|
47 |
*/
|
48 |
+
public $domain = 'defender-security';
|
49 |
|
50 |
/**
|
51 |
* @var string
|
86 |
$this->includeVendors();
|
87 |
$this->autoload();
|
88 |
add_action( 'admin_enqueue_scripts', array( &$this, 'register_styles' ) );
|
89 |
+
add_action( 'plugins_loaded', array( &$this, 'loadTextdomain' ) );
|
90 |
$phpVersion = phpversion();
|
91 |
if ( version_compare( $phpVersion, '5.3', '>=' ) ) {
|
92 |
include_once $this->getPluginPath() . 'main-activator.php';
|
97 |
}
|
98 |
}
|
99 |
|
100 |
+
public function loadTextdomain() {
|
101 |
+
load_plugin_textdomain( $this->domain, false, $this->plugin_path . 'languages' );
|
102 |
+
}
|
103 |
+
|
104 |
/**
|
105 |
* Init values
|
106 |
*/
|