Version Description
Current Release = Released: 18th September, 2019 - Release Notes
(v.0) IMPROVED: Massive improvements to asynchronous scans in performance and reliability.
(v.0) ADDED: [PRO] Possible to supply multiple email addresses for Administrator login notifications.
(v.0) ADDED: New firewall whitelist rule to prevent firewall blocks when activating certain plugins.
(v.0) IMPROVED: Prevent errors caused by other plugins not passing correctly-formatted data through WP filters.
(v.0) ADDED: Japanese translations (14%).
(v.0) IMPROVED: Plugin locale now respects user profile locale setting.
(v.0) IMPROVED: Audit Trail filter for specific events.
(v.0) IMPROVED: Lots of cleanup of deprecated PHP code following the the v7-v8 upgrade.
Download this release
Release Info
Developer | paultgoodchild |
Plugin | Shield Security for WordPress |
Version | 8.1.0 |
Comparing to | |
See all releases |
Code changes from version 8.0.2 to 8.1.0
- icwp-wpsf.php +1 -1
- languages/wp-simple-firewall-en_GB.mo +0 -0
- languages/wp-simple-firewall-en_GB.po +947 -948
- languages/wp-simple-firewall-ja.mo +0 -0
- languages/wp-simple-firewall-nl_NL.mo +0 -0
- plugin-spec.php +3 -3
- readme.txt +15 -7
- src/config/feature-firewall.php +3 -0
- src/config/feature-hack_protect.php +26 -20
- src/config/feature-user_management.php +1 -1
- src/features/admin_access_restriction.php +45 -84
- src/features/audit_trail.php +55 -107
- src/features/autoupdates.php +3 -17
- src/features/base.php +102 -124
- src/features/base_wpsf.php +4 -47
- src/features/comments_filter.php +6 -53
- src/features/email.php +3 -21
- src/features/events.php +3 -17
- src/features/firewall.php +3 -10
- src/features/hack_protect.php +77 -37
- src/features/headers.php +3 -10
- src/features/insights.php +31 -37
- src/features/ips.php +101 -153
- src/features/license.php +34 -34
- src/features/lockdown.php +3 -10
- src/features/login_protect.php +6 -27
- src/features/plugin.php +9 -38
- src/features/sessions.php +3 -21
- src/features/statistics.php +3 -10
- src/features/traffic.php +7 -25
- src/features/user_management.php +35 -43
- src/lib/src/AuditTrail/Auditor.php +1 -14
- src/lib/src/Controller/Controller.php +8 -15
- src/lib/src/Crons/StandardCron.php +4 -2
- src/lib/src/Databases/AuditTrail/Select.php +18 -9
- src/lib/src/Databases/Base/EntryVO.php +5 -4
- src/lib/src/Databases/Base/Handler.php +0 -5
- src/lib/src/Databases/Base/Select.php +1 -1
- src/lib/src/Databases/Base/Update.php +3 -0
- src/lib/src/Databases/ScanQueue/Common.php +59 -0
- src/lib/src/Databases/ScanQueue/Delete.php +10 -0
- src/lib/src/Databases/ScanQueue/EntryVO.php +70 -0
- src/lib/src/Databases/ScanQueue/Handler.php +45 -0
- src/lib/src/Databases/ScanQueue/Insert.php +9 -0
- src/lib/src/Databases/ScanQueue/Select.php +56 -0
- src/lib/src/Databases/ScanQueue/Update.php +25 -0
- src/lib/src/Databases/Tally/Update.php +0 -10
- src/lib/src/Databases/Traffic/Handler.php +1 -3
- src/lib/src/Modules/AuditTrail/Options.php +14 -0
- src/lib/src/Modules/AuditTrail/Strings.php +3 -1
- src/lib/src/Modules/Base/AdminNotices.php +1 -1
- src/lib/src/Modules/Base/BaseModCon.php +86 -130
- src/lib/src/Modules/Base/BaseProcessor.php +16 -70
- src/lib/src/Modules/Base/Options.php +30 -7
- src/lib/src/Modules/Base/ShieldOptions.php +7 -0
- src/lib/src/Modules/BaseShield/ShieldProcessor.php +159 -0
- src/lib/src/Modules/Events/Strings.php +25 -2
- src/lib/src/Modules/HackGuard/AjaxHandler.php +29 -18
- src/lib/src/Modules/HackGuard/Options.php +71 -16
- src/lib/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilder.php +128 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilderConsumer.php +31 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/BuildScanAction.php +37 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/CollateResults.php +48 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/CompleteQueue.php +71 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/Controller.php +134 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/ConvertBetweenTypes.php +45 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/IsScanEnqueued.php +24 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/QueueProcessor.php +159 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/QueueProcessorConsumer.php +31 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/ScanEnqueue.php +47 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/ScanExecute.php +50 -0
- src/lib/src/Modules/HackGuard/Scan/Queue/ScanInitiate.php +42 -0
- src/lib/src/{Scans/Base/ScanResults → Modules/HackGuard/Scan/Results}/Clean.php +2 -2
- src/lib/src/Modules/HackGuard/Scan/Results/ConvertBetweenTypes.php +62 -0
- src/lib/src/Modules/HackGuard/Scan/Results/ResultsDelete.php +24 -0
- src/lib/src/Modules/HackGuard/Scan/Results/ResultsRetrieve.php +28 -0
- src/lib/src/Modules/HackGuard/Scan/Results/ResultsStore.php +30 -0
- src/lib/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php +56 -0
- src/lib/src/Modules/HackGuard/Scan/ScanActionFromSlug.php +42 -0
- src/lib/src/Modules/HackGuard/Strings.php +3 -2
- src/lib/src/Modules/IPs/AjaxHandler.php +4 -5
- src/lib/src/Modules/IPs/BotTrack/Base.php +1 -10
- src/lib/src/Modules/IPs/Options.php +116 -0
- src/lib/src/Modules/LoginGuard/Strings.php +1 -1
- src/lib/src/Modules/ModConsumer.php +7 -0
- src/lib/src/Modules/Plugin/Components/BadgeWidget.php +1 -1
- src/lib/src/Modules/Plugin/Strings.php +3 -5
- src/lib/src/Modules/SecurityAdmin/Options.php +31 -3
- src/lib/src/Modules/SecurityAdmin/Strings.php +2 -5
- src/lib/src/Modules/Traffic/Options.php +19 -12
- src/lib/src/Modules/UserManagement/Strings.php +41 -40
- src/lib/src/Scans/Apc/BuildScanAction.php +1 -2
- src/lib/src/Scans/Apc/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Apc/Scan.php +3 -17
- src/lib/src/Scans/Apc/ScanActionVO.php +1 -0
- src/lib/src/Scans/Base/ActionStore.php +0 -90
- src/lib/src/Scans/Base/BaseBuildScanAction.php +11 -18
- src/lib/src/Scans/Base/BaseConvertResultsToVos.php +0 -36
- src/lib/src/Scans/Base/BaseResultItem.php +3 -2
- src/lib/src/Scans/Base/BaseScan.php +6 -38
- src/lib/src/Scans/Base/BaseScanActionVO.php +11 -14
- src/lib/src/Scans/Base/Files/BaseFileMapScan.php +2 -13
- src/lib/src/Scans/Base/Files/BaseScanFromFileMap.php +2 -11
- src/lib/src/Scans/Base/ScanActionQuery.php +0 -77
- src/lib/src/Scans/Base/ScannerProfileConsumer.php +0 -35
- src/lib/src/Scans/Common/AsyncScansController.php +0 -263
- src/lib/src/Scans/Common/ScanLauncher.php +0 -87
- src/lib/src/Scans/Common/ScansJobVO.php +0 -188
- src/lib/src/Scans/Helpers/BuildHashesFromApi.php +1 -1
- src/lib/src/Scans/Mal/BuildScanAction.php +1 -3
- src/lib/src/Scans/Mal/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Mal/ConvertVosToResults.php +0 -33
- src/lib/src/Scans/Mal/FileScanner.php +22 -4
- src/lib/src/Scans/Mal/ScanActionVO.php +6 -6
- src/lib/src/Scans/Ptg/BuildScanAction.php +1 -2
- src/lib/src/Scans/Ptg/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Ptg/ConvertVosToResults.php +0 -33
- src/lib/src/Scans/Ptg/Scan.php +9 -22
- src/lib/src/Scans/Ptg/ScanActionVO.php +1 -0
- src/lib/src/Scans/Ptg/ScanResults/Clean.php +1 -1
- src/lib/src/Scans/Ufc/BuildScanAction.php +5 -2
- src/lib/src/Scans/Ufc/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Ufc/ScanActionVO.php +2 -0
- src/lib/src/Scans/Wcf/BuildScanAction.php +1 -2
- src/lib/src/Scans/Wcf/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Wcf/ScanActionVO.php +1 -0
- src/lib/src/Scans/Wpv/BuildScanAction.php +1 -7
- src/lib/src/Scans/Wpv/ConvertResultsToVos.php +0 -23
- src/lib/src/Scans/Wpv/ItemScanner.php +0 -51
- src/lib/src/Scans/Wpv/PluginScanner.php +0 -49
- src/lib/src/Scans/Wpv/Scan.php +45 -26
- src/lib/src/Scans/Wpv/ScanActionVO.php +2 -0
- src/lib/src/Scans/Wpv/Scanner.php +0 -150
- src/lib/src/Scans/Wpv/ThemeScanner.php +0 -43
- src/lib/src/Scans/Wpv/WpVulnDb/RetrieveForItem.php +0 -158
- src/lib/src/Scans/Wpv/WpVulnDb/WpVulnVO.php +9 -83
- src/lib/src/Tables/Build/AuditTrail.php +14 -14
- src/lib/src/Tables/Build/Ip.php +8 -3
- src/lib/src/Tables/Build/ScanApc.php +6 -1
- src/lib/src/Tables/Build/ScanBase.php +3 -0
- src/lib/src/Tables/Build/ScanMal.php +6 -1
- src/lib/src/Tables/Build/ScanPtg.php +12 -4
- src/lib/src/Tables/Build/ScanUfc.php +6 -1
- src/lib/src/Tables/Build/ScanWcf.php +5 -1
- src/lib/src/Tables/Build/ScanWpv.php +5 -1
- src/lib/src/Tables/Build/Traffic.php +8 -8
- src/lib/vendor/composer/autoload_classmap.php +44 -45
- src/lib/vendor/composer/autoload_static.php +44 -45
- src/lib/vendor/fernleafsystems/wordpress-services/src/Core/General.php +1 -1
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/RequestVO.php +14 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiBase.php +63 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiPing.php +20 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Base.php +44 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/ClassicPress.php +5 -6
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/Plugin.php +5 -5
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/RequestVO.php +16 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/WordPress.php +6 -6
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/Base.php +25 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/RequestVO.php +13 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/WhitelistRetrieve.php +24 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Base.php +42 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/BasePluginTheme.php +30 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Plugin.php +22 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/RequestVO.php +16 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Theme.php +12 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/WordPress.php +42 -0
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Base.php +0 -55
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/HashesRequestVO.php +0 -18
- src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Ping.php +0 -23
- src/processors/admin_access_restriction.php +41 -50
- src/processors/adminaccess_whitelabel.php +7 -8
- src/processors/audit_trail.php +9 -7
- src/processors/audit_trail_auditor.php +3 -95
- src/processors/audit_trail_auditor_base.php +0 -19
- src/processors/audit_trail_changetracking.php +11 -46
- src/processors/audit_trail_emails.php +0 -39
- src/processors/audit_trail_plugins.php +0 -35
- src/processors/audit_trail_posts.php +0 -38
- src/processors/audit_trail_themes.php +0 -28
- src/processors/audit_trail_users.php +0 -35
- src/processors/audit_trail_wordpress.php +0 -30
- src/processors/audit_trail_wpsf.php +0 -9
- src/processors/autoupdates.php +3 -2
- src/processors/base.php +16 -48
- src/processors/base_commentsfilter.php +0 -8
- src/processors/base_plugin.php +4 -91
- src/processors/base_wpsf.php +6 -72
- src/processors/basedb.php +17 -34
- src/processors/comments_filter.php +7 -16
- src/processors/commentsfilter_antibotspam.php +0 -250
- src/processors/commentsfilter_botspam.php +2 -2
- src/processors/commentsfilter_googlerecaptcha.php +2 -10
- src/processors/commentsfilter_humanspam.php +0 -4
- src/processors/email.php +4 -9
- src/processors/events.php +5 -5
- src/processors/firewall.php +6 -4
- src/processors/hack_protect.php +16 -26
- src/processors/hackprotect_integrity.php +12 -11
- src/processors/hackprotect_realtime.php +3 -4
- src/processors/hackprotect_scan_apc.php +4 -32
- src/processors/hackprotect_scan_assets_base.php +2 -2
- src/processors/hackprotect_scan_base.php +28 -169
- src/processors/hackprotect_scan_mal.php +0 -45
- src/processors/hackprotect_scan_ptg.php +0 -45
- src/processors/hackprotect_scan_ufc.php +0 -31
- src/processors/hackprotect_scan_wcf.php +4 -72
- src/processors/hackprotect_scan_wpv.php +3 -48
- src/processors/hackprotect_scanner.php +45 -149
- src/processors/headers.php +4 -2
- src/processors/insights.php +2 -8
- src/processors/ips.php +120 -220
- src/processors/license.php +2 -1
- src/processors/lockdown.php +11 -10
- src/processors/login_protect.php +14 -22
- src/processors/loginprotect_base.php +10 -9
- src/processors/loginprotect_intent.php +5 -5
- src/processors/loginprotect_intentprovider_base.php +9 -8
- src/processors/loginprotect_wplogin.php +4 -3
- src/processors/plugin.php +30 -25
- src/processors/plugin_badge.php +0 -34
- src/processors/plugin_badgewidget.php +0 -34
- src/processors/plugin_crondaily.php +2 -2
- src/processors/plugin_cronhourly.php +5 -4
- src/processors/plugin_geoip.php +0 -58
- src/processors/plugin_importexport.php +2 -2
- src/processors/plugin_notes.php +0 -49
- src/processors/plugin_tracking.php +1 -10
- src/processors/sessions.php +7 -70
- src/processors/statistics.php +0 -22
- src/processors/statistics_tally.php +0 -64
- src/processors/traffic.php +6 -7
- src/processors/traffic_logger.php +16 -76
- src/processors/user_management.php +27 -22
- src/processors/usermanagement_passwords.php +2 -1
- src/processors/usermanagement_sessions.php +15 -27
- src/processors/usermanagement_suspend.php +12 -11
- src/query/statistics/consolidation.php +0 -88
- src/wizards/plugin.php +29 -30
- templates/html/plugin_badge.html +0 -89
- templates/php/notices/admin-notice-template.php +0 -39
- templates/php/notices/admin-users-restricted.php +0 -5
- templates/php/notices/akismet-running.php +0 -5
- templates/php/notices/allow-tracking.php +0 -39
- templates/php/notices/certain-options-restricted.php +0 -2
- templates/php/notices/does-not-meet-requirements.php +0 -8
- templates/php/notices/flash-message.php +0 -3
- templates/php/notices/override-forceoff.php +0 -20
- templates/php/notices/php54_version_warning.php +0 -6
- templates/php/notices/plugin-failed-to-load.php +0 -4
- templates/php/notices/plugin-mailing-list-signup.php +0 -40
- templates/php/notices/plugin-update-available.php +0 -1
- templates/php/notices/rate-plugin.php +0 -10
- templates/php/notices/translate-plugin.php +0 -4
- templates/php/notices/visitor-whitelisted.php +0 -5
- templates/php/notices/wizard_welcome.php +0 -2
- templates/php/snippets/plugin_badge.php +0 -135
- templates/php/snippets/plugin_badge_widget.php +0 -37
- templates/twig/wpadmin_pages/insights/audit/audit_table.twig +7 -6
- templates/twig/wpadmin_pages/insights/traffic/traffic_table.twig +2 -2
icwp-wpsf.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Shield Security
|
4 |
* Plugin URI: https://icwp.io/2f
|
5 |
* Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
|
6 |
-
* Version: 8.0
|
7 |
* Text Domain: wp-simple-firewall
|
8 |
* Domain Path: /languages
|
9 |
* Author: One Dollar Plugin
|
3 |
* Plugin Name: Shield Security
|
4 |
* Plugin URI: https://icwp.io/2f
|
5 |
* Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
|
6 |
+
* Version: 8.1.0
|
7 |
* Text Domain: wp-simple-firewall
|
8 |
* Domain Path: /languages
|
9 |
* Author: One Dollar Plugin
|
languages/wp-simple-firewall-en_GB.mo
CHANGED
Binary file
|
languages/wp-simple-firewall-en_GB.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WPSF v2.0\n"
|
4 |
-
"POT-Creation-Date: 2019-
|
5 |
-
"PO-Revision-Date: 2019-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_GB\n"
|
@@ -22,118 +22,118 @@ msgstr ""
|
|
22 |
"X-Poedit-SearchPathExcluded-4: src/lib/vendor\n"
|
23 |
"X-Poedit-SearchPathExcluded-5: resources\n"
|
24 |
|
25 |
-
#: src/features/admin_access_restriction.php:
|
26 |
-
#: src/features/admin_access_restriction.php:
|
27 |
msgid "Security Admin session has timed-out."
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: src/features/admin_access_restriction.php:
|
31 |
msgid "Reload now?"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: src/features/admin_access_restriction.php:
|
35 |
msgid "Security Admin session has nearly timed-out."
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: src/features/admin_access_restriction.php:
|
39 |
-
#: src/features/admin_access_restriction.php:
|
|
|
40 |
#: src/lib/src/Modules/Plugin/Strings.php:398
|
41 |
-
#: src/lib/src/Modules/Plugin/Strings.php:400
|
42 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:35
|
43 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:38
|
44 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
45 |
#: src/lib/src/Tables/Render/Sessions.php:36 src/wizards/base_wpsf.php:59
|
46 |
msgid "Security Admin"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: src/features/admin_access_restriction.php:
|
50 |
#, php-format
|
51 |
msgid "Prevent Tampering With %s Settings"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: src/features/admin_access_restriction.php:
|
55 |
msgid "Security plugin is protected against tampering"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: src/features/admin_access_restriction.php:
|
59 |
msgid "Security plugin is vulnerable to tampering"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: src/features/admin_access_restriction.php:
|
63 |
msgid "Important Options"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: src/features/admin_access_restriction.php:
|
67 |
msgid "Important WP options are protected against tampering"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: src/features/admin_access_restriction.php:
|
71 |
msgid "Important WP options aren't protected against tampering"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: src/features/admin_access_restriction.php:
|
75 |
msgid "WP Admins"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: src/features/admin_access_restriction.php:
|
79 |
msgid "Admin users are protected against tampering"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: src/features/admin_access_restriction.php:
|
83 |
msgid "Admin users aren't protected against tampering"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: src/features/admin_access_restriction.php:
|
87 |
msgid "Security Admin Protection"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: src/features/admin_access_restriction.php:
|
91 |
msgid "Security Plugin Unprotected"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: src/features/admin_access_restriction.php:
|
95 |
msgid "The Security Admin protection is not active."
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: src/features/admin_access_restriction.php:
|
99 |
-
#: src/features/autoupdates.php:168 src/features/hack_protect.php:
|
100 |
-
#: src/features/hack_protect.php:
|
101 |
-
#: src/features/hack_protect.php:
|
102 |
-
#: src/features/hack_protect.php:
|
103 |
#: src/features/insights.php:655 src/features/insights.php:668
|
104 |
#: src/features/insights.php:695 src/features/insights.php:708
|
105 |
#: src/features/insights.php:734 src/features/insights.php:746
|
106 |
-
#: src/features/lockdown.php:81 src/features/user_management.php:
|
107 |
#, php-format
|
108 |
msgid "Go To %s"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: src/features/admin_access_restriction.php:
|
112 |
-
#: src/features/autoupdates.php:168 src/features/hack_protect.php:
|
113 |
-
#: src/features/hack_protect.php:
|
114 |
-
#: src/features/hack_protect.php:
|
115 |
-
#: src/features/hack_protect.php:
|
116 |
#: src/features/insights.php:746 src/features/lockdown.php:81
|
117 |
-
#: src/features/user_management.php:
|
118 |
#: src/lib/src/Modules/Base/Strings.php:38
|
119 |
#: src/lib/src/Modules/Insights/Strings.php:66
|
120 |
msgid "Options"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: src/features/admin_access_restriction.php:
|
124 |
msgid "Security Admin should be turned-on to protect your security settings."
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: src/features/admin_access_restriction.php:
|
128 |
msgid ""
|
129 |
"Sorry, this plugin is protected against unauthorised attempts to disable it."
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: src/features/admin_access_restriction.php:
|
133 |
msgid "You'll just need to authenticate first and try again."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: src/features/audit_trail.php:
|
137 |
#, php-format
|
138 |
msgid "[%s] Audit Trail Entries"
|
139 |
msgstr ""
|
@@ -191,7 +191,7 @@ msgstr ""
|
|
191 |
|
192 |
#: src/features/audit_trail.php:163 src/features/insights.php:74
|
193 |
#: src/features/insights.php:285 src/lib/src/Modules/AuditTrail/Strings.php:122
|
194 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
195 |
#: src/wizards/plugin.php:486
|
196 |
msgid "Audit Trail"
|
197 |
msgstr ""
|
@@ -203,8 +203,8 @@ msgstr ""
|
|
203 |
|
204 |
#: src/features/autoupdates.php:157 src/features/autoupdates.php:189
|
205 |
#: src/lib/src/Modules/Autoupdates/Strings.php:25
|
206 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
207 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
208 |
msgid "Automatic Updates"
|
209 |
msgstr ""
|
210 |
|
@@ -273,113 +273,113 @@ msgstr ""
|
|
273 |
msgid "%s isn't automatically updated"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: src/features/base.php:
|
277 |
#: src/wizards/plugin.php:482 src/wizards/plugin.php:515
|
278 |
-
#: src/wizards/plugin.php:
|
279 |
msgid "Disabled"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: src/features/base.php:
|
283 |
msgid ""
|
284 |
"Unfortunately your WordPress and/or PHP versions are too old to support this "
|
285 |
"feature."
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: src/features/base.php:
|
289 |
msgid "You don't currently have permission to save settings."
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: src/features/base.php:
|
293 |
msgid "Password values do not match."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: src/features/base.php:
|
297 |
-
#: src/lib/src/Modules/Base/BaseModCon.php:
|
298 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
299 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
300 |
#: src/lib/src/Modules/LoginGuard/Strings.php:265
|
301 |
#: src/lib/src/Modules/LoginGuard/Strings.php:308
|
302 |
#: src/lib/src/Modules/LoginGuard/Strings.php:315
|
303 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
304 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
305 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
306 |
msgid "Default"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: src/features/base.php:
|
310 |
msgid "For more information:"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: src/features/base.php:
|
314 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
315 |
msgid "Support Forums"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: src/features/base_wpsf.php:
|
319 |
msgid "Module Disabled"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: src/features/base_wpsf.php:
|
323 |
msgid "All features of this module are completely disabled"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: src/features/comments_filter.php:
|
327 |
msgid "I'm not a spammer."
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: src/features/comments_filter.php:
|
331 |
msgid "Please check the box to confirm you're not a spammer."
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: src/features/comments_filter.php:
|
335 |
#, php-format
|
336 |
msgid "Please wait %s seconds before posting your comment."
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: src/features/comments_filter.php:
|
340 |
msgid "Please reload this page to post a comment."
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: src/features/comments_filter.php:
|
344 |
msgid "SPAM Blocking"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: src/features/comments_filter.php:
|
348 |
msgid "Block Bot & Human Comment SPAM"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: src/features/comments_filter.php:
|
352 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:60
|
353 |
msgid "Bot SPAM"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: src/features/comments_filter.php:
|
357 |
msgid "Bot SPAM comments are blocked"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: src/features/comments_filter.php:
|
361 |
msgid "There is no protection against Bot SPAM comments"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: src/features/comments_filter.php:
|
365 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:79
|
366 |
msgid "Human SPAM"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: src/features/comments_filter.php:
|
370 |
msgid "Comments posted by humans are checked for SPAM"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: src/features/comments_filter.php:
|
374 |
msgid "Comments posted by humans aren't checked for SPAM"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: src/features/comments_filter.php:
|
378 |
#, php-format
|
379 |
msgid "Please remember to supply reCAPTCHA keys: %s"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: src/features/comments_filter.php:
|
383 |
msgid "reCAPTCHA Settings"
|
384 |
msgstr ""
|
385 |
|
@@ -398,7 +398,7 @@ msgstr ""
|
|
398 |
#: src/lib/src/Modules/Events/Strings.php:185
|
399 |
#: src/lib/src/Modules/Events/Strings.php:189
|
400 |
#: src/lib/src/Modules/Firewall/Strings.php:24
|
401 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
402 |
msgid "Firewall"
|
403 |
msgstr ""
|
404 |
|
@@ -426,297 +426,302 @@ msgstr ""
|
|
426 |
msgid "Firewall rules aren't applied to admins"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: src/features/hack_protect.php:
|
430 |
#, php-format
|
431 |
msgid "%s per day"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: src/features/hack_protect.php:
|
435 |
msgid "Re-install First"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: src/features/hack_protect.php:
|
439 |
-
#| msgid "License Options"
|
440 |
msgid "Then Activate"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: src/features/hack_protect.php:
|
444 |
-
#: src/lib/src/Modules/Base/Strings.php:27 src/lib/src/Tables/Build/Ip.php:
|
445 |
-
#: src/lib/src/Tables/Build/ScanBase.php:
|
446 |
#: src/lib/src/Tables/Build/Sessions.php:68
|
447 |
#: src/lib/src/Tables/Build/Traffic.php:109
|
448 |
msgid "Yes"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: src/features/hack_protect.php:
|
452 |
msgid "Re-Install It"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: src/features/hack_protect.php:
|
456 |
msgid "Activate Only"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: src/features/hack_protect.php:
|
460 |
msgid "Cancel"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: src/features/hack_protect.php:
|
464 |
#: src/lib/src/Modules/Base/Strings.php:29
|
465 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
466 |
-
#: src/processors/hack_protect.php:
|
467 |
msgid "Never"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: src/features/hack_protect.php:
|
471 |
#, php-format
|
472 |
msgid "Last Scan Time: %s"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: src/features/hack_protect.php:
|
476 |
#, php-format
|
477 |
msgid ""
|
478 |
"Sorry, this feature is not available because we cannot write to disk at this "
|
479 |
"location: \"%s\""
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: src/features/hack_protect.php:
|
483 |
#, php-format
|
484 |
msgid "Not available because the %s extension is not available."
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: src/features/hack_protect.php:
|
488 |
msgid ""
|
489 |
"Not available because PHP/WordPress doesn't have direct filesystem access."
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: src/features/hack_protect.php:
|
493 |
#, php-format
|
494 |
msgid "The %s file isn't writable and so can't be further protected."
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: src/features/hack_protect.php:
|
498 |
msgid "Scans"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: src/features/hack_protect.php:
|
502 |
msgid "Core File scanner is not enabled."
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: src/features/hack_protect.php:
|
506 |
msgid "Automatic WordPress Core File scanner should be turned-on."
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: src/features/hack_protect.php:
|
510 |
msgid "Modified WordPress core files found."
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: src/features/hack_protect.php:
|
514 |
-
#: src/features/hack_protect.php:
|
515 |
-
#: src/features/hack_protect.php:
|
516 |
msgid "Run Scan"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: src/features/hack_protect.php:
|
520 |
msgid "Scan WP core files and repair any files that are flagged as modified."
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: src/features/hack_protect.php:
|
524 |
msgid "Unrecognised File scanner is not enabled."
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: src/features/hack_protect.php:
|
528 |
msgid "Automatic scanning for non-WordPress core files is recommended."
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: src/features/hack_protect.php:
|
532 |
msgid "Unrecognised files found in WordPress Core directory."
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: src/features/hack_protect.php:
|
536 |
msgid ""
|
537 |
"Scan and remove any files that are not meant to be in the WP core "
|
538 |
"directories."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: src/features/hack_protect.php:
|
542 |
msgid "Automatic Plugin/Themes Guard is not enabled."
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: src/features/hack_protect.php:
|
546 |
msgid "Automatic detection of plugin/theme modifications is recommended."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: src/features/hack_protect.php:
|
550 |
msgid "A plugin/theme was found to have been modified."
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: src/features/hack_protect.php:
|
554 |
msgid "Reviewing modifications to your plugins/themes is recommended."
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: src/features/hack_protect.php:
|
558 |
msgid "Vulnerability Scanner is not enabled."
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: src/features/hack_protect.php:
|
562 |
msgid "Automatic detection of vulnerabilities is recommended."
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: src/features/hack_protect.php:
|
566 |
msgid "At least 1 item has known vulnerabilities."
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: src/features/hack_protect.php:
|
570 |
msgid ""
|
571 |
"Items with known vulnerabilities should be updated, removed, or replaced."
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: src/features/hack_protect.php:
|
575 |
msgid "Abandoned Plugins Scanner is not enabled."
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: src/features/hack_protect.php:
|
579 |
msgid "Automatic detection of abandoned plugins is recommended."
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: src/features/hack_protect.php:
|
583 |
msgid "At least 1 plugin on your site is abandoned."
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: src/features/hack_protect.php:
|
587 |
msgid ""
|
588 |
"Plugins that have been abandoned represent a potential risk to your site."
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: src/features/hack_protect.php:
|
|
|
592 |
#, php-format
|
593 |
msgid "%s Scanner is not enabled."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: src/features/hack_protect.php:
|
597 |
msgid "Automatic detection of Malware is recommended."
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: src/features/hack_protect.php:
|
601 |
msgid "At least 1 file with potential Malware has been discovered."
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: src/features/hack_protect.php:
|
605 |
msgid ""
|
606 |
"Files identified as potential malware should be examined as soon as possible."
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: src/features/hack_protect.php:
|
610 |
#: src/lib/src/Modules/HackGuard/Strings.php:94
|
611 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
612 |
msgid "Hack Guard"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: src/features/hack_protect.php:
|
616 |
msgid "Threats/Intrusions Detection & Repair"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: src/features/hack_protect.php:
|
620 |
msgid "Scan Frequency"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: src/features/hack_protect.php:
|
624 |
msgid "Automatic scanners run more than once per day"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: src/features/hack_protect.php:
|
628 |
msgid "Automatic scanners only run once per day"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: src/features/hack_protect.php:
|
632 |
msgid "WP Core File Scan"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: src/features/hack_protect.php:
|
636 |
msgid "Core files scanned regularly for hacks"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: src/features/hack_protect.php:
|
640 |
msgid "Core files are never scanned for hacks!"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: src/features/hack_protect.php:
|
644 |
msgid "WP Core File Repair"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: src/features/hack_protect.php:
|
648 |
msgid "Core files are automatically repaired"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: src/features/hack_protect.php:
|
652 |
msgid "Core files aren't automatically repaired!"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: src/features/hack_protect.php:
|
656 |
#: src/lib/src/Modules/Events/Strings.php:118
|
657 |
#: src/lib/src/Modules/HackGuard/Strings.php:26
|
658 |
#: src/lib/src/Modules/HackGuard/Strings.php:118
|
659 |
msgid "Unrecognised Files"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: src/features/hack_protect.php:
|
663 |
msgid "Core directories scanned regularly for unrecognised files"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: src/features/hack_protect.php:
|
667 |
msgid "WP Core is never scanned for unrecognised files!"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: src/features/hack_protect.php:
|
671 |
msgid "Unrecognised Files Removal"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: src/features/hack_protect.php:
|
675 |
msgid "Unrecognised files are automatically removed"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: src/features/hack_protect.php:
|
679 |
msgid "Unrecognised files aren't automatically removed!"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: src/features/hack_protect.php:
|
683 |
msgid "Vulnerability Scan"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: src/features/hack_protect.php:
|
687 |
msgid "Regularly scanning for known vulnerabilities"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: src/features/hack_protect.php:
|
691 |
msgid "Plugins/Themes never scanned for vulnerabilities!"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: src/features/hack_protect.php:
|
695 |
msgid "Auto Update"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: src/features/hack_protect.php:
|
699 |
msgid "Vulnerable items are automatically updated"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: src/features/hack_protect.php:
|
703 |
msgid "Vulnerable items aren't automatically updated!"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: src/features/hack_protect.php:
|
707 |
#: src/lib/src/Modules/Events/Strings.php:114
|
708 |
#: src/lib/src/Modules/HackGuard/Strings.php:24
|
709 |
msgid "Plugin/Theme Guard"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: src/features/hack_protect.php:
|
713 |
msgid "Plugins and Themes are guarded against tampering"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: src/features/hack_protect.php:
|
717 |
msgid "Plugins and Themes are never scanned for tampering!"
|
718 |
msgstr ""
|
719 |
|
|
|
|
|
|
|
|
|
|
|
720 |
#: src/features/headers.php:133
|
721 |
msgid "HTTP Security Headers"
|
722 |
msgstr ""
|
@@ -725,7 +730,7 @@ msgstr ""
|
|
725 |
msgid "Protect Visitors With Powerful HTTP Headers"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: src/features/headers.php:147 src/lib/src/Modules/Plugin/Strings.php:
|
729 |
msgid "HTTP Headers"
|
730 |
msgstr ""
|
731 |
|
@@ -787,7 +792,7 @@ msgstr ""
|
|
787 |
msgid "Black listed IPs auto-expire after: %s"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: src/features/insights.php:114 src/lib/src/Modules/Plugin/Strings.php:
|
791 |
msgid "IP Whitelist"
|
792 |
msgstr ""
|
793 |
|
@@ -849,7 +854,7 @@ msgstr ""
|
|
849 |
msgid "Traffic Table Filters"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: src/features/insights.php:163 src/features/traffic.php:
|
853 |
msgid "Traffic Watch"
|
854 |
msgstr ""
|
855 |
|
@@ -890,8 +895,8 @@ msgstr ""
|
|
890 |
#: src/lib/src/Tables/Render/AdminNotes.php:31
|
891 |
#: src/processors/loginprotect_intentprovider_backup.php:164
|
892 |
#: src/processors/loginprotect_intentprovider_email.php:155
|
893 |
-
#: src/processors/user_management.php:
|
894 |
-
#: src/processors/user_management.php:
|
895 |
msgid "Username"
|
896 |
msgstr ""
|
897 |
|
@@ -947,7 +952,7 @@ msgstr ""
|
|
947 |
msgid "IP Lists"
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: src/features/insights.php:286 src/features/user_management.php:
|
951 |
#: src/lib/src/Modules/AuditTrail/Strings.php:90
|
952 |
msgid "Users"
|
953 |
msgstr ""
|
@@ -986,7 +991,7 @@ msgstr ""
|
|
986 |
msgid "Please select an action to perform."
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: src/features/insights.php:476 src/processors/hackprotect_scan_ptg.php:
|
990 |
msgid "Are you sure?"
|
991 |
msgstr ""
|
992 |
|
@@ -1017,10 +1022,10 @@ msgstr ""
|
|
1017 |
|
1018 |
#: src/features/insights.php:644 src/features/insights.php:655
|
1019 |
#: src/lib/src/Modules/AuditTrail/Strings.php:91
|
1020 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1021 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1022 |
#: src/lib/src/Modules/Autoupdates/Strings.php:123
|
1023 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1024 |
msgid "Plugins"
|
1025 |
msgstr ""
|
1026 |
|
@@ -1054,10 +1059,10 @@ msgstr ""
|
|
1054 |
|
1055 |
#: src/features/insights.php:684 src/features/insights.php:695
|
1056 |
#: src/lib/src/Modules/AuditTrail/Strings.php:92
|
1057 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1058 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1059 |
#: src/lib/src/Modules/Autoupdates/Strings.php:135
|
1060 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1061 |
msgid "Themes"
|
1062 |
msgstr ""
|
1063 |
|
@@ -1115,37 +1120,37 @@ msgstr ""
|
|
1115 |
msgid "Total SPAM comments blocked."
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: src/features/insights.php:
|
1119 |
#: src/lib/src/Tables/Render/IpBlack.php:14
|
1120 |
msgid "Offenses"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#: src/features/insights.php:
|
1124 |
msgid "Total offenses against the site."
|
1125 |
msgstr ""
|
1126 |
|
1127 |
-
#: src/features/insights.php:
|
1128 |
msgid "IP Blocks"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: src/features/insights.php:
|
1132 |
msgid "Total connections blocked/killed after too many offenses."
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: src/features/insights.php:
|
1136 |
msgid "Blacklist IPs"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: src/features/insights.php:
|
1140 |
msgid "Current IP addresses with offenses against the site."
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: src/features/insights.php:
|
1144 |
msgid "Not yet recorded"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: src/features/ips.php:
|
1148 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
1149 |
#: src/lib/src/Modules/Headers/Strings.php:140
|
1150 |
#: src/lib/src/Modules/LoginGuard/Strings.php:81
|
1151 |
#: src/lib/src/Modules/LoginGuard/Strings.php:109
|
@@ -1157,103 +1162,103 @@ msgstr ""
|
|
1157 |
#: src/lib/src/Modules/Plugin/Strings.php:98
|
1158 |
#: src/lib/src/Modules/Plugin/Strings.php:102
|
1159 |
#: src/lib/src/Modules/Plugin/Strings.php:198
|
1160 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1161 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1162 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1163 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
1164 |
#: src/lib/src/Modules/Traffic/Strings.php:127
|
1165 |
#: src/lib/src/Tables/Render/AdminNotes.php:30
|
1166 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
1167 |
msgid "Note"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
-
#: src/features/ips.php:
|
1171 |
msgid "IP blocking is turned-off because the offenses limit is set to 0."
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: src/features/ips.php:
|
1175 |
msgid "Since the offenses limit is set to 0, these options have no effect."
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: src/features/ips.php:
|
1179 |
msgid ""
|
1180 |
"Your User Agent appears to be empty. We recommend not turning on this option."
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: src/features/ips.php:
|
1184 |
#: src/lib/src/Modules/Firewall/Strings.php:138
|
1185 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
1186 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:282
|
1187 |
#: src/lib/src/Modules/HackGuard/Strings.php:283
|
1188 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
|
|
1189 |
#: src/lib/src/Modules/IPs/Strings.php:66
|
1190 |
#: src/lib/src/Modules/Lockdown/Strings.php:130
|
1191 |
#: src/lib/src/Modules/Lockdown/Strings.php:143
|
1192 |
#: src/lib/src/Modules/Plugin/AdminNotices.php:88
|
1193 |
#: src/lib/src/Modules/Plugin/Strings.php:214
|
1194 |
#: src/lib/src/Modules/Traffic/Strings.php:54
|
1195 |
-
#: src/processors/hackprotect_scan_apc.php:
|
1196 |
-
#: src/processors/hackprotect_scan_mal.php:
|
1197 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
1198 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
1199 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
1200 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
1201 |
-
#: src/processors/loginprotect_wplogin.php:
|
1202 |
-
#: src/processors/loginprotect_wplogin.php:
|
1203 |
msgid "Warning"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: src/features/ips.php:
|
1207 |
msgid ""
|
1208 |
"Repeated login attempts that fail will result in a complete ban of your IP "
|
1209 |
"Address."
|
1210 |
msgstr ""
|
1211 |
|
1212 |
-
#: src/features/ips.php:
|
1213 |
#, php-format
|
1214 |
msgid ""
|
1215 |
"You have %s remaining offenses(s) against this site and then your IP address "
|
1216 |
"will be completely blocked."
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: src/features/ips.php:
|
1220 |
msgid "Seriously, stop repeating what you are doing or you will be locked out."
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: src/features/ips.php:
|
1224 |
#, php-format
|
1225 |
msgid ""
|
1226 |
"Sorry, the %s feature may not be disabled while there are IP addresses in "
|
1227 |
"the White List"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: src/features/license.php:
|
1231 |
msgid "Automatic license verification failed."
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: src/features/license.php:
|
1235 |
msgid "Attempts to verify Shield Pro license has just failed."
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#: src/features/license.php:
|
1239 |
#, php-format
|
1240 |
msgid "Please check your license on-site: %s"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: src/features/license.php:
|
1244 |
#, php-format
|
1245 |
msgid "If this problem persists, please contact support: %s"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: src/features/license.php:
|
1249 |
msgid "All attempts to verify Shield Pro license have failed."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: src/features/license.php:
|
1253 |
msgid "Not Active"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#: src/features/lockdown.php:70 src/lib/src/Modules/Plugin/Strings.php:
|
1257 |
msgid "WP Lockdown"
|
1258 |
msgstr ""
|
1259 |
|
@@ -1391,14 +1396,14 @@ msgstr ""
|
|
1391 |
|
1392 |
#: src/features/login_protect.php:511
|
1393 |
#: src/lib/src/Modules/Plugin/AdminNotices.php:194
|
1394 |
-
#: src/processors/lockdown.php:
|
1395 |
msgid "Learn More."
|
1396 |
msgstr ""
|
1397 |
|
1398 |
#: src/features/login_protect.php:592
|
1399 |
#: src/lib/src/Modules/LoginGuard/Strings.php:71
|
1400 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1401 |
-
#: src/wizards/plugin.php:
|
1402 |
msgid "Login Guard"
|
1403 |
msgstr ""
|
1404 |
|
@@ -1454,120 +1459,121 @@ msgstr ""
|
|
1454 |
msgid "No 2FA options, such as Google Authenticator, are active"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
-
#: src/features/plugin.php:
|
1458 |
msgid "Options imported successfully"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
-
#: src/features/plugin.php:
|
|
|
1462 |
#, php-format
|
1463 |
msgid "This Site Is Protected By %s"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#: src/features/plugin.php:
|
1467 |
#: src/processors/plugin_importexport.php:63
|
1468 |
msgid "General Settings"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
-
#: src/features/plugin.php:
|
1472 |
#, php-format
|
1473 |
msgid "General %s Settings"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: src/features/plugin.php:
|
1477 |
msgid "Visitor IP"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: src/features/plugin.php:
|
1481 |
#, php-format
|
1482 |
msgid "Visitor IP address source is: %s"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
-
#: src/features/plugin.php:
|
1486 |
msgid "Reporting Email"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
-
#: src/features/plugin.php:
|
1490 |
#, php-format
|
1491 |
msgid "Email address for reports set to: %s"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
-
#: src/features/plugin.php:
|
1495 |
#, php-format
|
1496 |
msgid "No address provided - defaulting to: %s"
|
1497 |
msgstr ""
|
1498 |
|
1499 |
-
#: src/features/plugin.php:
|
1500 |
msgid "reCAPTCHA"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
-
#: src/features/plugin.php:
|
1504 |
msgid "Google reCAPTCHA keys have been provided"
|
1505 |
msgstr ""
|
1506 |
|
1507 |
-
#: src/features/plugin.php:
|
1508 |
msgid "Google reCAPTCHA keys haven't been provided"
|
1509 |
msgstr ""
|
1510 |
|
1511 |
-
#: src/features/traffic.php:
|
1512 |
#, php-format
|
1513 |
msgid "%s is a Pro-only feature."
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: src/features/traffic.php:
|
1517 |
msgid ""
|
1518 |
"Traffic Watcher will not run because visitor IP address detection is not "
|
1519 |
"correctly configured."
|
1520 |
msgstr ""
|
1521 |
|
1522 |
-
#: src/features/user_management.php:
|
1523 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1524 |
msgid "Very Weak"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
-
#: src/features/user_management.php:
|
1528 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1529 |
msgid "Weak"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: src/features/user_management.php:
|
1533 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1534 |
msgid "Medium"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
-
#: src/features/user_management.php:
|
1538 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1539 |
msgid "Strong"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
-
#: src/features/user_management.php:
|
1543 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1544 |
msgid "Very Strong"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
-
#: src/features/user_management.php:
|
1548 |
msgid "Default 'admin' user still available."
|
1549 |
msgstr ""
|
1550 |
|
1551 |
-
#: src/features/user_management.php:
|
1552 |
msgid "Default 'admin' user should be disabled or removed."
|
1553 |
msgstr ""
|
1554 |
|
1555 |
-
#: src/features/user_management.php:
|
1556 |
#: src/lib/src/Modules/UserManagement/Strings.php:45
|
1557 |
#: src/lib/src/Modules/UserManagement/Strings.php:46
|
1558 |
msgid "Password Policies"
|
1559 |
msgstr ""
|
1560 |
|
1561 |
-
#: src/features/user_management.php:
|
1562 |
msgid "Strong password policies are not enforced."
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: src/features/user_management.php:
|
1566 |
msgid "Password policies should be turned-on."
|
1567 |
msgstr ""
|
1568 |
|
1569 |
-
#: src/features/user_management.php:
|
1570 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1571 |
#: src/lib/src/Modules/Sessions/Strings.php:24
|
1572 |
#: src/lib/src/Modules/Traffic/Strings.php:43
|
1573 |
#: src/lib/src/Modules/Traffic/Strings.php:53
|
@@ -1575,52 +1581,52 @@ msgstr ""
|
|
1575 |
msgid "User Management"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
-
#: src/features/user_management.php:
|
1579 |
msgid "Sessions Control & Password Policies"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: src/features/user_management.php:
|
1583 |
msgid "Idle Users"
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: src/features/user_management.php:
|
1587 |
#, php-format
|
1588 |
msgid "Idle sessions are terminated after %s hours"
|
1589 |
msgstr ""
|
1590 |
|
1591 |
-
#: src/features/user_management.php:
|
1592 |
msgid "Idle sessions wont be terminated"
|
1593 |
msgstr ""
|
1594 |
|
1595 |
-
#: src/features/user_management.php:
|
1596 |
msgid "Lock To IP"
|
1597 |
msgstr ""
|
1598 |
|
1599 |
-
#: src/features/user_management.php:
|
1600 |
msgid "Sessions are locked to IP address"
|
1601 |
msgstr ""
|
1602 |
|
1603 |
-
#: src/features/user_management.php:
|
1604 |
msgid "Sessions aren't locked to IP address"
|
1605 |
msgstr ""
|
1606 |
|
1607 |
-
#: src/features/user_management.php:
|
1608 |
msgid "Pwned Passwords"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: src/features/user_management.php:
|
1612 |
msgid "Pwned passwords are blocked on this site"
|
1613 |
msgstr ""
|
1614 |
|
1615 |
-
#: src/features/user_management.php:
|
1616 |
msgid "Pwned passwords are allowed on this site"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
-
#: src/features/user_management.php:
|
1620 |
msgid "Several password policies are active"
|
1621 |
msgstr ""
|
1622 |
|
1623 |
-
#: src/features/user_management.php:
|
1624 |
msgid "Limited or no password polices are active"
|
1625 |
msgstr ""
|
1626 |
|
@@ -1789,13 +1795,13 @@ msgid "Posts"
|
|
1789 |
msgstr ""
|
1790 |
|
1791 |
#: src/lib/src/Modules/AuditTrail/Strings.php:95
|
1792 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1793 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
1794 |
msgid "Emails"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
#: src/lib/src/Modules/AuditTrail/Strings.php:96
|
1798 |
-
#: src/processors/user_management.php:
|
1799 |
msgid "Time"
|
1800 |
msgstr ""
|
1801 |
|
@@ -1815,14 +1821,14 @@ msgstr ""
|
|
1815 |
|
1816 |
#: src/lib/src/Modules/AuditTrail/Strings.php:101
|
1817 |
#: src/lib/src/Modules/Base/Strings.php:44
|
1818 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
1819 |
#: src/lib/src/Tables/Render/IpBase.php:21
|
1820 |
#: src/lib/src/Tables/Render/IpBlack.php:16
|
1821 |
-
#: src/lib/src/Tables/Render/IpWhite.php:12 src/processors/firewall.php:
|
1822 |
#: src/processors/loginprotect_intentprovider_backup.php:165
|
1823 |
#: src/processors/loginprotect_intentprovider_email.php:156
|
1824 |
-
#: src/processors/user_management.php:
|
1825 |
-
#: src/processors/user_management.php:
|
1826 |
msgid "IP Address"
|
1827 |
msgstr ""
|
1828 |
|
@@ -2075,16 +2081,16 @@ msgstr ""
|
|
2075 |
msgid "Specify which types of actions on your site are logged."
|
2076 |
msgstr ""
|
2077 |
|
2078 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2079 |
#: src/lib/src/Modules/Autoupdates/Strings.php:90
|
2080 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:104
|
2081 |
#: src/lib/src/Modules/Firewall/Strings.php:80
|
2082 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
2083 |
#: src/lib/src/Modules/Headers/Strings.php:67
|
2084 |
#: src/lib/src/Modules/IPs/Strings.php:117
|
2085 |
#: src/lib/src/Modules/Lockdown/Strings.php:89
|
2086 |
#: src/lib/src/Modules/LoginGuard/Strings.php:164
|
2087 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
2088 |
#: src/lib/src/Modules/Sessions/Strings.php:50
|
2089 |
#: src/lib/src/Modules/Traffic/Strings.php:83
|
2090 |
#: src/lib/src/Modules/UserManagement/Strings.php:113
|
@@ -2092,10 +2098,10 @@ msgstr ""
|
|
2092 |
msgid "Enable %s Module"
|
2093 |
msgstr ""
|
2094 |
|
2095 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2096 |
#: src/lib/src/Modules/Autoupdates/Strings.php:91
|
2097 |
#: src/lib/src/Modules/Firewall/Strings.php:81
|
2098 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
2099 |
#: src/lib/src/Modules/Headers/Strings.php:68
|
2100 |
#: src/lib/src/Modules/IPs/Strings.php:118
|
2101 |
#: src/lib/src/Modules/Lockdown/Strings.php:90
|
@@ -2107,11 +2113,11 @@ msgstr ""
|
|
2107 |
msgid "Enable (or Disable) The %s Module"
|
2108 |
msgstr ""
|
2109 |
|
2110 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2111 |
#: src/lib/src/Modules/Autoupdates/Strings.php:92
|
2112 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:106
|
2113 |
#: src/lib/src/Modules/Firewall/Strings.php:82
|
2114 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
2115 |
#: src/lib/src/Modules/Headers/Strings.php:69
|
2116 |
#: src/lib/src/Modules/IPs/Strings.php:119
|
2117 |
#: src/lib/src/Modules/Lockdown/Strings.php:91
|
@@ -2123,145 +2129,145 @@ msgstr ""
|
|
2123 |
msgid "Un-Checking this option will completely disable the %s module."
|
2124 |
msgstr ""
|
2125 |
|
2126 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2127 |
msgid "Max Trail Length"
|
2128 |
msgstr ""
|
2129 |
|
2130 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2131 |
msgid "Maximum Audit Trail Length To Keep"
|
2132 |
msgstr ""
|
2133 |
|
2134 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2135 |
msgid ""
|
2136 |
"Automatically remove any audit trail entries when this limit is exceeded."
|
2137 |
msgstr ""
|
2138 |
|
2139 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2140 |
msgid "Auto Clean"
|
2141 |
msgstr ""
|
2142 |
|
2143 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2144 |
msgid "Automatically Purge Audit Log Entries Older Than The Set Number Of Days"
|
2145 |
msgstr ""
|
2146 |
|
2147 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2148 |
msgid ""
|
2149 |
"Events older than the number of days specified will be automatically cleaned "
|
2150 |
"from the database."
|
2151 |
msgstr ""
|
2152 |
|
2153 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:205
|
2154 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:206
|
2155 |
#: src/lib/src/Modules/AuditTrail/Strings.php:207
|
|
|
|
|
2156 |
msgid "Users And Logins"
|
2157 |
msgstr ""
|
2158 |
|
2159 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2160 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2161 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2162 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2163 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2164 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2165 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2166 |
#, php-format
|
2167 |
msgid "Enable Audit Context - %s"
|
2168 |
msgstr ""
|
2169 |
|
2170 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2171 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2172 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2173 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2174 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2175 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2176 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2177 |
#, php-format
|
2178 |
msgid ""
|
2179 |
"When this context is enabled, the audit trail will track activity relating "
|
2180 |
"to: %s"
|
2181 |
msgstr ""
|
2182 |
|
2183 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2184 |
msgid "WordPress Plugins"
|
2185 |
msgstr ""
|
2186 |
|
2187 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2188 |
msgid "WordPress Themes"
|
2189 |
msgstr ""
|
2190 |
|
2191 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2192 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2193 |
msgid "Posts And Pages"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2197 |
msgid "Editing and publishing of posts and pages"
|
2198 |
msgstr ""
|
2199 |
|
2200 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2201 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2202 |
msgid "WordPress And Settings"
|
2203 |
msgstr ""
|
2204 |
|
2205 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2206 |
msgid "WordPress upgrades and changes to particular WordPress settings"
|
2207 |
msgstr ""
|
2208 |
|
2209 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2210 |
msgid "Email Sending"
|
2211 |
msgstr ""
|
2212 |
|
2213 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2214 |
msgid "Site Change Tracking"
|
2215 |
msgstr ""
|
2216 |
|
2217 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2218 |
msgid "Track Major Changes To Your Site"
|
2219 |
msgstr ""
|
2220 |
|
2221 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2222 |
msgid ""
|
2223 |
"Tracking major changes to your site will help you monitor and catch "
|
2224 |
"malicious damage."
|
2225 |
msgstr ""
|
2226 |
|
2227 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2228 |
msgid "Snapshot Per Week"
|
2229 |
msgstr ""
|
2230 |
|
2231 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2232 |
msgid "Number Of Snapshots To Take Per Week"
|
2233 |
msgstr ""
|
2234 |
|
2235 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2236 |
msgid ""
|
2237 |
"The number of snapshots to take per week. For daily snapshots, select 7."
|
2238 |
msgstr ""
|
2239 |
|
2240 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2241 |
msgid "Data storage in your database increases with the number of snapshots."
|
2242 |
msgstr ""
|
2243 |
|
2244 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2245 |
msgid ""
|
2246 |
"However, increased snapshots provide more granular information on when major "
|
2247 |
"site changes occurred."
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2251 |
msgid "Max Snapshots"
|
2252 |
msgstr ""
|
2253 |
|
2254 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2255 |
msgid "Maximum Number Of Snapshots To Retain"
|
2256 |
msgstr ""
|
2257 |
|
2258 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2259 |
msgid ""
|
2260 |
"The more snapshots you retain, the further back you can look at changes over "
|
2261 |
"your site."
|
2262 |
msgstr ""
|
2263 |
|
2264 |
-
#: src/lib/src/Modules/AuditTrail/Strings.php:
|
2265 |
msgid ""
|
2266 |
"You will need to consider the implications to database storage requirements."
|
2267 |
msgstr ""
|
@@ -2532,8 +2538,8 @@ msgstr ""
|
|
2532 |
msgid "No Wizards"
|
2533 |
msgstr ""
|
2534 |
|
2535 |
-
#: src/lib/src/Modules/Base/Strings.php:28 src/lib/src/Tables/Build/Ip.php:
|
2536 |
-
#: src/lib/src/Tables/Build/ScanBase.php:
|
2537 |
#: src/lib/src/Tables/Build/Sessions.php:68
|
2538 |
#: src/lib/src/Tables/Build/Traffic.php:85
|
2539 |
#: src/lib/src/Tables/Build/Traffic.php:109
|
@@ -2622,11 +2628,11 @@ msgid "Please upgrade to Pro to control this option"
|
|
2622 |
msgstr ""
|
2623 |
|
2624 |
#: src/lib/src/Modules/Base/Strings.php:56
|
2625 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
2626 |
msgid "Description"
|
2627 |
msgstr ""
|
2628 |
|
2629 |
-
#: src/lib/src/Modules/Base/Strings.php:57 src/processors/ips.php:
|
2630 |
#: src/processors/loginprotect_gasp.php:31
|
2631 |
msgid "Loading"
|
2632 |
msgstr ""
|
@@ -2903,7 +2909,7 @@ msgid "Enable (or Disable) The Comment SPAM Protection Feature"
|
|
2903 |
msgstr ""
|
2904 |
|
2905 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:106
|
2906 |
-
#: src/wizards/plugin.php:
|
2907 |
msgid "Comment SPAM Protection"
|
2908 |
msgstr ""
|
2909 |
|
@@ -2943,27 +2949,27 @@ msgid "Specify user roles here that shouldn't be scanned."
|
|
2943 |
msgstr ""
|
2944 |
|
2945 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:121
|
2946 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:341
|
2947 |
#: src/lib/src/Modules/HackGuard/Strings.php:342
|
2948 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
|
|
2949 |
#: src/lib/src/Modules/LoginGuard/Strings.php:222
|
2950 |
#: src/lib/src/Modules/Plugin/Strings.php:239
|
2951 |
#: src/lib/src/Modules/Plugin/Strings.php:246
|
2952 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:70
|
2953 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
2954 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
2955 |
-
#: src/processors/hackprotect_scan_mal.php:
|
2956 |
#: src/processors/loginprotect_intentprovider_backup.php:29
|
2957 |
msgid "Important"
|
2958 |
msgstr ""
|
2959 |
|
2960 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:121
|
2961 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
2962 |
msgid "Take a new line for each user role."
|
2963 |
msgstr ""
|
2964 |
|
2965 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:122
|
2966 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
2967 |
msgid "Available Roles"
|
2968 |
msgstr ""
|
2969 |
|
@@ -3395,46 +3401,46 @@ msgid "Firewall Block"
|
|
3395 |
msgstr ""
|
3396 |
|
3397 |
#: src/lib/src/Modules/Events/Strings.php:162
|
3398 |
-
#: src/lib/src/Modules/Firewall/Strings.php:194 src/processors/firewall.php:
|
3399 |
msgid "Directory Traversal"
|
3400 |
msgstr ""
|
3401 |
|
3402 |
#: src/lib/src/Modules/Events/Strings.php:166
|
3403 |
#: src/lib/src/Modules/Firewall/Strings.php:104
|
3404 |
-
#: src/lib/src/Modules/Firewall/Strings.php:197 src/processors/firewall.php:
|
3405 |
msgid "WordPress Terms"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
#: src/lib/src/Modules/Events/Strings.php:170
|
3409 |
#: src/lib/src/Modules/Firewall/Strings.php:110
|
3410 |
-
#: src/lib/src/Modules/Firewall/Strings.php:200 src/processors/firewall.php:
|
3411 |
msgid "Field Truncation"
|
3412 |
msgstr ""
|
3413 |
|
3414 |
#: src/lib/src/Modules/Events/Strings.php:174
|
3415 |
#: src/lib/src/Modules/Firewall/Strings.php:98
|
3416 |
-
#: src/lib/src/Modules/Firewall/Strings.php:203 src/processors/firewall.php:
|
3417 |
msgid "SQL Queries"
|
3418 |
msgstr ""
|
3419 |
|
3420 |
#: src/lib/src/Modules/Events/Strings.php:178
|
3421 |
-
#: src/lib/src/Modules/Firewall/Strings.php:206 src/processors/firewall.php:
|
3422 |
msgid "Leading Schema"
|
3423 |
msgstr ""
|
3424 |
|
3425 |
#: src/lib/src/Modules/Events/Strings.php:182
|
3426 |
-
#: src/lib/src/Modules/Firewall/Strings.php:209 src/processors/firewall.php:
|
3427 |
msgid "Aggressive Rules"
|
3428 |
msgstr ""
|
3429 |
|
3430 |
#: src/lib/src/Modules/Events/Strings.php:186
|
3431 |
#: src/lib/src/Modules/Firewall/Strings.php:116
|
3432 |
-
#: src/lib/src/Modules/Firewall/Strings.php:212 src/processors/firewall.php:
|
3433 |
msgid "PHP Code"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
#: src/lib/src/Modules/Events/Strings.php:190
|
3437 |
-
#: src/lib/src/Modules/Firewall/Strings.php:215 src/processors/firewall.php:
|
3438 |
msgid "EXE File Uploads"
|
3439 |
msgstr ""
|
3440 |
|
@@ -3523,7 +3529,6 @@ msgid "Plugin File Edited"
|
|
3523 |
msgstr ""
|
3524 |
|
3525 |
#: src/lib/src/Modules/Events/Strings.php:228
|
3526 |
-
#| msgid "License Options"
|
3527 |
msgid "Theme Activated"
|
3528 |
msgstr ""
|
3529 |
|
@@ -3592,12 +3597,10 @@ msgid "License Check Success"
|
|
3592 |
msgstr ""
|
3593 |
|
3594 |
#: src/lib/src/Modules/Events/Strings.php:245
|
3595 |
-
#| msgid "License Key"
|
3596 |
msgid "License Failure Email"
|
3597 |
msgstr ""
|
3598 |
|
3599 |
#: src/lib/src/Modules/Events/Strings.php:246
|
3600 |
-
#| msgid "License Options"
|
3601 |
msgid "License Deactivated"
|
3602 |
msgstr ""
|
3603 |
|
@@ -3872,7 +3875,7 @@ msgstr ""
|
|
3872 |
#: src/lib/src/Modules/Firewall/Strings.php:206
|
3873 |
#: src/lib/src/Modules/Firewall/Strings.php:209
|
3874 |
#: src/lib/src/Modules/Firewall/Strings.php:212
|
3875 |
-
#: src/lib/src/Modules/Firewall/Strings.php:215 src/processors/firewall.php:
|
3876 |
#, php-format
|
3877 |
msgid "Firewall Trigger: %s."
|
3878 |
msgstr ""
|
@@ -3887,11 +3890,11 @@ msgstr ""
|
|
3887 |
msgid "Failed to send Firewall Block email alert to: %s"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
-
#: src/lib/src/Modules/Firewall/Strings.php:228 src/processors/firewall.php:
|
3891 |
msgid "Page parameter failed firewall check."
|
3892 |
msgstr ""
|
3893 |
|
3894 |
-
#: src/lib/src/Modules/Firewall/Strings.php:229 src/processors/firewall.php:
|
3895 |
#, php-format
|
3896 |
msgid "The offending parameter was \"%s\" with a value of \"%s\"."
|
3897 |
msgstr ""
|
@@ -3913,7 +3916,7 @@ msgid "Visitor was sent 404"
|
|
3913 |
msgstr ""
|
3914 |
|
3915 |
#: src/lib/src/Modules/Firewall/Strings.php:248
|
3916 |
-
#: src/lib/src/Tables/Build/ScanWcf.php:
|
3917 |
#: src/lib/src/Tables/Build/Traffic.php:118
|
3918 |
#: src/lib/src/Tables/Build/Traffic.php:127
|
3919 |
msgid "Unknown"
|
@@ -3924,75 +3927,75 @@ msgstr ""
|
|
3924 |
msgid "Firewall Block Response: %s."
|
3925 |
msgstr ""
|
3926 |
|
3927 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3928 |
msgid "Unsupported scanner"
|
3929 |
msgstr ""
|
3930 |
|
3931 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3932 |
msgid "Unsupported item(s) selected"
|
3933 |
msgstr ""
|
3934 |
|
3935 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3936 |
msgid "Action successful."
|
3937 |
msgstr ""
|
3938 |
|
3939 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3940 |
msgid "An error occurred."
|
3941 |
msgstr ""
|
3942 |
|
3943 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3944 |
msgid "Some items may not have been processed."
|
3945 |
msgstr ""
|
3946 |
|
3947 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3948 |
msgid "Rescanning"
|
3949 |
msgstr ""
|
3950 |
|
3951 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3952 |
msgid "Reloading"
|
3953 |
msgstr ""
|
3954 |
|
3955 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3956 |
msgid "No scan running."
|
3957 |
msgstr ""
|
3958 |
|
3959 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3960 |
msgid "Current Scan"
|
3961 |
msgstr ""
|
3962 |
|
3963 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3964 |
#, php-format
|
3965 |
msgid "%s of %s scans remaining."
|
3966 |
msgstr ""
|
3967 |
|
3968 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3969 |
msgid "Please be patient."
|
3970 |
msgstr ""
|
3971 |
|
3972 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3973 |
msgid "Some scans can take quite a while to complete."
|
3974 |
msgstr ""
|
3975 |
|
3976 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3977 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3978 |
msgid "Scans completed."
|
3979 |
msgstr ""
|
3980 |
|
3981 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3982 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3983 |
#: src/lib/src/Modules/License/AjaxHandler.php:88
|
3984 |
msgid "Reloading page"
|
3985 |
msgstr ""
|
3986 |
|
3987 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3988 |
msgid "No scans were selected"
|
3989 |
msgstr ""
|
3990 |
|
3991 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3992 |
msgid "Scans started."
|
3993 |
msgstr ""
|
3994 |
|
3995 |
-
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:
|
3996 |
msgid "Please wait, as this will take a few moments."
|
3997 |
msgstr ""
|
3998 |
|
@@ -4039,7 +4042,7 @@ msgstr ""
|
|
4039 |
|
4040 |
#: src/lib/src/Modules/HackGuard/Strings.php:73
|
4041 |
#: src/lib/src/Modules/HackGuard/Strings.php:74
|
4042 |
-
#: src/processors/hack_protect.php:
|
4043 |
msgid "Scan Options"
|
4044 |
msgstr ""
|
4045 |
|
@@ -4071,7 +4074,7 @@ msgstr ""
|
|
4071 |
|
4072 |
#: src/lib/src/Modules/HackGuard/Strings.php:100
|
4073 |
#: src/lib/src/Modules/HackGuard/Strings.php:103
|
4074 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4075 |
msgid "Vulnerabilities Scanner"
|
4076 |
msgstr ""
|
4077 |
|
@@ -4102,7 +4105,7 @@ msgid ""
|
|
4102 |
msgstr ""
|
4103 |
|
4104 |
#: src/lib/src/Modules/HackGuard/Strings.php:119
|
4105 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4106 |
msgid "Unrecognised Files Scanner"
|
4107 |
msgstr ""
|
4108 |
|
@@ -4111,7 +4114,7 @@ msgid "Regularly scan your WordPress core folders for files that don't belong."
|
|
4111 |
msgstr ""
|
4112 |
|
4113 |
#: src/lib/src/Modules/HackGuard/Strings.php:127
|
4114 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4115 |
msgid "Enable The Abandoned Plugin Scanner"
|
4116 |
msgstr ""
|
4117 |
|
@@ -4166,230 +4169,230 @@ msgstr ""
|
|
4166 |
msgid "Enable these to prevent unauthorized changes to your WordPress site."
|
4167 |
msgstr ""
|
4168 |
|
4169 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4170 |
msgid "Daily Scan Frequency"
|
4171 |
msgstr ""
|
4172 |
|
4173 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4174 |
msgid "Number Of Times To Automatically Run File Scan In 24hrs"
|
4175 |
msgstr ""
|
4176 |
|
4177 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4178 |
msgid "Once every 24hrs."
|
4179 |
msgstr ""
|
4180 |
|
4181 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4182 |
msgid "To improve security, increase the number of scans per day."
|
4183 |
msgstr ""
|
4184 |
|
4185 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4186 |
msgid "Repeat Notifications"
|
4187 |
msgstr ""
|
4188 |
|
4189 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4190 |
msgid "Item Repeat Notifications Suppression Interval"
|
4191 |
msgstr ""
|
4192 |
|
4193 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4194 |
msgid ""
|
4195 |
"How long the automated scans should wait before repeating a notification "
|
4196 |
"about an item."
|
4197 |
msgstr ""
|
4198 |
|
4199 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4200 |
msgid "Specify the number of days to suppress repeat notifications."
|
4201 |
msgstr ""
|
4202 |
|
4203 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4204 |
msgid "This is per discovered item or file, not per scan."
|
4205 |
msgstr ""
|
4206 |
|
4207 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4208 |
msgid "Email Files List"
|
4209 |
msgstr ""
|
4210 |
|
4211 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4212 |
msgid "Scan Notification Emails Should Include Full Listing Of Files"
|
4213 |
msgstr ""
|
4214 |
|
4215 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4216 |
msgid ""
|
4217 |
"Scanner notification emails will include a summary list of all affected "
|
4218 |
"files."
|
4219 |
msgstr ""
|
4220 |
|
4221 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4222 |
#, php-format
|
4223 |
msgid "Daily Cron - %s"
|
4224 |
msgstr ""
|
4225 |
|
4226 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4227 |
msgid "Scans Plugins For Known Vulnerabilities"
|
4228 |
msgstr ""
|
4229 |
|
4230 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4231 |
msgid ""
|
4232 |
"Runs a scan of all your plugins against a database of known WordPress plugin "
|
4233 |
"vulnerabilities."
|
4234 |
msgstr ""
|
4235 |
|
4236 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4237 |
msgid "Vulnerability Scanner"
|
4238 |
msgstr ""
|
4239 |
|
4240 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4241 |
msgid "Enable The Vulnerability Scanner"
|
4242 |
msgstr ""
|
4243 |
|
4244 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4245 |
msgid ""
|
4246 |
"Runs a scan of all your plugins against a database of known WordPress "
|
4247 |
"vulnerabilities."
|
4248 |
msgstr ""
|
4249 |
|
4250 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4251 |
msgid "Apply Updates Automatically To Vulnerable Plugins"
|
4252 |
msgstr ""
|
4253 |
|
4254 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4255 |
msgid ""
|
4256 |
"When an update becomes available, automatically apply updates to items with "
|
4257 |
"known vulnerabilities."
|
4258 |
msgstr ""
|
4259 |
|
4260 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4261 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4262 |
msgid "Highlight Plugins"
|
4263 |
msgstr ""
|
4264 |
|
4265 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4266 |
msgid "Highlight Vulnerable Plugins Upon Display"
|
4267 |
msgstr ""
|
4268 |
|
4269 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4270 |
msgid "Vulnerable plugins will be highlighted on the main plugins page."
|
4271 |
msgstr ""
|
4272 |
|
4273 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4274 |
msgid "WP Core File Scanner"
|
4275 |
msgstr ""
|
4276 |
|
4277 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4278 |
msgid "Automatically Scans WordPress Core Files For Changes"
|
4279 |
msgstr ""
|
4280 |
|
4281 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4282 |
msgid ""
|
4283 |
"Compares all WordPress core files on your site against the official "
|
4284 |
"WordPress files."
|
4285 |
msgstr ""
|
4286 |
|
4287 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4288 |
msgid "WordPress Core files should never be altered for any reason."
|
4289 |
msgstr ""
|
4290 |
|
4291 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4292 |
msgid "Auto Repair"
|
4293 |
msgstr ""
|
4294 |
|
4295 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4296 |
msgid "Automatically Repair WordPress Core Files That Have Been Altered"
|
4297 |
msgstr ""
|
4298 |
|
4299 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4300 |
msgid ""
|
4301 |
"Attempts to automatically repair WordPress Core files with the official "
|
4302 |
"WordPress file data, for files that have been altered or are missing."
|
4303 |
msgstr ""
|
4304 |
|
4305 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4306 |
msgid "Automatically Scans For Unrecognised Files In Core Directories"
|
4307 |
msgstr ""
|
4308 |
|
4309 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4310 |
msgid ""
|
4311 |
"Scans for, and automatically deletes, any files in your core WordPress "
|
4312 |
"folders that are not part of your WordPress installation."
|
4313 |
msgstr ""
|
4314 |
|
4315 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4316 |
msgid "Scan Uploads"
|
4317 |
msgstr ""
|
4318 |
|
4319 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4320 |
msgid "Scan Uploads Folder For PHP and Javascript"
|
4321 |
msgstr ""
|
4322 |
|
4323 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4324 |
msgid ""
|
4325 |
"Take care when turning on this option - if you are unsure, leave it disabled."
|
4326 |
msgstr ""
|
4327 |
|
4328 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4329 |
msgid ""
|
4330 |
"The Uploads folder is primarily for media, but could be used to store "
|
4331 |
"nefarious files."
|
4332 |
msgstr ""
|
4333 |
|
4334 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4335 |
msgid "File Exclusions"
|
4336 |
msgstr ""
|
4337 |
|
4338 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4339 |
msgid "Provide A List Of Files To Be Excluded From The Scan"
|
4340 |
msgstr ""
|
4341 |
|
4342 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4343 |
msgid "Take a new line for each file you wish to exclude from the scan."
|
4344 |
msgstr ""
|
4345 |
|
4346 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4347 |
msgid "No commas are necessary."
|
4348 |
msgstr ""
|
4349 |
|
4350 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4351 |
msgid "Enable Integrity Scan"
|
4352 |
msgstr ""
|
4353 |
|
4354 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4355 |
msgid "Scans For Critical Changes Made To Your WordPress Site"
|
4356 |
msgstr ""
|
4357 |
|
4358 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4359 |
msgid "Detects changes made to your WordPress site outside of WordPress."
|
4360 |
msgstr ""
|
4361 |
|
4362 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4363 |
msgid "Monitor User Accounts"
|
4364 |
msgstr ""
|
4365 |
|
4366 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4367 |
msgid "Scans For Critical Changes Made To User Accounts"
|
4368 |
msgstr ""
|
4369 |
|
4370 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4371 |
msgid ""
|
4372 |
"Detects changes made to critical user account information that were made "
|
4373 |
"directly on the database and outside of the WordPress system."
|
4374 |
msgstr ""
|
4375 |
|
4376 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4377 |
msgid "An example of this might be some form of SQL Injection attack."
|
4378 |
msgstr ""
|
4379 |
|
4380 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4381 |
msgid ""
|
4382 |
"Enabling this option for every page low may slow down your site with large "
|
4383 |
"numbers of users."
|
4384 |
msgstr ""
|
4385 |
|
4386 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4387 |
msgid ""
|
4388 |
"This option may cause critical problem with 3rd party plugins that manage "
|
4389 |
"user accounts."
|
4390 |
msgstr ""
|
4391 |
|
4392 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4393 |
#: src/lib/src/Modules/Headers/Strings.php:98
|
4394 |
#: src/lib/src/Modules/Headers/Strings.php:99
|
4395 |
#: src/lib/src/Modules/LoginGuard/Strings.php:180
|
@@ -4399,171 +4402,171 @@ msgstr ""
|
|
4399 |
msgid "Enable %s"
|
4400 |
msgstr ""
|
4401 |
|
4402 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4403 |
msgid "Guard"
|
4404 |
msgstr ""
|
4405 |
|
4406 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4407 |
msgid "Enable The Guard For Plugin And Theme Files"
|
4408 |
msgstr ""
|
4409 |
|
4410 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4411 |
msgid ""
|
4412 |
"When enabled the Guard will automatically scan for changes to your Plugin "
|
4413 |
"and Theme files."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4417 |
msgid "Guard/Scan Depth"
|
4418 |
msgstr ""
|
4419 |
|
4420 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4421 |
msgid "How Deep Into The Plugin Directories To Scan And Guard"
|
4422 |
msgstr ""
|
4423 |
|
4424 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4425 |
msgid ""
|
4426 |
"The Guard normally scans only the top level of a folder. Increasing depth "
|
4427 |
"will increase scan times."
|
4428 |
msgstr ""
|
4429 |
|
4430 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4431 |
#, php-format
|
4432 |
msgid ""
|
4433 |
"Setting it to %s will remove this limit and all sub-folders will be scanned "
|
4434 |
"- not recommended"
|
4435 |
msgstr ""
|
4436 |
|
4437 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4438 |
msgid "Included File Types"
|
4439 |
msgstr ""
|
4440 |
|
4441 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4442 |
msgid "The File Types (by File Extension) Included In The Scan"
|
4443 |
msgstr ""
|
4444 |
|
4445 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4446 |
msgid "Take a new line for each file extension."
|
4447 |
msgstr ""
|
4448 |
|
4449 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4450 |
msgid "No commas(,) or periods(.) necessary."
|
4451 |
msgstr ""
|
4452 |
|
4453 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4454 |
msgid "Remove all extensions to scan all file type (not recommended)."
|
4455 |
msgstr ""
|
4456 |
|
4457 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4458 |
msgid "Show Re-Install Links"
|
4459 |
msgstr ""
|
4460 |
|
4461 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4462 |
msgid "Show Re-Install Links For Plugins"
|
4463 |
msgstr ""
|
4464 |
|
4465 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4466 |
msgid ""
|
4467 |
"Show links to re-install plugins and offer re-install when activating "
|
4468 |
"plugins."
|
4469 |
msgstr ""
|
4470 |
|
4471 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4472 |
msgid "Abandoned Plugin Scanner"
|
4473 |
msgstr ""
|
4474 |
|
4475 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4476 |
msgid "Scan your WordPress.org assets for whether they've been abandoned."
|
4477 |
msgstr ""
|
4478 |
|
4479 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4480 |
msgid "Highlight Abandoned Plugins"
|
4481 |
msgstr ""
|
4482 |
|
4483 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4484 |
msgid "Abandoned plugins will be highlighted on the main plugins page."
|
4485 |
msgstr ""
|
4486 |
|
4487 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4488 |
msgid "Automatic Malware Scan"
|
4489 |
msgstr ""
|
4490 |
|
4491 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4492 |
msgid "Turn On Automatic Malware Scanning"
|
4493 |
msgstr ""
|
4494 |
|
4495 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4496 |
msgid ""
|
4497 |
"Automatically run scanner to detect files infected with malware signatures."
|
4498 |
msgstr ""
|
4499 |
|
4500 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4501 |
msgid "Auto-Repair WP Core"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4505 |
msgid "Automatically Repair WordPress Core Files"
|
4506 |
msgstr ""
|
4507 |
|
4508 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4509 |
msgid "Automatically reinstall any core files found to have potential malware."
|
4510 |
msgstr ""
|
4511 |
|
4512 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4513 |
msgid "Auto-Repair WP Plugins"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4517 |
msgid "Automatically Repair WordPress.org Plugins"
|
4518 |
msgstr ""
|
4519 |
|
4520 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4521 |
msgid "Automatically repair any plugin files found to have potential malware."
|
4522 |
msgstr ""
|
4523 |
|
4524 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4525 |
msgid "Only compatible with plugins installed from WordPress.org."
|
4526 |
msgstr ""
|
4527 |
|
4528 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4529 |
msgid ""
|
4530 |
"Also deletes suspected files if they weren't originally distributed with the "
|
4531 |
"plugin."
|
4532 |
msgstr ""
|
4533 |
|
4534 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4535 |
msgid "Surgical Auto-Repair"
|
4536 |
msgstr ""
|
4537 |
|
4538 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4539 |
msgid "Automatically Attempt To Surgically Remove Malware Code"
|
4540 |
msgstr ""
|
4541 |
|
4542 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4543 |
msgid "Attempts to automatically remove code from infected files."
|
4544 |
msgstr ""
|
4545 |
|
4546 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4547 |
msgid ""
|
4548 |
"This could break your site if code removal leaves remaining code in an "
|
4549 |
"inconsistent state."
|
4550 |
msgstr ""
|
4551 |
|
4552 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4553 |
msgid ""
|
4554 |
"Only applies to files that don't fall under the other categories for "
|
4555 |
"automatic repair."
|
4556 |
msgstr ""
|
4557 |
|
4558 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4559 |
msgid "WP Config"
|
4560 |
msgstr ""
|
4561 |
|
4562 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4563 |
msgid "Realtime Protection For WP Config File"
|
4564 |
msgstr ""
|
4565 |
|
4566 |
-
#: src/lib/src/Modules/HackGuard/Strings.php:
|
4567 |
msgid "Realtime protection for the wp-config.php file."
|
4568 |
msgstr ""
|
4569 |
|
@@ -4768,8 +4771,7 @@ msgid "%s is ignoring you"
|
|
4768 |
msgstr ""
|
4769 |
|
4770 |
#: src/lib/src/Modules/IPs/AdminNotices.php:40
|
4771 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
4772 |
-
#: src/processors/plugin_badge.php:43
|
4773 |
#, php-format
|
4774 |
msgid "Your IP address is: %s"
|
4775 |
msgstr ""
|
@@ -4839,7 +4841,7 @@ msgid ""
|
|
4839 |
msgstr ""
|
4840 |
|
4841 |
#: src/lib/src/Modules/IPs/Strings.php:28
|
4842 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
4843 |
#: src/wizards/plugin.php:519
|
4844 |
msgid "IP Manager"
|
4845 |
msgstr ""
|
@@ -5435,12 +5437,10 @@ msgid "Valid license couldn't be found."
|
|
5435 |
msgstr ""
|
5436 |
|
5437 |
#: src/lib/src/Modules/License/Strings.php:14
|
5438 |
-
#| msgid "License Key"
|
5439 |
msgid "License Summary"
|
5440 |
msgstr ""
|
5441 |
|
5442 |
#: src/lib/src/Modules/License/Strings.php:15
|
5443 |
-
#| msgid "License Options"
|
5444 |
msgid "License Activation"
|
5445 |
msgstr ""
|
5446 |
|
@@ -6019,8 +6019,8 @@ msgid "Two-Factor Login Authentication By %s"
|
|
6019 |
msgstr ""
|
6020 |
|
6021 |
#: src/lib/src/Modules/LoginGuard/Strings.php:205
|
6022 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6023 |
-
#: src/processors/user_management.php:
|
6024 |
msgid "Email"
|
6025 |
msgstr ""
|
6026 |
|
@@ -6069,7 +6069,7 @@ msgid "Use of any theme other than \"%s\", requires a Pro license."
|
|
6069 |
msgstr ""
|
6070 |
|
6071 |
#: src/lib/src/Modules/LoginGuard/Strings.php:220
|
6072 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6073 |
msgid "Light Theme"
|
6074 |
msgstr ""
|
6075 |
|
@@ -6476,6 +6476,21 @@ msgstr ""
|
|
6476 |
msgid "Note could not be created."
|
6477 |
msgstr ""
|
6478 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6479 |
#: src/lib/src/Modules/Plugin/Strings.php:15
|
6480 |
msgid "Plugin Actions"
|
6481 |
msgstr ""
|
@@ -6849,455 +6864,455 @@ msgstr ""
|
|
6849 |
msgid "How Google reCAPTCHA Will Be Displayed By Default"
|
6850 |
msgstr ""
|
6851 |
|
6852 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6853 |
msgid "Install"
|
6854 |
msgstr ""
|
6855 |
|
6856 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6857 |
msgid "Update"
|
6858 |
msgstr ""
|
6859 |
|
6860 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6861 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
6862 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
6863 |
msgid "Activate"
|
6864 |
msgstr ""
|
6865 |
|
6866 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6867 |
#: src/lib/src/Tables/Render/AdminNotes.php:20
|
6868 |
#: src/lib/src/Tables/Render/Base.php:203
|
6869 |
#: src/lib/src/Tables/Render/ScanUfc.php:29
|
6870 |
msgid "Delete"
|
6871 |
msgstr ""
|
6872 |
|
6873 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6874 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
6875 |
msgid "Edit Theme Options"
|
6876 |
msgstr ""
|
6877 |
|
6878 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6879 |
msgid "Create/Edit"
|
6880 |
msgstr ""
|
6881 |
|
6882 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6883 |
msgid "Publish"
|
6884 |
msgstr ""
|
6885 |
|
6886 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6887 |
msgid "Author Name"
|
6888 |
msgstr ""
|
6889 |
|
6890 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6891 |
msgid "Author Email"
|
6892 |
msgstr ""
|
6893 |
|
6894 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6895 |
msgid "Comment Content"
|
6896 |
msgstr ""
|
6897 |
|
6898 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6899 |
msgid "Browser User Agent"
|
6900 |
msgstr ""
|
6901 |
|
6902 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6903 |
msgid "Login"
|
6904 |
msgstr ""
|
6905 |
|
6906 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6907 |
msgid "Register"
|
6908 |
msgstr ""
|
6909 |
|
6910 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6911 |
msgid "Lost Password"
|
6912 |
msgstr ""
|
6913 |
|
6914 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6915 |
msgid "Checkout (WooCommerce)"
|
6916 |
msgstr ""
|
6917 |
|
6918 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6919 |
msgid "Simple Requests"
|
6920 |
msgstr ""
|
6921 |
|
6922 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6923 |
msgid "Logged-In Users"
|
6924 |
msgstr ""
|
6925 |
|
6926 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6927 |
msgid "Search Engines"
|
6928 |
msgstr ""
|
6929 |
|
6930 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6931 |
msgid "Uptime Monitoring Services"
|
6932 |
msgstr ""
|
6933 |
|
6934 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6935 |
msgid "Enabled With Email Reports"
|
6936 |
msgstr ""
|
6937 |
|
6938 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6939 |
msgid "Minor Versions Only"
|
6940 |
msgstr ""
|
6941 |
|
6942 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6943 |
msgid "Major and Minor Versions"
|
6944 |
msgstr ""
|
6945 |
|
6946 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6947 |
msgid "Let The Plugin Decide"
|
6948 |
msgstr ""
|
6949 |
|
6950 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6951 |
msgid "As Soon As Possible"
|
6952 |
msgstr ""
|
6953 |
|
6954 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6955 |
msgid "Move To Pending Moderation"
|
6956 |
msgstr ""
|
6957 |
|
6958 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6959 |
msgid "Move To SPAM"
|
6960 |
msgstr ""
|
6961 |
|
6962 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6963 |
msgid "Move To Trash"
|
6964 |
msgstr ""
|
6965 |
|
6966 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6967 |
msgid "Block And Redirect"
|
6968 |
msgstr ""
|
6969 |
|
6970 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6971 |
msgid "Invisible"
|
6972 |
msgstr ""
|
6973 |
|
6974 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6975 |
msgid "Default Style"
|
6976 |
msgstr ""
|
6977 |
|
6978 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6979 |
msgid "Redirect To Home Page"
|
6980 |
msgstr ""
|
6981 |
|
6982 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6983 |
msgid "Return 404"
|
6984 |
msgstr ""
|
6985 |
|
6986 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6987 |
msgid "Die"
|
6988 |
msgstr ""
|
6989 |
|
6990 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6991 |
msgid "Scan Disabled"
|
6992 |
msgstr ""
|
6993 |
|
6994 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6995 |
msgid "Scan Enabled"
|
6996 |
msgstr ""
|
6997 |
|
6998 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
6999 |
msgid "Automatic Scan Disabled"
|
7000 |
msgstr ""
|
7001 |
|
7002 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7003 |
msgid "Automatic Scan Enabled"
|
7004 |
msgstr ""
|
7005 |
|
7006 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7007 |
msgid "Scan Enabled - Send Email Notification"
|
7008 |
msgstr ""
|
7009 |
|
7010 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7011 |
msgid "Scan Enabled - No Email Notification"
|
7012 |
msgstr ""
|
7013 |
|
7014 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7015 |
msgid "Scan Enabled - Automatically Delete Files"
|
7016 |
msgstr ""
|
7017 |
|
7018 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7019 |
msgid "Scan Enabled - Delete Files and Send Email Notification"
|
7020 |
msgstr ""
|
7021 |
|
7022 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7023 |
msgid "Off: iFrames Not Blocked"
|
7024 |
msgstr ""
|
7025 |
|
7026 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7027 |
msgid "On: Allow iFrames On The Same Domain"
|
7028 |
msgstr ""
|
7029 |
|
7030 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7031 |
msgid "On: Block All iFrames"
|
7032 |
msgstr ""
|
7033 |
|
7034 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7035 |
msgid "Default: Full Referrer URL (aka 'Unsafe URL')"
|
7036 |
msgstr ""
|
7037 |
|
7038 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7039 |
msgid "No Referrer"
|
7040 |
msgstr ""
|
7041 |
|
7042 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7043 |
msgid "No Referrer When Downgrade"
|
7044 |
msgstr ""
|
7045 |
|
7046 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7047 |
msgid "Same Origin"
|
7048 |
msgstr ""
|
7049 |
|
7050 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7051 |
msgid "Origin"
|
7052 |
msgstr ""
|
7053 |
|
7054 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7055 |
msgid "Strict Origin"
|
7056 |
msgstr ""
|
7057 |
|
7058 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7059 |
msgid "Origin When Cross-Origin"
|
7060 |
msgstr ""
|
7061 |
|
7062 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7063 |
msgid "Strict Origin When Cross-Origin"
|
7064 |
msgstr ""
|
7065 |
|
7066 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7067 |
msgid "Empty Header"
|
7068 |
msgstr ""
|
7069 |
|
7070 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7071 |
msgid "Disabled - Don't Send This Header"
|
7072 |
msgstr ""
|
7073 |
|
7074 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7075 |
msgid "Minute"
|
7076 |
msgstr ""
|
7077 |
|
7078 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7079 |
msgid "Hour"
|
7080 |
msgstr ""
|
7081 |
|
7082 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7083 |
msgid "Day"
|
7084 |
msgstr ""
|
7085 |
|
7086 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7087 |
msgid "Week"
|
7088 |
msgstr ""
|
7089 |
|
7090 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7091 |
msgid "Month"
|
7092 |
msgstr ""
|
7093 |
|
7094 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7095 |
msgid "With Shield Bot Protection"
|
7096 |
msgstr ""
|
7097 |
|
7098 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7099 |
msgid "Audit Log Only"
|
7100 |
msgstr ""
|
7101 |
|
7102 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7103 |
msgid "Increment Offense Counter"
|
7104 |
msgstr ""
|
7105 |
|
7106 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7107 |
msgid "Double-Increment Offense Counter"
|
7108 |
msgstr ""
|
7109 |
|
7110 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7111 |
msgid "Immediate Block"
|
7112 |
msgstr ""
|
7113 |
|
7114 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7115 |
msgid "Security Dashboard"
|
7116 |
msgstr ""
|
7117 |
|
7118 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7119 |
msgid "Automatically Detect Visitor IP"
|
7120 |
msgstr ""
|
7121 |
|
7122 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7123 |
msgid "IP Address White List"
|
7124 |
msgstr ""
|
7125 |
|
7126 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7127 |
msgid ""
|
7128 |
"Any IP addresses on this list will by-pass all Plugin Security Checking."
|
7129 |
msgstr ""
|
7130 |
|
7131 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7132 |
msgid "Choose IP Addresses To Blacklist"
|
7133 |
msgstr ""
|
7134 |
|
7135 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7136 |
#, php-format
|
7137 |
msgid "Recommendation - %s"
|
7138 |
msgstr ""
|
7139 |
|
7140 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7141 |
msgid "Blacklist"
|
7142 |
msgstr ""
|
7143 |
|
7144 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7145 |
msgid "Logging"
|
7146 |
msgstr ""
|
7147 |
|
7148 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7149 |
#, php-format
|
7150 |
msgid ""
|
7151 |
"User \"%s\" was forcefully logged out as they were not verified by either "
|
7152 |
"cookie or IP address (or both)."
|
7153 |
msgstr ""
|
7154 |
|
7155 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7156 |
#, php-format
|
7157 |
msgid ""
|
7158 |
"User \"%s\" was found to be un-verified at the given IP Address: \"%s\"."
|
7159 |
msgstr ""
|
7160 |
|
7161 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7162 |
msgid "Cookie"
|
7163 |
msgstr ""
|
7164 |
|
7165 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7166 |
#: src/lib/src/Tables/Build/Traffic.php:140
|
7167 |
msgid "IP"
|
7168 |
msgstr ""
|
7169 |
|
7170 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7171 |
msgid ""
|
7172 |
"This will restrict all user login sessions to a single browser. Use this if "
|
7173 |
"your users have dynamic IP addresses."
|
7174 |
msgstr ""
|
7175 |
|
7176 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7177 |
msgid ""
|
7178 |
"All users will be required to authenticate their login by email-based two-"
|
7179 |
"factor authentication, when logging in from a new IP address"
|
7180 |
msgstr ""
|
7181 |
|
7182 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7183 |
msgid "2-Factor Auth"
|
7184 |
msgstr ""
|
7185 |
|
7186 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7187 |
msgid "Include Logged-In Users"
|
7188 |
msgstr ""
|
7189 |
|
7190 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7191 |
msgid "You may also enable GASP for logged in users"
|
7192 |
msgstr ""
|
7193 |
|
7194 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7195 |
msgid ""
|
7196 |
"Since logged-in users would be expected to be vetted already, this is off by "
|
7197 |
"default."
|
7198 |
msgstr ""
|
7199 |
|
7200 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7201 |
msgid "Protect your security plugin not just your WordPress site"
|
7202 |
msgstr ""
|
7203 |
|
7204 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7205 |
msgid "Get a view on what happens on your site, when it happens"
|
7206 |
msgstr ""
|
7207 |
|
7208 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7209 |
msgid "Audit Trail Viewer"
|
7210 |
msgstr ""
|
7211 |
|
7212 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7213 |
msgid "Take back full control of WordPress automatic updates"
|
7214 |
msgstr ""
|
7215 |
|
7216 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7217 |
msgid "Comments SPAM"
|
7218 |
msgstr ""
|
7219 |
|
7220 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7221 |
msgid "Block Bad IPs/Visitors"
|
7222 |
msgstr ""
|
7223 |
|
7224 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7225 |
msgid "Block comment SPAM and retain your privacy"
|
7226 |
msgstr ""
|
7227 |
|
7228 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7229 |
msgid "Automatically block malicious URLs and data sent to your site"
|
7230 |
msgstr ""
|
7231 |
|
7232 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7233 |
msgid "Control HTTP Security Headers"
|
7234 |
msgstr ""
|
7235 |
|
7236 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7237 |
msgid "Manage Visitor IP Address"
|
7238 |
msgstr ""
|
7239 |
|
7240 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7241 |
msgid "Harden the more loosely controlled settings of your site"
|
7242 |
msgstr ""
|
7243 |
|
7244 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7245 |
msgid ""
|
7246 |
"Block brute force attacks and secure user identities with Two-Factor "
|
7247 |
"Authentication"
|
7248 |
msgstr ""
|
7249 |
|
7250 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7251 |
msgid "Dashboard"
|
7252 |
msgstr ""
|
7253 |
|
7254 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7255 |
msgid "General Plugin Settings"
|
7256 |
msgstr ""
|
7257 |
|
7258 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7259 |
msgid "Statistics"
|
7260 |
msgstr ""
|
7261 |
|
7262 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7263 |
msgid "Summary of the main security actions taken by this plugin"
|
7264 |
msgstr ""
|
7265 |
|
7266 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7267 |
msgid "Stats Viewer"
|
7268 |
msgstr ""
|
7269 |
|
7270 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7271 |
msgid "Premium Support"
|
7272 |
msgstr ""
|
7273 |
|
7274 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7275 |
msgid "Premium Plugin Support Centre"
|
7276 |
msgstr ""
|
7277 |
|
7278 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7279 |
msgid ""
|
7280 |
"Get true user sessions and control account sharing, session duration and "
|
7281 |
"timeouts"
|
7282 |
msgstr ""
|
7283 |
|
7284 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7285 |
msgid "Two-Factor Authentication"
|
7286 |
msgstr ""
|
7287 |
|
7288 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7289 |
msgid "Dark Theme"
|
7290 |
msgstr ""
|
7291 |
|
7292 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7293 |
msgid "Once"
|
7294 |
msgstr ""
|
7295 |
|
7296 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7297 |
msgid "Twice"
|
7298 |
msgstr ""
|
7299 |
|
7300 |
-
#: src/lib/src/Modules/Plugin/Strings.php:
|
7301 |
msgid "Go To Security Dashboard"
|
7302 |
msgstr ""
|
7303 |
|
@@ -7343,7 +7358,7 @@ msgstr ""
|
|
7343 |
|
7344 |
#: src/lib/src/Modules/SecurityAdmin/AdminNotices.php:73
|
7345 |
#: src/lib/src/Modules/SecurityAdmin/AdminNotices.php:81
|
7346 |
-
#: src/processors/admin_access_restriction.php:
|
7347 |
msgid "Security Admin Login"
|
7348 |
msgstr ""
|
7349 |
|
@@ -7423,7 +7438,7 @@ msgstr ""
|
|
7423 |
|
7424 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:62
|
7425 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:75
|
7426 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7427 |
msgid "White Label"
|
7428 |
msgstr ""
|
7429 |
|
@@ -7436,296 +7451,296 @@ msgstr ""
|
|
7436 |
msgid "The Security Admin system must be active for these settings to apply."
|
7437 |
msgstr ""
|
7438 |
|
7439 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7440 |
msgid "Enforce Security Admin Access Restriction"
|
7441 |
msgstr ""
|
7442 |
|
7443 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7444 |
msgid ""
|
7445 |
"Enable this with great care and consideration. Ensure that you set a key "
|
7446 |
"that you have set an access key that you will remember."
|
7447 |
msgstr ""
|
7448 |
|
7449 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7450 |
msgid "Security Admin Access Key"
|
7451 |
msgstr ""
|
7452 |
|
7453 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7454 |
msgid "Provide/Update Security Admin Access Key"
|
7455 |
msgstr ""
|
7456 |
|
7457 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7458 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7459 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7460 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7461 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7462 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7463 |
msgid "Careful"
|
7464 |
msgstr ""
|
7465 |
|
7466 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7467 |
msgid ""
|
7468 |
"If you forget this, you could potentially lock yourself out from using this "
|
7469 |
"plugin."
|
7470 |
msgstr ""
|
7471 |
|
7472 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7473 |
msgid "Security Key Currently Set"
|
7474 |
msgstr ""
|
7475 |
|
7476 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7477 |
msgid "Security Key NOT Currently Set"
|
7478 |
msgstr ""
|
7479 |
|
7480 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7481 |
#, php-format
|
7482 |
msgid "To delete the current security key, type exactly \"%s\" and save."
|
7483 |
msgstr ""
|
7484 |
|
7485 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7486 |
msgid "Security Admins"
|
7487 |
msgstr ""
|
7488 |
|
7489 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7490 |
msgid "Persistent Security Admins"
|
7491 |
msgstr ""
|
7492 |
|
7493 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7494 |
msgid ""
|
7495 |
"Users provided will be security admins automatically, without needing the "
|
7496 |
"security key."
|
7497 |
msgstr ""
|
7498 |
|
7499 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7500 |
msgid "Enter admin username, email or ID."
|
7501 |
msgstr ""
|
7502 |
|
7503 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7504 |
msgid "1 entry per-line."
|
7505 |
msgstr ""
|
7506 |
|
7507 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7508 |
msgid "Verified users will be converted to usernames."
|
7509 |
msgstr ""
|
7510 |
|
7511 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7512 |
msgid "Security Admin Timeout"
|
7513 |
msgstr ""
|
7514 |
|
7515 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7516 |
msgid "Specify An Automatic Timeout Interval For Security Admin Access"
|
7517 |
msgstr ""
|
7518 |
|
7519 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7520 |
msgid "This will automatically expire your Security Admin Session."
|
7521 |
msgstr ""
|
7522 |
|
7523 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7524 |
msgid "Pages"
|
7525 |
msgstr ""
|
7526 |
|
7527 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7528 |
msgid "Restrict Access To Key WordPress Posts And Pages Actions"
|
7529 |
msgstr ""
|
7530 |
|
7531 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7532 |
msgid "This will restrict access to page/post creation, editing and deletion."
|
7533 |
msgstr ""
|
7534 |
|
7535 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7536 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7537 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7538 |
#, php-format
|
7539 |
msgid "Selecting \"%s\" will also restrict all other options."
|
7540 |
msgstr ""
|
7541 |
|
7542 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7543 |
msgid "Edit"
|
7544 |
msgstr ""
|
7545 |
|
7546 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7547 |
msgid "Restrict Access To Key WordPress Plugin Actions"
|
7548 |
msgstr ""
|
7549 |
|
7550 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7551 |
msgid ""
|
7552 |
"This will restrict access to plugin installation, update, activation and "
|
7553 |
"deletion."
|
7554 |
msgstr ""
|
7555 |
|
7556 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7557 |
msgid "WordPress Options"
|
7558 |
msgstr ""
|
7559 |
|
7560 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7561 |
msgid "Restrict Access To Certain WordPress Admin Options"
|
7562 |
msgstr ""
|
7563 |
|
7564 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7565 |
msgid ""
|
7566 |
"This will restrict the ability of WordPress administrators from changing key "
|
7567 |
"WordPress settings."
|
7568 |
msgstr ""
|
7569 |
|
7570 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7571 |
msgid "Admin Users"
|
7572 |
msgstr ""
|
7573 |
|
7574 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7575 |
msgid "Restrict Access To Create/Delete/Modify Other Admin Users"
|
7576 |
msgstr ""
|
7577 |
|
7578 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7579 |
msgid ""
|
7580 |
"This will restrict the ability of WordPress administrators from creating, "
|
7581 |
"modifying or promoting other administrators."
|
7582 |
msgstr ""
|
7583 |
|
7584 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7585 |
msgid "Restrict Access To WordPress Theme Actions"
|
7586 |
msgstr ""
|
7587 |
|
7588 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7589 |
msgid ""
|
7590 |
"This will restrict access to theme installation, update, activation and "
|
7591 |
"deletion."
|
7592 |
msgstr ""
|
7593 |
|
7594 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7595 |
#, php-format
|
7596 |
msgid "%s and %s"
|
7597 |
msgstr ""
|
7598 |
|
7599 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7600 |
msgid "Enable"
|
7601 |
msgstr ""
|
7602 |
|
7603 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7604 |
msgid "Activate Your White Label Settings"
|
7605 |
msgstr ""
|
7606 |
|
7607 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7608 |
msgid "Turn on/off the application of your White Label settings."
|
7609 |
msgstr ""
|
7610 |
|
7611 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7612 |
msgid "Hide Updates"
|
7613 |
msgstr ""
|
7614 |
|
7615 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7616 |
msgid "Hide Plugin Updates From Non-Security Admins"
|
7617 |
msgstr ""
|
7618 |
|
7619 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7620 |
#, php-format
|
7621 |
msgid "Hide available %s updates from non-security administrators."
|
7622 |
msgstr ""
|
7623 |
|
7624 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7625 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7626 |
msgid "Plugin Name"
|
7627 |
msgstr ""
|
7628 |
|
7629 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7630 |
msgid "The Name Of The Plugin"
|
7631 |
msgstr ""
|
7632 |
|
7633 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7634 |
msgid "The name of the plugin that will be displayed to your site users."
|
7635 |
msgstr ""
|
7636 |
|
7637 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7638 |
msgid "Menu Title"
|
7639 |
msgstr ""
|
7640 |
|
7641 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7642 |
msgid "The Main Menu Title Of The Plugin"
|
7643 |
msgstr ""
|
7644 |
|
7645 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7646 |
#, php-format
|
7647 |
msgid ""
|
7648 |
"The Main Menu Title Of The Plugin. If left empty, the \"%s\" will be used."
|
7649 |
msgstr ""
|
7650 |
|
7651 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7652 |
msgid "Company Name"
|
7653 |
msgstr ""
|
7654 |
|
7655 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7656 |
msgid "The Name Of Your Company"
|
7657 |
msgstr ""
|
7658 |
|
7659 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7660 |
msgid "Provide the name of your company."
|
7661 |
msgstr ""
|
7662 |
|
7663 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7664 |
msgid "The Description Of The Plugin"
|
7665 |
msgstr ""
|
7666 |
|
7667 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7668 |
msgid "The description of the plugin displayed on the plugins page."
|
7669 |
msgstr ""
|
7670 |
|
7671 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7672 |
msgid "Home URL"
|
7673 |
msgstr ""
|
7674 |
|
7675 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7676 |
msgid "Plugin Home Page URL"
|
7677 |
msgstr ""
|
7678 |
|
7679 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7680 |
msgid ""
|
7681 |
"When a user clicks the home link for this plugin, this is where they'll be "
|
7682 |
"directed."
|
7683 |
msgstr ""
|
7684 |
|
7685 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7686 |
msgid "Menu Icon"
|
7687 |
msgstr ""
|
7688 |
|
7689 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7690 |
msgid "Menu Icon URL"
|
7691 |
msgstr ""
|
7692 |
|
7693 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7694 |
msgid "The URL of the icon to display in the menu."
|
7695 |
msgstr ""
|
7696 |
|
7697 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7698 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7699 |
#, php-format
|
7700 |
msgid "The %s should measure %s."
|
7701 |
msgstr ""
|
7702 |
|
7703 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7704 |
msgid "icon"
|
7705 |
msgstr ""
|
7706 |
|
7707 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7708 |
msgid "Dashboard Logo"
|
7709 |
msgstr ""
|
7710 |
|
7711 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7712 |
msgid "Dashboard Logo URL"
|
7713 |
msgstr ""
|
7714 |
|
7715 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7716 |
msgid "The URL of the logo to display in the admin pages."
|
7717 |
msgstr ""
|
7718 |
|
7719 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7720 |
msgid "logo"
|
7721 |
msgstr ""
|
7722 |
|
7723 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7724 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7725 |
msgid "2FA Login Logo URL"
|
7726 |
msgstr ""
|
7727 |
|
7728 |
-
#: src/lib/src/Modules/SecurityAdmin/Strings.php:
|
7729 |
msgid ""
|
7730 |
"The URL of the logo to display on the Two-Factor Authentication login page."
|
7731 |
msgstr ""
|
@@ -8082,302 +8097,306 @@ msgstr ""
|
|
8082 |
msgid "No email address - No Notification."
|
8083 |
msgstr ""
|
8084 |
|
8085 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8086 |
-
msgid "
|
8087 |
msgstr ""
|
8088 |
|
8089 |
#: src/lib/src/Modules/UserManagement/Strings.php:127
|
8090 |
-
msgid "
|
8091 |
msgstr ""
|
8092 |
|
8093 |
#: src/lib/src/Modules/UserManagement/Strings.php:128
|
|
|
|
|
|
|
|
|
8094 |
msgid ""
|
8095 |
"A notification is sent to each user when a successful login occurs for their "
|
8096 |
"account."
|
8097 |
msgstr ""
|
8098 |
|
8099 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8100 |
msgid "Session Timeout"
|
8101 |
msgstr ""
|
8102 |
|
8103 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8104 |
msgid "Specify How Many Days After Login To Automatically Force Re-Login"
|
8105 |
msgstr ""
|
8106 |
|
8107 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8108 |
msgid ""
|
8109 |
"WordPress default is 2 days, or 14 days if you check the \"Remember Me\" box."
|
8110 |
msgstr ""
|
8111 |
|
8112 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8113 |
msgid "Think of this as an absolute maximum possible session length."
|
8114 |
msgstr ""
|
8115 |
|
8116 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8117 |
#, php-format
|
8118 |
msgid "This cannot be less than %s."
|
8119 |
msgstr ""
|
8120 |
|
8121 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8122 |
msgid "Idle Timeout"
|
8123 |
msgstr ""
|
8124 |
|
8125 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8126 |
msgid "Specify How Many Hours After Inactivity To Automatically Logout User"
|
8127 |
msgstr ""
|
8128 |
|
8129 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8130 |
msgid ""
|
8131 |
"If the user is inactive for the number of hours specified, they will be "
|
8132 |
"forcefully logged out next time they return."
|
8133 |
msgstr ""
|
8134 |
|
8135 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8136 |
#, php-format
|
8137 |
msgid "Set to %s to turn off this option."
|
8138 |
msgstr ""
|
8139 |
|
8140 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8141 |
msgid "Lock To Location"
|
8142 |
msgstr ""
|
8143 |
|
8144 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8145 |
msgid "Locks A User Session To IP address"
|
8146 |
msgstr ""
|
8147 |
|
8148 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8149 |
msgid ""
|
8150 |
"When selected, a session is restricted to the same IP address as when the "
|
8151 |
"user logged in."
|
8152 |
msgstr ""
|
8153 |
|
8154 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8155 |
msgid ""
|
8156 |
"If a logged-in user's IP address changes, the session will be invalidated "
|
8157 |
"and they'll be forced to re-login to WordPress."
|
8158 |
msgstr ""
|
8159 |
|
8160 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8161 |
msgid "Max Simultaneous Sessions"
|
8162 |
msgstr ""
|
8163 |
|
8164 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8165 |
msgid "Limit Simultaneous Sessions For The Same Username"
|
8166 |
msgstr ""
|
8167 |
|
8168 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8169 |
msgid ""
|
8170 |
"The number provided here is the maximum number of simultaneous, distinct, "
|
8171 |
"sessions allowed for any given username."
|
8172 |
msgstr ""
|
8173 |
|
8174 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8175 |
msgid "Zero (0) will allow unlimited simultaneous sessions."
|
8176 |
msgstr ""
|
8177 |
|
8178 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8179 |
msgid "Enable Password Policies"
|
8180 |
msgstr ""
|
8181 |
|
8182 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8183 |
msgid "Enable The Password Policies Detailed Below"
|
8184 |
msgstr ""
|
8185 |
|
8186 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8187 |
msgid "Turn on/off all password policy settings."
|
8188 |
msgstr ""
|
8189 |
|
8190 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8191 |
msgid "Prevent Pwned Passwords"
|
8192 |
msgstr ""
|
8193 |
|
8194 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8195 |
msgid "Prevent Use Of \"Pwned\" Passwords"
|
8196 |
msgstr ""
|
8197 |
|
8198 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8199 |
msgid ""
|
8200 |
"Prevents users from using any passwords found on the public available list "
|
8201 |
"of \"pwned\" passwords."
|
8202 |
msgstr ""
|
8203 |
|
8204 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8205 |
msgid "Minimum Length"
|
8206 |
msgstr ""
|
8207 |
|
8208 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8209 |
msgid "Minimum Password Length"
|
8210 |
msgstr ""
|
8211 |
|
8212 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8213 |
msgid ""
|
8214 |
"All passwords that a user sets must be at least this many characters in "
|
8215 |
"length."
|
8216 |
msgstr ""
|
8217 |
|
8218 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8219 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8220 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8221 |
msgid "Set to Zero(0) to disable."
|
8222 |
msgstr ""
|
8223 |
|
8224 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8225 |
msgid "Minimum Strength"
|
8226 |
msgstr ""
|
8227 |
|
8228 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8229 |
msgid "Minimum Password Strength"
|
8230 |
msgstr ""
|
8231 |
|
8232 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8233 |
msgid "All passwords that a user sets must meet this minimum strength."
|
8234 |
msgstr ""
|
8235 |
|
8236 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8237 |
msgid "Apply To Existing Users"
|
8238 |
msgstr ""
|
8239 |
|
8240 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8241 |
msgid "Apply Password Policies To Existing Users and Their Passwords"
|
8242 |
msgstr ""
|
8243 |
|
8244 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8245 |
msgid ""
|
8246 |
"Forces existing users to update their passwords if they don't meet "
|
8247 |
"requirements, after they next login."
|
8248 |
msgstr ""
|
8249 |
|
8250 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8251 |
msgid "Note: You may want to warn users prior to enabling this option."
|
8252 |
msgstr ""
|
8253 |
|
8254 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8255 |
msgid "Password Expiration"
|
8256 |
msgstr ""
|
8257 |
|
8258 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8259 |
msgid "Passwords Expire After This Many Days"
|
8260 |
msgstr ""
|
8261 |
|
8262 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8263 |
msgid ""
|
8264 |
"Users will be forced to reset their passwords after the number of days "
|
8265 |
"specified."
|
8266 |
msgstr ""
|
8267 |
|
8268 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8269 |
msgid "Allow Manual User Suspension"
|
8270 |
msgstr ""
|
8271 |
|
8272 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8273 |
msgid "Manually Suspend User Accounts To Prevent Login"
|
8274 |
msgstr ""
|
8275 |
|
8276 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8277 |
msgid "Users may be suspended by administrators to prevent future login."
|
8278 |
msgstr ""
|
8279 |
|
8280 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8281 |
msgid "Auto-Suspend Expired Passwords"
|
8282 |
msgstr ""
|
8283 |
|
8284 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8285 |
msgid "Automatically Suspend Users With Expired Passwords"
|
8286 |
msgstr ""
|
8287 |
|
8288 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8289 |
msgid ""
|
8290 |
"Automatically suspends login by users and requires password reset to "
|
8291 |
"unsuspend."
|
8292 |
msgstr ""
|
8293 |
|
8294 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8295 |
msgid "Requires password expiration policy to be set."
|
8296 |
msgstr ""
|
8297 |
|
8298 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8299 |
msgid "Auto-Suspend Idle Users"
|
8300 |
msgstr ""
|
8301 |
|
8302 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8303 |
msgid "Automatically Suspend Idle User Accounts"
|
8304 |
msgstr ""
|
8305 |
|
8306 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8307 |
msgid ""
|
8308 |
"Automatically suspends login for idle accounts and requires password reset "
|
8309 |
"to unsuspend."
|
8310 |
msgstr ""
|
8311 |
|
8312 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8313 |
msgid "Specify the number of days since last login to consider a user as idle."
|
8314 |
msgstr ""
|
8315 |
|
8316 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8317 |
msgid "Auto-Suspend Idle User Roles"
|
8318 |
msgstr ""
|
8319 |
|
8320 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8321 |
msgid "Apply Automatic Suspension To Accounts With These Roles"
|
8322 |
msgstr ""
|
8323 |
|
8324 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8325 |
msgid ""
|
8326 |
"Automatic suspension for idle accounts applies only to the roles you specify."
|
8327 |
msgstr ""
|
8328 |
|
8329 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8330 |
msgid "Forcing user to update expired password."
|
8331 |
msgstr ""
|
8332 |
|
8333 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8334 |
msgid "Forcing user to update password that fails to meet policies."
|
8335 |
msgstr ""
|
8336 |
|
8337 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8338 |
msgid "Blocked attempted password update that failed policy requirements."
|
8339 |
msgstr ""
|
8340 |
|
8341 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8342 |
msgid "Valid user session could not be found."
|
8343 |
msgstr ""
|
8344 |
|
8345 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8346 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8347 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8348 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8349 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8350 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8351 |
msgid "Logging out."
|
8352 |
msgstr ""
|
8353 |
|
8354 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8355 |
msgid "User session has expired."
|
8356 |
msgstr ""
|
8357 |
|
8358 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8359 |
msgid "User session has expired due to inactivity."
|
8360 |
msgstr ""
|
8361 |
|
8362 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8363 |
msgid "Access to an established user session from a different IP address."
|
8364 |
msgstr ""
|
8365 |
|
8366 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8367 |
msgid "Browser signature has changed for this user session."
|
8368 |
msgstr ""
|
8369 |
|
8370 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8371 |
msgid ""
|
8372 |
"Unable to verify the current User Session. Forcefully logging out session."
|
8373 |
msgstr ""
|
8374 |
|
8375 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8376 |
#, php-format
|
8377 |
msgid "User ID %s suspended by admin (%s)"
|
8378 |
msgstr ""
|
8379 |
|
8380 |
-
#: src/lib/src/Modules/UserManagement/Strings.php:
|
8381 |
#, php-format
|
8382 |
msgid "User ID %s unsuspended by admin (%s)"
|
8383 |
msgstr ""
|
@@ -8413,9 +8432,9 @@ msgstr ""
|
|
8413 |
msgid "%s not installed from WordPress.org."
|
8414 |
msgstr ""
|
8415 |
|
8416 |
-
#: src/lib/src/Scans/Mal/Repair.php:78 src/processors/hack_protect.php:
|
8417 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8418 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
8419 |
msgid "Plugin"
|
8420 |
msgstr ""
|
8421 |
|
@@ -8432,35 +8451,35 @@ msgid "There was an error retrieving entries."
|
|
8432 |
msgstr ""
|
8433 |
|
8434 |
#: src/lib/src/Tables/Build/BaseBuild.php:56
|
8435 |
-
#: src/processors/hack_protect.php:
|
8436 |
msgid "No entries to display."
|
8437 |
msgstr ""
|
8438 |
|
8439 |
-
#: src/lib/src/Tables/Build/ScanApc.php:
|
8440 |
msgid "Abandoned"
|
8441 |
msgstr ""
|
8442 |
|
8443 |
-
#: src/lib/src/Tables/Build/ScanMal.php:
|
8444 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8445 |
msgid "Potential Malware Detected"
|
8446 |
msgstr ""
|
8447 |
|
8448 |
-
#: src/lib/src/Tables/Build/ScanMal.php:
|
8449 |
msgid "Repair Unavailable"
|
8450 |
msgstr ""
|
8451 |
|
8452 |
-
#: src/lib/src/Tables/Build/ScanPtg.php:
|
8453 |
-
#: src/lib/src/Tables/Build/ScanWcf.php:
|
8454 |
msgid "Modified"
|
8455 |
msgstr ""
|
8456 |
|
8457 |
-
#: src/lib/src/Tables/Build/ScanPtg.php:
|
8458 |
-
#: src/lib/src/Tables/Build/ScanWcf.php:
|
8459 |
msgid "Missing"
|
8460 |
msgstr ""
|
8461 |
|
8462 |
-
#: src/lib/src/Tables/Build/ScanPtg.php:
|
8463 |
-
#: src/lib/src/Tables/Build/ScanUfc.php:
|
8464 |
msgid "Unrecognised"
|
8465 |
msgstr ""
|
8466 |
|
@@ -8542,8 +8561,8 @@ msgid "Added"
|
|
8542 |
msgstr ""
|
8543 |
|
8544 |
#: src/lib/src/Tables/Render/ScanApc.php:35
|
8545 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8546 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
8547 |
msgid "Item"
|
8548 |
msgstr ""
|
8549 |
|
@@ -8576,9 +8595,9 @@ msgid "Deactivate"
|
|
8576 |
msgstr ""
|
8577 |
|
8578 |
#: src/lib/src/Tables/Render/ScanWpv.php:55
|
8579 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8580 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8581 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
8582 |
#: src/processors/loginprotect_intent.php:285
|
8583 |
msgid "More Info"
|
8584 |
msgstr ""
|
@@ -8617,82 +8636,82 @@ msgstr ""
|
|
8617 |
msgid "Maybe refresh the page and try again."
|
8618 |
msgstr ""
|
8619 |
|
8620 |
-
#: src/processors/admin_access_restriction.php:
|
8621 |
msgid ""
|
8622 |
"Sorry, deleting administrators is currently restricted to your Security Admin"
|
8623 |
msgstr ""
|
8624 |
|
8625 |
-
#: src/processors/admin_access_restriction.php:
|
8626 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8627 |
msgid "Editing this option is currently restricted."
|
8628 |
msgstr ""
|
8629 |
|
8630 |
-
#: src/processors/admin_access_restriction.php:
|
8631 |
msgid "Unlock"
|
8632 |
msgstr ""
|
8633 |
|
8634 |
-
#: src/processors/autoupdates.php:
|
8635 |
#, php-format
|
8636 |
msgid ""
|
8637 |
"This is a quick notification from the %s that WordPress Automatic Updates "
|
8638 |
"just completed on your site with the following results."
|
8639 |
msgstr ""
|
8640 |
|
8641 |
-
#: src/processors/autoupdates.php:
|
8642 |
msgid "Plugins Updated:"
|
8643 |
msgstr ""
|
8644 |
|
8645 |
-
#: src/processors/autoupdates.php:
|
8646 |
#, php-format
|
8647 |
msgid "Plugin \"%s\" auto-updated from \"%s\" to version \"%s\""
|
8648 |
msgstr ""
|
8649 |
|
8650 |
-
#: src/processors/autoupdates.php:
|
8651 |
msgid "Themes Updated:"
|
8652 |
msgstr ""
|
8653 |
|
8654 |
-
#: src/processors/autoupdates.php:
|
8655 |
#, php-format
|
8656 |
msgid "Theme \"%s\" auto-updated from \"%s\" to version \"%s\""
|
8657 |
msgstr ""
|
8658 |
|
8659 |
-
#: src/processors/autoupdates.php:
|
8660 |
msgid "WordPress Core Updated:"
|
8661 |
msgstr ""
|
8662 |
|
8663 |
-
#: src/processors/autoupdates.php:
|
8664 |
msgid "Thank you."
|
8665 |
msgstr ""
|
8666 |
|
8667 |
-
#: src/processors/autoupdates.php:
|
8668 |
#: src/processors/loginprotect_intentprovider_backup.php:170
|
8669 |
#, php-format
|
8670 |
msgid "Notice: %s"
|
8671 |
msgstr ""
|
8672 |
|
8673 |
-
#: src/processors/autoupdates.php:
|
8674 |
msgid "Automatic Updates Completed"
|
8675 |
msgstr ""
|
8676 |
|
8677 |
-
#: src/processors/autoupdates.php:
|
8678 |
msgid ""
|
8679 |
"Automatic updates for this plugin is controlled by another plugin or setting."
|
8680 |
msgstr ""
|
8681 |
|
8682 |
-
#: src/processors/email.php:
|
8683 |
msgid "Hi !"
|
8684 |
msgstr ""
|
8685 |
|
8686 |
-
#: src/processors/email.php:
|
8687 |
#, php-format
|
8688 |
msgid "Email sent from the %s Plugin v%s, on %s."
|
8689 |
msgstr ""
|
8690 |
|
8691 |
-
#: src/processors/email.php:
|
8692 |
msgid "Note: Email delays are caused by website hosting and email providers."
|
8693 |
msgstr ""
|
8694 |
|
8695 |
-
#: src/processors/email.php:
|
8696 |
#, php-format
|
8697 |
msgid "Time Sent: %s"
|
8698 |
msgstr ""
|
@@ -8710,486 +8729,481 @@ msgstr ""
|
|
8710 |
msgid "%s Statistics"
|
8711 |
msgstr ""
|
8712 |
|
8713 |
-
#: src/processors/firewall.php:
|
8714 |
msgid "Something in the URL, Form or Cookie data wasn't appropriate."
|
8715 |
msgstr ""
|
8716 |
|
8717 |
-
#: src/processors/firewall.php:
|
8718 |
#, php-format
|
8719 |
msgid "%s has blocked a page visit to your site."
|
8720 |
msgstr ""
|
8721 |
|
8722 |
-
#: src/processors/firewall.php:
|
8723 |
msgid "Log details for this visitor are below:"
|
8724 |
msgstr ""
|
8725 |
|
8726 |
-
#: src/processors/firewall.php:
|
8727 |
#, php-format
|
8728 |
msgid "You can look up the offending IP Address here: %s"
|
8729 |
msgstr ""
|
8730 |
|
8731 |
-
#: src/processors/firewall.php:
|
8732 |
msgid "Firewall Block Alert"
|
8733 |
msgstr ""
|
8734 |
|
8735 |
-
#: src/processors/firewall.php:
|
8736 |
msgid "Unknown Rules"
|
8737 |
msgstr ""
|
8738 |
|
8739 |
-
#: src/processors/hack_protect.php:
|
8740 |
-
#, php-format
|
8741 |
-
msgid "%s escaped HTML the following comment due to its size: %s"
|
8742 |
-
msgstr ""
|
8743 |
-
|
8744 |
-
#: src/processors/hack_protect.php:95
|
8745 |
#, php-format
|
8746 |
msgid "Last Scan: %s"
|
8747 |
msgstr ""
|
8748 |
|
8749 |
-
#: src/processors/hack_protect.php:
|
8750 |
msgid "Sorry, this scan is not available."
|
8751 |
msgstr ""
|
8752 |
|
8753 |
-
#: src/processors/hack_protect.php:
|
8754 |
msgid "This scan is not currently enabled."
|
8755 |
msgstr ""
|
8756 |
|
8757 |
-
#: src/processors/hack_protect.php:
|
8758 |
msgid "Please turn on this scan in the options."
|
8759 |
msgstr ""
|
8760 |
|
8761 |
-
#: src/processors/hack_protect.php:
|
8762 |
msgid "Click a scan to see its results"
|
8763 |
msgstr ""
|
8764 |
|
8765 |
-
#: src/processors/hack_protect.php:
|
8766 |
msgid "Scan Your Site Now"
|
8767 |
msgstr ""
|
8768 |
|
8769 |
-
#: src/processors/hack_protect.php:
|
8770 |
msgid "Run the selected scans on your site now to get the latest results"
|
8771 |
msgstr ""
|
8772 |
|
8773 |
-
#: src/processors/hack_protect.php:
|
8774 |
msgid "The more scans that are selected, the longer the scan may take."
|
8775 |
msgstr ""
|
8776 |
|
8777 |
-
#: src/processors/hack_protect.php:
|
8778 |
msgid "Select Scans To Run"
|
8779 |
msgstr ""
|
8780 |
|
8781 |
-
#: src/processors/hack_protect.php:
|
8782 |
msgid "Clear Ignore Flags"
|
8783 |
msgstr ""
|
8784 |
|
8785 |
-
#: src/processors/hack_protect.php:
|
8786 |
msgid ""
|
8787 |
"Previously ignored results will be revealed (for the selected scans only)"
|
8788 |
msgstr ""
|
8789 |
|
8790 |
-
#: src/processors/hack_protect.php:
|
8791 |
msgid "Remove Notification Suppression"
|
8792 |
msgstr ""
|
8793 |
|
8794 |
-
#: src/processors/hack_protect.php:
|
8795 |
msgid "Allow notification emails to be resent (for the selected scans only)"
|
8796 |
msgstr ""
|
8797 |
|
8798 |
-
#: src/processors/hack_protect.php:
|
8799 |
msgid "Run Scans Now"
|
8800 |
msgstr ""
|
8801 |
|
8802 |
-
#: src/processors/hack_protect.php:
|
8803 |
msgid "Scan Progress"
|
8804 |
msgstr ""
|
8805 |
|
8806 |
-
#: src/processors/hack_protect.php:
|
8807 |
msgid "Discover plugins that may have been abandoned by their authors"
|
8808 |
msgstr ""
|
8809 |
|
8810 |
-
#: src/processors/hack_protect.php:
|
8811 |
msgid ""
|
8812 |
"Detect changes to core WordPress files when compared to the official "
|
8813 |
"distribution"
|
8814 |
msgstr ""
|
8815 |
|
8816 |
-
#: src/processors/hack_protect.php:
|
8817 |
msgid ""
|
8818 |
"Detect files which aren't part of the official WordPress.org distribution"
|
8819 |
msgstr ""
|
8820 |
|
8821 |
-
#: src/processors/hack_protect.php:
|
8822 |
msgid "Detect files that may be infected with malware"
|
8823 |
msgstr ""
|
8824 |
|
8825 |
-
#: src/processors/hack_protect.php:
|
8826 |
msgid "Be alerted to plugins and themes with known security vulnerabilities"
|
8827 |
msgstr ""
|
8828 |
|
8829 |
-
#: src/processors/hack_protect.php:
|
8830 |
-
#: src/processors/hack_protect.php:
|
8831 |
-
#: src/processors/hack_protect.php:
|
8832 |
-
#: src/processors/hack_protect.php:
|
8833 |
-
#: src/processors/hack_protect.php:
|
8834 |
msgid "unknown"
|
8835 |
msgstr ""
|
8836 |
|
8837 |
-
#: src/processors/hack_protect.php:
|
8838 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8839 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
8840 |
msgid "Theme"
|
8841 |
msgstr ""
|
8842 |
|
8843 |
-
#: src/processors/hack_protect.php:
|
8844 |
msgid "Detects unauthorized changes to plugins/themes"
|
8845 |
msgstr ""
|
8846 |
|
8847 |
-
#: src/processors/hack_protect.php:
|
8848 |
msgid "Files with problems"
|
8849 |
msgstr ""
|
8850 |
|
8851 |
-
#: src/processors/hack_protect.php:
|
8852 |
msgid "Root directory"
|
8853 |
msgstr ""
|
8854 |
|
8855 |
-
#: src/processors/hack_protect.php:
|
8856 |
msgid "Snapshot taken"
|
8857 |
msgstr ""
|
8858 |
|
8859 |
-
#: src/processors/hack_protect.php:
|
8860 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8861 |
msgid "Re-Install"
|
8862 |
msgstr ""
|
8863 |
|
8864 |
-
#: src/processors/hack_protect.php:
|
8865 |
msgid "Deactivate and Ignore"
|
8866 |
msgstr ""
|
8867 |
|
8868 |
-
#: src/processors/hack_protect.php:
|
8869 |
msgid "Accept"
|
8870 |
msgstr ""
|
8871 |
|
8872 |
-
#: src/processors/hack_protect.php:
|
8873 |
msgid "Upgrade"
|
8874 |
msgstr ""
|
8875 |
|
8876 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8877 |
#, php-format
|
8878 |
msgid "%s has detected abandoned plugins installed on your site."
|
8879 |
msgstr ""
|
8880 |
|
8881 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8882 |
msgid ""
|
8883 |
"Running code that hasn't seen any updates for over 2 years is far from ideal."
|
8884 |
msgstr ""
|
8885 |
|
8886 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8887 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
8888 |
msgid "Details for the items(s) are below:"
|
8889 |
msgstr ""
|
8890 |
|
8891 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8892 |
#, php-format
|
8893 |
msgid "Last Updated: %s"
|
8894 |
msgstr ""
|
8895 |
|
8896 |
-
#: src/processors/hackprotect_scan_apc.php:
|
8897 |
msgid "Abandoned Plugin(s) Discovered On Your Site."
|
8898 |
msgstr ""
|
8899 |
|
8900 |
-
#: src/processors/hackprotect_scan_base.php:
|
8901 |
msgid "Run Scanner"
|
8902 |
msgstr ""
|
8903 |
|
8904 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8905 |
#, php-format
|
8906 |
msgid "The %s Malware Scanner found files with potential malware."
|
8907 |
msgstr ""
|
8908 |
|
8909 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8910 |
msgid ""
|
8911 |
"You must examine the file(s) carefully to determine whether suspicious code "
|
8912 |
"is really present."
|
8913 |
msgstr ""
|
8914 |
|
8915 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8916 |
#, php-format
|
8917 |
msgid ""
|
8918 |
"The %s Malware Scanner searches for common malware patterns and so false "
|
8919 |
"positives (detection errors) are to be expected sometimes."
|
8920 |
msgstr ""
|
8921 |
|
8922 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8923 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8924 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
8925 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8926 |
-
#: src/processors/user_management.php:
|
8927 |
-
#: src/processors/user_management.php:
|
8928 |
msgid "Site URL"
|
8929 |
msgstr ""
|
8930 |
|
8931 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8932 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8933 |
#, php-format
|
8934 |
msgid "%s has already attempted to repair the files."
|
8935 |
msgstr ""
|
8936 |
|
8937 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8938 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8939 |
msgid ""
|
8940 |
"But, you should always check these files to ensure everything is as you "
|
8941 |
"expect."
|
8942 |
msgstr ""
|
8943 |
|
8944 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8945 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8946 |
msgid ""
|
8947 |
"You should review these files and replace them with official versions if "
|
8948 |
"required."
|
8949 |
msgstr ""
|
8950 |
|
8951 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8952 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8953 |
msgid ""
|
8954 |
"Alternatively you can have the plugin attempt to repair/replace these files "
|
8955 |
"automatically."
|
8956 |
msgstr ""
|
8957 |
|
8958 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8959 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
8960 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8961 |
msgid "We recommend you run the scanner to review your site"
|
8962 |
msgstr ""
|
8963 |
|
8964 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8965 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
8966 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
8967 |
msgid "More Info On This Scanner"
|
8968 |
msgstr ""
|
8969 |
|
8970 |
-
#: src/processors/hackprotect_scan_mal.php:
|
8971 |
msgid "The following files contain suspected malware:"
|
8972 |
msgstr ""
|
8973 |
|
8974 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8975 |
msgid "Really Re-Install Plugin"
|
8976 |
msgstr ""
|
8977 |
|
8978 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8979 |
msgid ""
|
8980 |
"WordPress will now download and install the latest available version of this "
|
8981 |
"plugin."
|
8982 |
msgstr ""
|
8983 |
|
8984 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8985 |
msgid ""
|
8986 |
"In case of possible failure, it may be better to do this while the plugin is "
|
8987 |
"inactive."
|
8988 |
msgstr ""
|
8989 |
|
8990 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8991 |
msgid "Re-install first?"
|
8992 |
msgstr ""
|
8993 |
|
8994 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8995 |
msgid "This ensures files for this plugin haven't been corrupted in any way."
|
8996 |
msgstr ""
|
8997 |
|
8998 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
8999 |
msgid ""
|
9000 |
"You can choose to 'Activate Only' (not recommended), or close this message "
|
9001 |
"to cancel activation."
|
9002 |
msgstr ""
|
9003 |
|
9004 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9005 |
#, php-format
|
9006 |
msgid ""
|
9007 |
"For best security practices, %s will download and re-install the latest "
|
9008 |
"available version of this plugin."
|
9009 |
msgstr ""
|
9010 |
|
9011 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9012 |
#, php-format
|
9013 |
msgid ""
|
9014 |
"%s has detected at least 1 Plugins/Themes have been modified on your site."
|
9015 |
msgstr ""
|
9016 |
|
9017 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9018 |
msgid ""
|
9019 |
"You will receive only 1 email notification about these changes in a 1 week "
|
9020 |
"period."
|
9021 |
msgstr ""
|
9022 |
|
9023 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9024 |
msgid "Details of the problem items are below:"
|
9025 |
msgstr ""
|
9026 |
|
9027 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9028 |
msgid "Modified Plugins:"
|
9029 |
msgstr ""
|
9030 |
|
9031 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9032 |
msgid "Modified Themes:"
|
9033 |
msgstr ""
|
9034 |
|
9035 |
-
#: src/processors/hackprotect_scan_ptg.php:
|
9036 |
msgid "Plugins/Themes Have Been Altered"
|
9037 |
msgstr ""
|
9038 |
|
9039 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
9040 |
msgid "Unrecognised WordPress Files Detected"
|
9041 |
msgstr ""
|
9042 |
|
9043 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
9044 |
#, php-format
|
9045 |
msgid "The %s Unrecognised File Scanner found files which you need to review."
|
9046 |
msgstr ""
|
9047 |
|
9048 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
9049 |
msgid "Files discovered"
|
9050 |
msgstr ""
|
9051 |
|
9052 |
-
#: src/processors/hackprotect_scan_ufc.php:
|
9053 |
#, php-format
|
9054 |
msgid "%s has attempted to delete these files based on your current settings."
|
9055 |
msgstr ""
|
9056 |
|
9057 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
9058 |
msgid "Modified Core WordPress Files Discovered"
|
9059 |
msgstr ""
|
9060 |
|
9061 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
9062 |
#, php-format
|
9063 |
msgid "The %s Core File Scanner found files with potential problems."
|
9064 |
msgstr ""
|
9065 |
|
9066 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
9067 |
msgid "The following files have different content:"
|
9068 |
msgstr ""
|
9069 |
|
9070 |
-
#: src/processors/hackprotect_scan_wcf.php:
|
9071 |
msgid "The following files are missing:"
|
9072 |
msgstr ""
|
9073 |
|
9074 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9075 |
msgid "Vulnerable"
|
9076 |
msgstr ""
|
9077 |
|
9078 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9079 |
#, php-format
|
9080 |
msgid ""
|
9081 |
"%s has discovered that the currently installed version of the %s plugin has "
|
9082 |
"known security vulnerabilities."
|
9083 |
msgstr ""
|
9084 |
|
9085 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9086 |
msgid "Vulnerability Name"
|
9087 |
msgstr ""
|
9088 |
|
9089 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9090 |
msgid "Vulnerability Type"
|
9091 |
msgstr ""
|
9092 |
|
9093 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9094 |
msgid "Fixed Versions"
|
9095 |
msgstr ""
|
9096 |
|
9097 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9098 |
#, php-format
|
9099 |
msgid "%s has detected items with known security vulnerabilities."
|
9100 |
msgstr ""
|
9101 |
|
9102 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9103 |
msgid "You should update or remove these items at your earliest convenience."
|
9104 |
msgstr ""
|
9105 |
|
9106 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9107 |
#, php-format
|
9108 |
msgid "Vulnerability Title: %s"
|
9109 |
msgstr ""
|
9110 |
|
9111 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9112 |
#, php-format
|
9113 |
msgid "Vulnerability Type: %s"
|
9114 |
msgstr ""
|
9115 |
|
9116 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9117 |
#, php-format
|
9118 |
msgid "Fixed Version: %s"
|
9119 |
msgstr ""
|
9120 |
|
9121 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9122 |
#, php-format
|
9123 |
msgid "Further Information: %s"
|
9124 |
msgstr ""
|
9125 |
|
9126 |
-
#: src/processors/hackprotect_scan_wpv.php:
|
9127 |
msgid "Plugin(s) Discovered With Known Security Vulnerabilities."
|
9128 |
msgstr ""
|
9129 |
|
9130 |
-
#: src/processors/ips.php:
|
9131 |
msgid "No custom message provided."
|
9132 |
msgstr ""
|
9133 |
|
9134 |
-
#: src/processors/ips.php:
|
9135 |
#, php-format
|
9136 |
msgid "You've been blocked by the %s plugin"
|
9137 |
msgstr ""
|
9138 |
|
9139 |
-
#: src/processors/ips.php:
|
9140 |
#, php-format
|
9141 |
msgid "Time remaining on black list: %s"
|
9142 |
msgstr ""
|
9143 |
|
9144 |
-
#: src/processors/ips.php:
|
9145 |
#, php-format
|
9146 |
msgid "%s minute"
|
9147 |
msgid_plural "%s minutes"
|
9148 |
msgstr[0] ""
|
9149 |
msgstr[1] ""
|
9150 |
|
9151 |
-
#: src/processors/ips.php:
|
9152 |
#, php-format
|
9153 |
msgid ""
|
9154 |
"You tripped the security plugin defenses a total of %s times making you a "
|
9155 |
"suspect."
|
9156 |
msgstr ""
|
9157 |
|
9158 |
-
#: src/processors/ips.php:
|
9159 |
msgid ""
|
9160 |
"If you believe this to be in error, please contact the site owner and quote "
|
9161 |
"your IP address below."
|
9162 |
msgstr ""
|
9163 |
|
9164 |
-
#: src/processors/ips.php:
|
9165 |
msgid "Auto-Unblock Your IP"
|
9166 |
msgstr ""
|
9167 |
|
9168 |
-
#: src/processors/ips.php:
|
9169 |
msgid ""
|
9170 |
"You can automatically unblock your IP address by clicking the button below."
|
9171 |
msgstr ""
|
9172 |
|
9173 |
-
#: src/processors/ips.php:
|
9174 |
msgid "Unblock My IP Address"
|
9175 |
msgstr ""
|
9176 |
|
9177 |
-
#: src/processors/ips.php:
|
9178 |
msgid "You MUST enable Javascript to be able to login"
|
9179 |
msgstr ""
|
9180 |
|
9181 |
-
#: src/processors/ips.php:
|
9182 |
msgid "No Label"
|
9183 |
msgstr ""
|
9184 |
|
9185 |
-
#: src/processors/lockdown.php:
|
9186 |
#, php-format
|
9187 |
msgid ""
|
9188 |
"The \"author\" query parameter has been blocked by %s to protect against "
|
9189 |
"user login name fishing."
|
9190 |
msgstr ""
|
9191 |
|
9192 |
-
#: src/processors/lockdown.php:
|
9193 |
#, php-format
|
9194 |
msgid "Anonymous access to the WordPress Rest API has been restricted by %s."
|
9195 |
msgstr ""
|
@@ -9596,68 +9610,53 @@ msgstr ""
|
|
9596 |
msgid "Use your Yubikey to generate a new code."
|
9597 |
msgstr ""
|
9598 |
|
9599 |
-
#: src/processors/loginprotect_wplogin.php:
|
9600 |
msgid ""
|
9601 |
"Your login URL is unchanged because the Rename WP Login feature is not "
|
9602 |
"currently supported on WPMS."
|
9603 |
msgstr ""
|
9604 |
|
9605 |
-
#: src/processors/loginprotect_wplogin.php:
|
9606 |
-
#: src/processors/loginprotect_wplogin.php:
|
9607 |
#, php-format
|
9608 |
msgid ""
|
9609 |
"Can not use the Rename WP Login feature because you have the \"%s\" plugin "
|
9610 |
"installed and it is active."
|
9611 |
msgstr ""
|
9612 |
|
9613 |
-
#: src/processors/loginprotect_wplogin.php:
|
9614 |
#, php-format
|
9615 |
msgid ""
|
9616 |
"Can not use the Rename WP Login feature because you have not enabled %s."
|
9617 |
msgstr ""
|
9618 |
|
9619 |
-
#: src/processors/loginprotect_wplogin.php:
|
9620 |
msgid "Permalinks"
|
9621 |
msgstr ""
|
9622 |
|
9623 |
-
#: src/processors/loginprotect_wplogin.php:
|
9624 |
#, php-format
|
9625 |
msgid ""
|
9626 |
"Can not use the Rename WP Login feature because you have chosen a path (\"%s"
|
9627 |
"\") that is reserved on your WordPress site."
|
9628 |
msgstr ""
|
9629 |
|
9630 |
-
#: src/processors/loginprotect_wplogin.php:
|
9631 |
msgid ""
|
9632 |
"Your login URL is unchanged because your current hosting/PHP configuration "
|
9633 |
"cannot parse the necessary information."
|
9634 |
msgstr ""
|
9635 |
|
9636 |
-
#: src/processors/
|
9637 |
#, php-format
|
9638 |
msgid "%s is provided by %s"
|
9639 |
msgstr ""
|
9640 |
|
9641 |
-
#: src/processors/
|
9642 |
#, php-format
|
9643 |
msgid "Days Installed: %s"
|
9644 |
msgstr ""
|
9645 |
|
9646 |
-
#: src/processors/plugin_badgewidget.php:26
|
9647 |
-
#, php-format
|
9648 |
-
msgid "%s Plugin Badge"
|
9649 |
-
msgstr ""
|
9650 |
-
|
9651 |
-
#: src/processors/plugin_badgewidget.php:28
|
9652 |
-
#, php-format
|
9653 |
-
msgid ""
|
9654 |
-
"You can now help spread the word about the %s plugin anywhere on your site"
|
9655 |
-
msgstr ""
|
9656 |
-
|
9657 |
-
#: src/processors/plugin_badgewidget.php:55
|
9658 |
-
msgid "Site Secured"
|
9659 |
-
msgstr ""
|
9660 |
-
|
9661 |
#: src/processors/plugin_importexport.php:41
|
9662 |
msgid "Import From File"
|
9663 |
msgstr ""
|
@@ -9793,180 +9792,180 @@ msgstr ""
|
|
9793 |
msgid "Handshake verification failed."
|
9794 |
msgstr ""
|
9795 |
|
9796 |
-
#: src/processors/sessions.php:
|
9797 |
msgid "You're already logged-in."
|
9798 |
msgstr ""
|
9799 |
|
9800 |
-
#: src/processors/sessions.php:
|
9801 |
msgid "Go To Admin"
|
9802 |
msgstr ""
|
9803 |
|
9804 |
-
#: src/processors/user_management.php:
|
9805 |
-
#: src/processors/usermanagement_suspend.php:
|
9806 |
msgid "User Status"
|
9807 |
msgstr ""
|
9808 |
|
9809 |
-
#: src/processors/user_management.php:
|
9810 |
msgid "Not Recorded"
|
9811 |
msgstr ""
|
9812 |
|
9813 |
-
#: src/processors/user_management.php:
|
9814 |
msgid "Last Login"
|
9815 |
msgstr ""
|
9816 |
|
9817 |
-
#: src/processors/user_management.php:
|
9818 |
#, php-format
|
9819 |
msgid ""
|
9820 |
"As requested, %s is notifying you of a successful %s login to a WordPress "
|
9821 |
"site that you manage."
|
9822 |
msgstr ""
|
9823 |
|
9824 |
-
#: src/processors/user_management.php:
|
9825 |
#, php-format
|
9826 |
msgid "Important: %s"
|
9827 |
msgstr ""
|
9828 |
|
9829 |
-
#: src/processors/user_management.php:
|
9830 |
msgid ""
|
9831 |
"This user may now be subject to additional Two-Factor Authentication before "
|
9832 |
"completing their login."
|
9833 |
msgstr ""
|
9834 |
|
9835 |
-
#: src/processors/user_management.php:
|
9836 |
msgid "Details for this user are below:"
|
9837 |
msgstr ""
|
9838 |
|
9839 |
-
#: src/processors/user_management.php:
|
9840 |
-
#: src/processors/user_management.php:
|
9841 |
msgid "Thanks."
|
9842 |
msgstr ""
|
9843 |
|
9844 |
-
#: src/processors/user_management.php:
|
9845 |
-
#: src/processors/user_management.php:
|
9846 |
msgid "Notice"
|
9847 |
msgstr ""
|
9848 |
|
9849 |
-
#: src/processors/user_management.php:
|
9850 |
#, php-format
|
9851 |
msgid "%s Just Logged Into %s"
|
9852 |
msgstr ""
|
9853 |
|
9854 |
-
#: src/processors/user_management.php:
|
9855 |
#, php-format
|
9856 |
msgid "%s is notifying you of a successful login to your WordPress account."
|
9857 |
msgstr ""
|
9858 |
|
9859 |
-
#: src/processors/user_management.php:
|
9860 |
msgid "Details for this login are below:"
|
9861 |
msgstr ""
|
9862 |
|
9863 |
-
#: src/processors/user_management.php:
|
9864 |
msgid ""
|
9865 |
"If this is unexpected or suspicious, please contact your site administrator "
|
9866 |
"immediately."
|
9867 |
msgstr ""
|
9868 |
|
9869 |
-
#: src/processors/user_management.php:
|
9870 |
msgid "A login to your WordPress account just occurred"
|
9871 |
msgstr ""
|
9872 |
|
9873 |
-
#: src/processors/usermanagement_passwords.php:
|
9874 |
#, php-format
|
9875 |
msgid "Your password has expired (after %s days)."
|
9876 |
msgstr ""
|
9877 |
|
9878 |
-
#: src/processors/usermanagement_passwords.php:
|
9879 |
msgid ""
|
9880 |
"Your password doesn't meet requirements set by your security administrator."
|
9881 |
msgstr ""
|
9882 |
|
9883 |
-
#: src/processors/usermanagement_passwords.php:
|
9884 |
msgid ""
|
9885 |
"For your security, please use the password section below to update your "
|
9886 |
"password."
|
9887 |
msgstr ""
|
9888 |
|
9889 |
-
#: src/processors/usermanagement_passwords.php:
|
9890 |
msgid ""
|
9891 |
"Your security administrator has imposed requirements for password quality."
|
9892 |
msgstr ""
|
9893 |
|
9894 |
-
#: src/processors/usermanagement_passwords.php:
|
9895 |
msgid "Reason"
|
9896 |
msgstr ""
|
9897 |
|
9898 |
-
#: src/processors/usermanagement_passwords.php:
|
9899 |
#, php-format
|
9900 |
msgid "Password length (%s) too short (min: %s characters)"
|
9901 |
msgstr ""
|
9902 |
|
9903 |
-
#: src/processors/usermanagement_passwords.php:
|
9904 |
-
#: src/processors/usermanagement_passwords.php:
|
9905 |
msgid "Please use a different password."
|
9906 |
msgstr ""
|
9907 |
|
9908 |
-
#: src/processors/usermanagement_passwords.php:
|
9909 |
msgid "This password has already been pwned."
|
9910 |
msgstr ""
|
9911 |
|
9912 |
-
#: src/processors/usermanagement_passwords.php:
|
9913 |
-
#: src/processors/usermanagement_passwords.php:
|
9914 |
#, php-format
|
9915 |
msgid "%s times"
|
9916 |
msgstr ""
|
9917 |
|
9918 |
-
#: src/processors/usermanagement_passwords.php:
|
9919 |
msgid "This password has been pwned."
|
9920 |
msgstr ""
|
9921 |
|
9922 |
-
#: src/processors/usermanagement_sessions.php:
|
9923 |
msgid "Your session has expired."
|
9924 |
msgstr ""
|
9925 |
|
9926 |
-
#: src/processors/usermanagement_sessions.php:
|
9927 |
msgid "Your session was idle for too long."
|
9928 |
msgstr ""
|
9929 |
|
9930 |
-
#: src/processors/usermanagement_sessions.php:
|
9931 |
msgid "Your session was locked to another IP Address."
|
9932 |
msgstr ""
|
9933 |
|
9934 |
-
#: src/processors/usermanagement_sessions.php:
|
9935 |
#, php-format
|
9936 |
msgid "You do not currently have a %s user session."
|
9937 |
msgstr ""
|
9938 |
|
9939 |
-
#: src/processors/usermanagement_sessions.php:
|
9940 |
msgid "Your browser appears to have changed for this session."
|
9941 |
msgstr ""
|
9942 |
|
9943 |
-
#: src/processors/usermanagement_sessions.php:
|
9944 |
msgid "Your session was terminated."
|
9945 |
msgstr ""
|
9946 |
|
9947 |
-
#: src/processors/usermanagement_sessions.php:
|
9948 |
msgid "Please login again."
|
9949 |
msgstr ""
|
9950 |
|
9951 |
-
#: src/processors/usermanagement_suspend.php:
|
9952 |
-
#: src/processors/usermanagement_suspend.php:
|
9953 |
-
#: src/processors/usermanagement_suspend.php:
|
9954 |
msgid "Suspended"
|
9955 |
msgstr ""
|
9956 |
|
9957 |
-
#: src/processors/usermanagement_suspend.php:
|
9958 |
msgid "Suspend Account"
|
9959 |
msgstr ""
|
9960 |
|
9961 |
-
#: src/processors/usermanagement_suspend.php:
|
9962 |
msgid "Check to un/suspend user account"
|
9963 |
msgstr ""
|
9964 |
|
9965 |
-
#: src/processors/usermanagement_suspend.php:
|
9966 |
msgid "The user can never login while their account is suspended."
|
9967 |
msgstr ""
|
9968 |
|
9969 |
-
#: src/processors/usermanagement_suspend.php:
|
9970 |
msgid ""
|
9971 |
"Sorry, suspension for this account may only be managed by a security "
|
9972 |
"administrator."
|
@@ -10186,35 +10185,35 @@ msgid "Security Admin setup was successful."
|
|
10186 |
msgstr ""
|
10187 |
|
10188 |
#: src/wizards/plugin.php:469 src/wizards/plugin.php:502
|
10189 |
-
#: src/wizards/plugin.php:535 src/wizards/plugin.php:
|
10190 |
-
#: src/wizards/plugin.php:
|
10191 |
msgid "No changes were made as no option was selected"
|
10192 |
msgstr ""
|
10193 |
|
10194 |
#: src/wizards/plugin.php:482 src/wizards/plugin.php:515
|
10195 |
-
#: src/wizards/plugin.php:
|
10196 |
msgid "Enabled"
|
10197 |
msgstr ""
|
10198 |
|
10199 |
#: src/wizards/plugin.php:486 src/wizards/plugin.php:519
|
10200 |
-
#: src/wizards/plugin.php:
|
10201 |
#, php-format
|
10202 |
msgid "%s setting could not be changed at this time."
|
10203 |
msgstr ""
|
10204 |
|
10205 |
-
#: src/wizards/plugin.php:
|
10206 |
msgid "Preferences have been saved."
|
10207 |
msgstr ""
|
10208 |
|
10209 |
-
#: src/wizards/plugin.php:
|
10210 |
msgid "Search item added."
|
10211 |
msgstr ""
|
10212 |
|
10213 |
-
#: src/wizards/plugin.php:
|
10214 |
msgid "All entries were deleted"
|
10215 |
msgstr ""
|
10216 |
|
10217 |
-
#: src/wizards/plugin.php:
|
10218 |
msgid "Please check the box to confirm deletion."
|
10219 |
msgstr ""
|
10220 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WPSF v2.0\n"
|
4 |
+
"POT-Creation-Date: 2019-09-15 14:09+0100\n"
|
5 |
+
"PO-Revision-Date: 2019-09-15 14:09+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_GB\n"
|
22 |
"X-Poedit-SearchPathExcluded-4: src/lib/vendor\n"
|
23 |
"X-Poedit-SearchPathExcluded-5: resources\n"
|
24 |
|
25 |
+
#: src/features/admin_access_restriction.php:332
|
26 |
+
#: src/features/admin_access_restriction.php:334
|
27 |
msgid "Security Admin session has timed-out."
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: src/features/admin_access_restriction.php:332
|
31 |
msgid "Reload now?"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: src/features/admin_access_restriction.php:333
|
35 |
msgid "Security Admin session has nearly timed-out."
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: src/features/admin_access_restriction.php:351
|
39 |
+
#: src/features/admin_access_restriction.php:364
|
40 |
+
#: src/lib/src/Modules/Plugin/Strings.php:396
|
41 |
#: src/lib/src/Modules/Plugin/Strings.php:398
|
|
|
42 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:35
|
43 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:38
|
44 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:102
|
45 |
#: src/lib/src/Tables/Render/Sessions.php:36 src/wizards/base_wpsf.php:59
|
46 |
msgid "Security Admin"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: src/features/admin_access_restriction.php:352
|
50 |
#, php-format
|
51 |
msgid "Prevent Tampering With %s Settings"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: src/features/admin_access_restriction.php:367
|
55 |
msgid "Security plugin is protected against tampering"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: src/features/admin_access_restriction.php:368
|
59 |
msgid "Security plugin is vulnerable to tampering"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: src/features/admin_access_restriction.php:375
|
63 |
msgid "Important Options"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: src/features/admin_access_restriction.php:378
|
67 |
msgid "Important WP options are protected against tampering"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: src/features/admin_access_restriction.php:379
|
71 |
msgid "Important WP options aren't protected against tampering"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: src/features/admin_access_restriction.php:386
|
75 |
msgid "WP Admins"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: src/features/admin_access_restriction.php:389
|
79 |
msgid "Admin users are protected against tampering"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: src/features/admin_access_restriction.php:390
|
83 |
msgid "Admin users aren't protected against tampering"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: src/features/admin_access_restriction.php:407
|
87 |
msgid "Security Admin Protection"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: src/features/admin_access_restriction.php:414
|
91 |
msgid "Security Plugin Unprotected"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: src/features/admin_access_restriction.php:416
|
95 |
msgid "The Security Admin protection is not active."
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: src/features/admin_access_restriction.php:420
|
99 |
+
#: src/features/autoupdates.php:168 src/features/hack_protect.php:841
|
100 |
+
#: src/features/hack_protect.php:862 src/features/hack_protect.php:883
|
101 |
+
#: src/features/hack_protect.php:904 src/features/hack_protect.php:925
|
102 |
+
#: src/features/hack_protect.php:946 src/features/insights.php:267
|
103 |
#: src/features/insights.php:655 src/features/insights.php:668
|
104 |
#: src/features/insights.php:695 src/features/insights.php:708
|
105 |
#: src/features/insights.php:734 src/features/insights.php:746
|
106 |
+
#: src/features/lockdown.php:81 src/features/user_management.php:313
|
107 |
#, php-format
|
108 |
msgid "Go To %s"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: src/features/admin_access_restriction.php:420
|
112 |
+
#: src/features/autoupdates.php:168 src/features/hack_protect.php:841
|
113 |
+
#: src/features/hack_protect.php:862 src/features/hack_protect.php:883
|
114 |
+
#: src/features/hack_protect.php:904 src/features/hack_protect.php:925
|
115 |
+
#: src/features/hack_protect.php:946 src/features/insights.php:268
|
116 |
#: src/features/insights.php:746 src/features/lockdown.php:81
|
117 |
+
#: src/features/user_management.php:313 src/lib/src/Modules/Base/Strings.php:21
|
118 |
#: src/lib/src/Modules/Base/Strings.php:38
|
119 |
#: src/lib/src/Modules/Insights/Strings.php:66
|
120 |
msgid "Options"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: src/features/admin_access_restriction.php:421
|
124 |
msgid "Security Admin should be turned-on to protect your security settings."
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: src/features/admin_access_restriction.php:491
|
128 |
msgid ""
|
129 |
"Sorry, this plugin is protected against unauthorised attempts to disable it."
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: src/features/admin_access_restriction.php:494
|
133 |
msgid "You'll just need to authenticate first and try again."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: src/features/audit_trail.php:49
|
137 |
#, php-format
|
138 |
msgid "[%s] Audit Trail Entries"
|
139 |
msgstr ""
|
191 |
|
192 |
#: src/features/audit_trail.php:163 src/features/insights.php:74
|
193 |
#: src/features/insights.php:285 src/lib/src/Modules/AuditTrail/Strings.php:122
|
194 |
+
#: src/lib/src/Modules/Plugin/Strings.php:399 src/wizards/plugin.php:481
|
195 |
#: src/wizards/plugin.php:486
|
196 |
msgid "Audit Trail"
|
197 |
msgstr ""
|
203 |
|
204 |
#: src/features/autoupdates.php:157 src/features/autoupdates.php:189
|
205 |
#: src/lib/src/Modules/Autoupdates/Strings.php:25
|
206 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:226
|
207 |
+
#: src/lib/src/Modules/Plugin/Strings.php:402
|
208 |
msgid "Automatic Updates"
|
209 |
msgstr ""
|
210 |
|
273 |
msgid "%s isn't automatically updated"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: src/features/base.php:720 src/lib/src/Modules/Base/BaseModCon.php:732
|
277 |
#: src/wizards/plugin.php:482 src/wizards/plugin.php:515
|
278 |
+
#: src/wizards/plugin.php:550 src/wizards/plugin.php:694
|
279 |
msgid "Disabled"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: src/features/base.php:1029 src/lib/src/Modules/Base/BaseModCon.php:1033
|
283 |
msgid ""
|
284 |
"Unfortunately your WordPress and/or PHP versions are too old to support this "
|
285 |
"feature."
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: src/features/base.php:1183 src/lib/src/Modules/Base/BaseModCon.php:1187
|
289 |
msgid "You don't currently have permission to save settings."
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: src/features/base.php:1277 src/lib/src/Modules/Base/BaseModCon.php:1281
|
293 |
msgid "Password values do not match."
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: src/features/base.php:1510 src/lib/src/Modules/AuditTrail/Strings.php:197
|
297 |
+
#: src/lib/src/Modules/Base/BaseModCon.php:1514
|
298 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:195
|
299 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:269
|
300 |
#: src/lib/src/Modules/LoginGuard/Strings.php:265
|
301 |
#: src/lib/src/Modules/LoginGuard/Strings.php:308
|
302 |
#: src/lib/src/Modules/LoginGuard/Strings.php:315
|
303 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:130
|
304 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:138
|
305 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:233
|
306 |
msgid "Default"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: src/features/base.php:1517 src/lib/src/Modules/Base/BaseModCon.php:1521
|
310 |
msgid "For more information:"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: src/features/base.php:1518 src/lib/src/Modules/Base/BaseModCon.php:1522
|
314 |
+
#: src/lib/src/Modules/Plugin/Strings.php:429
|
315 |
msgid "Support Forums"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: src/features/base_wpsf.php:425
|
319 |
msgid "Module Disabled"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: src/features/base_wpsf.php:427
|
323 |
msgid "All features of this module are completely disabled"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: src/features/comments_filter.php:60
|
327 |
msgid "I'm not a spammer."
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: src/features/comments_filter.php:63
|
331 |
msgid "Please check the box to confirm you're not a spammer."
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: src/features/comments_filter.php:66
|
335 |
#, php-format
|
336 |
msgid "Please wait %s seconds before posting your comment."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: src/features/comments_filter.php:69
|
340 |
msgid "Please reload this page to post a comment."
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: src/features/comments_filter.php:115
|
344 |
msgid "SPAM Blocking"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: src/features/comments_filter.php:116
|
348 |
msgid "Block Bot & Human Comment SPAM"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: src/features/comments_filter.php:127
|
352 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:60
|
353 |
msgid "Bot SPAM"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: src/features/comments_filter.php:130
|
357 |
msgid "Bot SPAM comments are blocked"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: src/features/comments_filter.php:131
|
361 |
msgid "There is no protection against Bot SPAM comments"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: src/features/comments_filter.php:136
|
365 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:79
|
366 |
msgid "Human SPAM"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: src/features/comments_filter.php:139
|
370 |
msgid "Comments posted by humans are checked for SPAM"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: src/features/comments_filter.php:140
|
374 |
msgid "Comments posted by humans aren't checked for SPAM"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: src/features/comments_filter.php:162
|
378 |
#, php-format
|
379 |
msgid "Please remember to supply reCAPTCHA keys: %s"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: src/features/comments_filter.php:163
|
383 |
msgid "reCAPTCHA Settings"
|
384 |
msgstr ""
|
385 |
|
398 |
#: src/lib/src/Modules/Events/Strings.php:185
|
399 |
#: src/lib/src/Modules/Events/Strings.php:189
|
400 |
#: src/lib/src/Modules/Firewall/Strings.php:24
|
401 |
+
#: src/lib/src/Modules/Plugin/Strings.php:408
|
402 |
msgid "Firewall"
|
403 |
msgstr ""
|
404 |
|
426 |
msgid "Firewall rules aren't applied to admins"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: src/features/hack_protect.php:170
|
430 |
#, php-format
|
431 |
msgid "%s per day"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: src/features/hack_protect.php:576
|
435 |
msgid "Re-install First"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: src/features/hack_protect.php:577
|
|
|
439 |
msgid "Then Activate"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: src/features/hack_protect.php:579 src/features/license.php:550
|
443 |
+
#: src/lib/src/Modules/Base/Strings.php:27 src/lib/src/Tables/Build/Ip.php:54
|
444 |
+
#: src/lib/src/Tables/Build/ScanBase.php:62
|
445 |
#: src/lib/src/Tables/Build/Sessions.php:68
|
446 |
#: src/lib/src/Tables/Build/Traffic.php:109
|
447 |
msgid "Yes"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: src/features/hack_protect.php:579
|
451 |
msgid "Re-Install It"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: src/features/hack_protect.php:580
|
455 |
msgid "Activate Only"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: src/features/hack_protect.php:581
|
459 |
msgid "Cancel"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: src/features/hack_protect.php:625 src/features/license.php:542
|
463 |
#: src/lib/src/Modules/Base/Strings.php:29
|
464 |
+
#: src/lib/src/Modules/Plugin/Strings.php:322
|
465 |
+
#: src/processors/hack_protect.php:87 src/processors/hack_protect.php:117
|
466 |
msgid "Never"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: src/features/hack_protect.php:626
|
470 |
#, php-format
|
471 |
msgid "Last Scan Time: %s"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: src/features/hack_protect.php:642
|
475 |
#, php-format
|
476 |
msgid ""
|
477 |
"Sorry, this feature is not available because we cannot write to disk at this "
|
478 |
"location: \"%s\""
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: src/features/hack_protect.php:648
|
482 |
#, php-format
|
483 |
msgid "Not available because the %s extension is not available."
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: src/features/hack_protect.php:651
|
487 |
msgid ""
|
488 |
"Not available because PHP/WordPress doesn't have direct filesystem access."
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: src/features/hack_protect.php:656
|
492 |
#, php-format
|
493 |
msgid "The %s file isn't writable and so can't be further protected."
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: src/features/hack_protect.php:831 src/features/insights.php:283
|
497 |
msgid "Scans"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: src/features/hack_protect.php:839
|
501 |
msgid "Core File scanner is not enabled."
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: src/features/hack_protect.php:842
|
505 |
msgid "Automatic WordPress Core File scanner should be turned-on."
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: src/features/hack_protect.php:848
|
509 |
msgid "Modified WordPress core files found."
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: src/features/hack_protect.php:850 src/features/hack_protect.php:871
|
513 |
+
#: src/features/hack_protect.php:892 src/features/hack_protect.php:913
|
514 |
+
#: src/features/hack_protect.php:934 src/features/hack_protect.php:955
|
515 |
msgid "Run Scan"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: src/features/hack_protect.php:851
|
519 |
msgid "Scan WP core files and repair any files that are flagged as modified."
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: src/features/hack_protect.php:860
|
523 |
msgid "Unrecognised File scanner is not enabled."
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: src/features/hack_protect.php:863
|
527 |
msgid "Automatic scanning for non-WordPress core files is recommended."
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: src/features/hack_protect.php:869
|
531 |
msgid "Unrecognised files found in WordPress Core directory."
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: src/features/hack_protect.php:872
|
535 |
msgid ""
|
536 |
"Scan and remove any files that are not meant to be in the WP core "
|
537 |
"directories."
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: src/features/hack_protect.php:881
|
541 |
msgid "Automatic Plugin/Themes Guard is not enabled."
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: src/features/hack_protect.php:884
|
545 |
msgid "Automatic detection of plugin/theme modifications is recommended."
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: src/features/hack_protect.php:890
|
549 |
msgid "A plugin/theme was found to have been modified."
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: src/features/hack_protect.php:893
|
553 |
msgid "Reviewing modifications to your plugins/themes is recommended."
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: src/features/hack_protect.php:902
|
557 |
msgid "Vulnerability Scanner is not enabled."
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: src/features/hack_protect.php:905
|
561 |
msgid "Automatic detection of vulnerabilities is recommended."
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: src/features/hack_protect.php:911
|
565 |
msgid "At least 1 item has known vulnerabilities."
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: src/features/hack_protect.php:914
|
569 |
msgid ""
|
570 |
"Items with known vulnerabilities should be updated, removed, or replaced."
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: src/features/hack_protect.php:923
|
574 |
msgid "Abandoned Plugins Scanner is not enabled."
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: src/features/hack_protect.php:926
|
578 |
msgid "Automatic detection of abandoned plugins is recommended."
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: src/features/hack_protect.php:932
|
582 |
msgid "At least 1 plugin on your site is abandoned."
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: src/features/hack_protect.php:935
|
586 |
msgid ""
|
587 |
"Plugins that have been abandoned represent a potential risk to your site."
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: src/features/hack_protect.php:944 src/features/hack_protect.php:1087
|
591 |
+
#: src/features/hack_protect.php:1099
|
592 |
#, php-format
|
593 |
msgid "%s Scanner is not enabled."
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: src/features/hack_protect.php:947
|
597 |
msgid "Automatic detection of Malware is recommended."
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: src/features/hack_protect.php:953
|
601 |
msgid "At least 1 file with potential Malware has been discovered."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: src/features/hack_protect.php:956
|
605 |
msgid ""
|
606 |
"Files identified as potential malware should be examined as soon as possible."
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: src/features/hack_protect.php:980
|
610 |
#: src/lib/src/Modules/HackGuard/Strings.php:94
|
611 |
+
#: src/lib/src/Modules/Plugin/Strings.php:410
|
612 |
msgid "Hack Guard"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: src/features/hack_protect.php:981
|
616 |
msgid "Threats/Intrusions Detection & Repair"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: src/features/hack_protect.php:993
|
620 |
msgid "Scan Frequency"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: src/features/hack_protect.php:996
|
624 |
msgid "Automatic scanners run more than once per day"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: src/features/hack_protect.php:997
|
628 |
msgid "Automatic scanners only run once per day"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: src/features/hack_protect.php:1004
|
632 |
msgid "WP Core File Scan"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: src/features/hack_protect.php:1007
|
636 |
msgid "Core files scanned regularly for hacks"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: src/features/hack_protect.php:1008
|
640 |
msgid "Core files are never scanned for hacks!"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: src/features/hack_protect.php:1014
|
644 |
msgid "WP Core File Repair"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: src/features/hack_protect.php:1017
|
648 |
msgid "Core files are automatically repaired"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: src/features/hack_protect.php:1018
|
652 |
msgid "Core files aren't automatically repaired!"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: src/features/hack_protect.php:1026 src/lib/src/Modules/Events/Strings.php:94
|
656 |
#: src/lib/src/Modules/Events/Strings.php:118
|
657 |
#: src/lib/src/Modules/HackGuard/Strings.php:26
|
658 |
#: src/lib/src/Modules/HackGuard/Strings.php:118
|
659 |
msgid "Unrecognised Files"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: src/features/hack_protect.php:1029
|
663 |
msgid "Core directories scanned regularly for unrecognised files"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: src/features/hack_protect.php:1030
|
667 |
msgid "WP Core is never scanned for unrecognised files!"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: src/features/hack_protect.php:1036
|
671 |
msgid "Unrecognised Files Removal"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: src/features/hack_protect.php:1039
|
675 |
msgid "Unrecognised files are automatically removed"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: src/features/hack_protect.php:1040
|
679 |
msgid "Unrecognised files aren't automatically removed!"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: src/features/hack_protect.php:1048
|
683 |
msgid "Vulnerability Scan"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: src/features/hack_protect.php:1051
|
687 |
msgid "Regularly scanning for known vulnerabilities"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: src/features/hack_protect.php:1052
|
691 |
msgid "Plugins/Themes never scanned for vulnerabilities!"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: src/features/hack_protect.php:1058
|
695 |
msgid "Auto Update"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: src/features/hack_protect.php:1061
|
699 |
msgid "Vulnerable items are automatically updated"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: src/features/hack_protect.php:1062
|
703 |
msgid "Vulnerable items aren't automatically updated!"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: src/features/hack_protect.php:1071 src/lib/src/Modules/Events/Strings.php:90
|
707 |
#: src/lib/src/Modules/Events/Strings.php:114
|
708 |
#: src/lib/src/Modules/HackGuard/Strings.php:24
|
709 |
msgid "Plugin/Theme Guard"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: src/features/hack_protect.php:1074
|
713 |
msgid "Plugins and Themes are guarded against tampering"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: src/features/hack_protect.php:1075
|
717 |
msgid "Plugins and Themes are never scanned for tampering!"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: src/features/hack_protect.php:1086 src/features/hack_protect.php:1098
|
721 |
+
#, php-format
|
722 |
+
msgid "%s Scanner is enabled."
|
723 |
+
msgstr ""
|
724 |
+
|
725 |
#: src/features/headers.php:133
|
726 |
msgid "HTTP Security Headers"
|
727 |
msgstr ""
|
730 |
msgid "Protect Visitors With Powerful HTTP Headers"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: src/features/headers.php:147 src/lib/src/Modules/Plugin/Strings.php:411
|
734 |
msgid "HTTP Headers"
|
735 |
msgstr ""
|
736 |
|
792 |
msgid "Black listed IPs auto-expire after: %s"
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: src/features/insights.php:114 src/lib/src/Modules/Plugin/Strings.php:377
|
796 |
msgid "IP Whitelist"
|
797 |
msgstr ""
|
798 |
|
854 |
msgid "Traffic Table Filters"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: src/features/insights.php:163 src/features/traffic.php:49
|
858 |
msgid "Traffic Watch"
|
859 |
msgstr ""
|
860 |
|
895 |
#: src/lib/src/Tables/Render/AdminNotes.php:31
|
896 |
#: src/processors/loginprotect_intentprovider_backup.php:164
|
897 |
#: src/processors/loginprotect_intentprovider_email.php:155
|
898 |
+
#: src/processors/user_management.php:203
|
899 |
+
#: src/processors/user_management.php:235
|
900 |
msgid "Username"
|
901 |
msgstr ""
|
902 |
|
952 |
msgid "IP Lists"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: src/features/insights.php:286 src/features/user_management.php:291
|
956 |
#: src/lib/src/Modules/AuditTrail/Strings.php:90
|
957 |
msgid "Users"
|
958 |
msgstr ""
|
991 |
msgid "Please select an action to perform."
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: src/features/insights.php:476 src/processors/hackprotect_scan_ptg.php:157
|
995 |
msgid "Are you sure?"
|
996 |
msgstr ""
|
997 |
|
1022 |
|
1023 |
#: src/features/insights.php:644 src/features/insights.php:655
|
1024 |
#: src/lib/src/Modules/AuditTrail/Strings.php:91
|
1025 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:213
|
1026 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:214
|
1027 |
#: src/lib/src/Modules/Autoupdates/Strings.php:123
|
1028 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:143
|
1029 |
msgid "Plugins"
|
1030 |
msgstr ""
|
1031 |
|
1059 |
|
1060 |
#: src/features/insights.php:684 src/features/insights.php:695
|
1061 |
#: src/lib/src/Modules/AuditTrail/Strings.php:92
|
1062 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:219
|
1063 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:220
|
1064 |
#: src/lib/src/Modules/Autoupdates/Strings.php:135
|
1065 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:162
|
1066 |
msgid "Themes"
|
1067 |
msgstr ""
|
1068 |
|
1120 |
msgid "Total SPAM comments blocked."
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: src/features/insights.php:792 src/lib/src/Tables/Render/IpBase.php:23
|
1124 |
#: src/lib/src/Tables/Render/IpBlack.php:14
|
1125 |
msgid "Offenses"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: src/features/insights.php:794
|
1129 |
msgid "Total offenses against the site."
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: src/features/insights.php:797 src/processors/events.php:57
|
1133 |
msgid "IP Blocks"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: src/features/insights.php:799
|
1137 |
msgid "Total connections blocked/killed after too many offenses."
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: src/features/insights.php:802
|
1141 |
msgid "Blacklist IPs"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: src/features/insights.php:810
|
1145 |
msgid "Current IP addresses with offenses against the site."
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: src/features/insights.php:857
|
1149 |
msgid "Not yet recorded"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: src/features/ips.php:84 src/lib/src/Modules/HackGuard/Strings.php:45
|
1153 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:204
|
1154 |
#: src/lib/src/Modules/Headers/Strings.php:140
|
1155 |
#: src/lib/src/Modules/LoginGuard/Strings.php:81
|
1156 |
#: src/lib/src/Modules/LoginGuard/Strings.php:109
|
1162 |
#: src/lib/src/Modules/Plugin/Strings.php:98
|
1163 |
#: src/lib/src/Modules/Plugin/Strings.php:102
|
1164 |
#: src/lib/src/Modules/Plugin/Strings.php:198
|
1165 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:120
|
1166 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:139
|
1167 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:146
|
1168 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:167
|
1169 |
#: src/lib/src/Modules/Traffic/Strings.php:127
|
1170 |
#: src/lib/src/Tables/Render/AdminNotes.php:30
|
1171 |
+
#: src/processors/hackprotect_scan_ptg.php:161
|
1172 |
msgid "Note"
|
1173 |
msgstr ""
|
1174 |
|
1175 |
+
#: src/features/ips.php:84
|
1176 |
msgid "IP blocking is turned-off because the offenses limit is set to 0."
|
1177 |
msgstr ""
|
1178 |
|
1179 |
+
#: src/features/ips.php:92
|
1180 |
msgid "Since the offenses limit is set to 0, these options have no effect."
|
1181 |
msgstr ""
|
1182 |
|
1183 |
+
#: src/features/ips.php:96
|
1184 |
msgid ""
|
1185 |
"Your User Agent appears to be empty. We recommend not turning on this option."
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: src/features/ips.php:114 src/features/ips.php:121
|
1189 |
#: src/lib/src/Modules/Firewall/Strings.php:138
|
1190 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:259
|
|
|
1191 |
#: src/lib/src/Modules/HackGuard/Strings.php:283
|
1192 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:284
|
1193 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:350
|
1194 |
#: src/lib/src/Modules/IPs/Strings.php:66
|
1195 |
#: src/lib/src/Modules/Lockdown/Strings.php:130
|
1196 |
#: src/lib/src/Modules/Lockdown/Strings.php:143
|
1197 |
#: src/lib/src/Modules/Plugin/AdminNotices.php:88
|
1198 |
#: src/lib/src/Modules/Plugin/Strings.php:214
|
1199 |
#: src/lib/src/Modules/Traffic/Strings.php:54
|
1200 |
+
#: src/processors/hackprotect_scan_apc.php:100
|
1201 |
+
#: src/processors/hackprotect_scan_mal.php:94
|
1202 |
+
#: src/processors/hackprotect_scan_ptg.php:617
|
1203 |
+
#: src/processors/hackprotect_scan_ufc.php:85
|
1204 |
+
#: src/processors/hackprotect_scan_wcf.php:71
|
1205 |
+
#: src/processors/hackprotect_scan_wpv.php:261
|
1206 |
+
#: src/processors/loginprotect_wplogin.php:75
|
1207 |
+
#: src/processors/loginprotect_wplogin.php:93
|
1208 |
msgid "Warning"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
+
#: src/features/ips.php:115
|
1212 |
msgid ""
|
1213 |
"Repeated login attempts that fail will result in a complete ban of your IP "
|
1214 |
"Address."
|
1215 |
msgstr ""
|
1216 |
|
1217 |
+
#: src/features/ips.php:122
|
1218 |
#, php-format
|
1219 |
msgid ""
|
1220 |
"You have %s remaining offenses(s) against this site and then your IP address "
|
1221 |
"will be completely blocked."
|
1222 |
msgstr ""
|
1223 |
|
1224 |
+
#: src/features/ips.php:123
|
1225 |
msgid "Seriously, stop repeating what you are doing or you will be locked out."
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: src/features/ips.php:185
|
1229 |
#, php-format
|
1230 |
msgid ""
|
1231 |
"Sorry, the %s feature may not be disabled while there are IP addresses in "
|
1232 |
"the White List"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: src/features/license.php:116
|
1236 |
msgid "Automatic license verification failed."
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: src/features/license.php:211
|
1240 |
msgid "Attempts to verify Shield Pro license has just failed."
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: src/features/license.php:212 src/features/license.php:239
|
1244 |
#, php-format
|
1245 |
msgid "Please check your license on-site: %s"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: src/features/license.php:213 src/features/license.php:240
|
1249 |
#, php-format
|
1250 |
msgid "If this problem persists, please contact support: %s"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: src/features/license.php:238
|
1254 |
msgid "All attempts to verify Shield Pro license have failed."
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: src/features/license.php:550
|
1258 |
msgid "Not Active"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: src/features/lockdown.php:70 src/lib/src/Modules/Plugin/Strings.php:415
|
1262 |
msgid "WP Lockdown"
|
1263 |
msgstr ""
|
1264 |
|
1396 |
|
1397 |
#: src/features/login_protect.php:511
|
1398 |
#: src/lib/src/Modules/Plugin/AdminNotices.php:194
|
1399 |
+
#: src/processors/lockdown.php:96
|
1400 |
msgid "Learn More."
|
1401 |
msgstr ""
|
1402 |
|
1403 |
#: src/features/login_protect.php:592
|
1404 |
#: src/lib/src/Modules/LoginGuard/Strings.php:71
|
1405 |
+
#: src/lib/src/Modules/Plugin/Strings.php:417 src/wizards/plugin.php:549
|
1406 |
+
#: src/wizards/plugin.php:554
|
1407 |
msgid "Login Guard"
|
1408 |
msgstr ""
|
1409 |
|
1459 |
msgid "No 2FA options, such as Google Authenticator, are active"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
+
#: src/features/plugin.php:175 src/lib/src/Modules/Plugin/AjaxHandler.php:243
|
1463 |
msgid "Options imported successfully"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
+
#: src/features/plugin.php:695
|
1467 |
+
#: src/lib/src/Modules/Plugin/Components/PluginBadge.php:76
|
1468 |
#, php-format
|
1469 |
msgid "This Site Is Protected By %s"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: src/features/plugin.php:758 src/lib/src/Modules/Plugin/Strings.php:374
|
1473 |
#: src/processors/plugin_importexport.php:63
|
1474 |
msgid "General Settings"
|
1475 |
msgstr ""
|
1476 |
|
1477 |
+
#: src/features/plugin.php:759
|
1478 |
#, php-format
|
1479 |
msgid "General %s Settings"
|
1480 |
msgstr ""
|
1481 |
|
1482 |
+
#: src/features/plugin.php:772
|
1483 |
msgid "Visitor IP"
|
1484 |
msgstr ""
|
1485 |
|
1486 |
+
#: src/features/plugin.php:774
|
1487 |
#, php-format
|
1488 |
msgid "Visitor IP address source is: %s"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
+
#: src/features/plugin.php:782
|
1492 |
msgid "Reporting Email"
|
1493 |
msgstr ""
|
1494 |
|
1495 |
+
#: src/features/plugin.php:785
|
1496 |
#, php-format
|
1497 |
msgid "Email address for reports set to: %s"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: src/features/plugin.php:786
|
1501 |
#, php-format
|
1502 |
msgid "No address provided - defaulting to: %s"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
+
#: src/features/plugin.php:794 src/lib/src/Modules/Events/Strings.php:209
|
1506 |
msgid "reCAPTCHA"
|
1507 |
msgstr ""
|
1508 |
|
1509 |
+
#: src/features/plugin.php:797
|
1510 |
msgid "Google reCAPTCHA keys have been provided"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
+
#: src/features/plugin.php:798
|
1514 |
msgid "Google reCAPTCHA keys haven't been provided"
|
1515 |
msgstr ""
|
1516 |
|
1517 |
+
#: src/features/traffic.php:49
|
1518 |
#, php-format
|
1519 |
msgid "%s is a Pro-only feature."
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: src/features/traffic.php:54
|
1523 |
msgid ""
|
1524 |
"Traffic Watcher will not run because visitor IP address detection is not "
|
1525 |
"correctly configured."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
+
#: src/features/user_management.php:143
|
1529 |
+
#: src/lib/src/Modules/Plugin/Strings.php:367
|
1530 |
msgid "Very Weak"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
+
#: src/features/user_management.php:144
|
1534 |
+
#: src/lib/src/Modules/Plugin/Strings.php:368
|
1535 |
msgid "Weak"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: src/features/user_management.php:145
|
1539 |
+
#: src/lib/src/Modules/Plugin/Strings.php:369
|
1540 |
msgid "Medium"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: src/features/user_management.php:146
|
1544 |
+
#: src/lib/src/Modules/Plugin/Strings.php:370
|
1545 |
msgid "Strong"
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: src/features/user_management.php:147
|
1549 |
+
#: src/lib/src/Modules/Plugin/Strings.php:371
|
1550 |
msgid "Very Strong"
|
1551 |
msgstr ""
|
1552 |
|
1553 |
+
#: src/features/user_management.php:300
|
1554 |
msgid "Default 'admin' user still available."
|
1555 |
msgstr ""
|
1556 |
|
1557 |
+
#: src/features/user_management.php:302
|
1558 |
msgid "Default 'admin' user should be disabled or removed."
|
1559 |
msgstr ""
|
1560 |
|
1561 |
+
#: src/features/user_management.php:310 src/features/user_management.php:380
|
1562 |
#: src/lib/src/Modules/UserManagement/Strings.php:45
|
1563 |
#: src/lib/src/Modules/UserManagement/Strings.php:46
|
1564 |
msgid "Password Policies"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
+
#: src/features/user_management.php:311
|
1568 |
msgid "Strong password policies are not enforced."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: src/features/user_management.php:314
|
1572 |
msgid "Password policies should be turned-on."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
+
#: src/features/user_management.php:332
|
1576 |
+
#: src/lib/src/Modules/Plugin/Strings.php:426
|
1577 |
#: src/lib/src/Modules/Sessions/Strings.php:24
|
1578 |
#: src/lib/src/Modules/Traffic/Strings.php:43
|
1579 |
#: src/lib/src/Modules/Traffic/Strings.php:53
|
1581 |
msgid "User Management"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
+
#: src/features/user_management.php:333
|
1585 |
msgid "Sessions Control & Password Policies"
|
1586 |
msgstr ""
|
1587 |
|
1588 |
+
#: src/features/user_management.php:345
|
1589 |
msgid "Idle Users"
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: src/features/user_management.php:348
|
1593 |
#, php-format
|
1594 |
msgid "Idle sessions are terminated after %s hours"
|
1595 |
msgstr ""
|
1596 |
|
1597 |
+
#: src/features/user_management.php:349
|
1598 |
msgid "Idle sessions wont be terminated"
|
1599 |
msgstr ""
|
1600 |
|
1601 |
+
#: src/features/user_management.php:356
|
1602 |
msgid "Lock To IP"
|
1603 |
msgstr ""
|
1604 |
|
1605 |
+
#: src/features/user_management.php:359
|
1606 |
msgid "Sessions are locked to IP address"
|
1607 |
msgstr ""
|
1608 |
|
1609 |
+
#: src/features/user_management.php:360
|
1610 |
msgid "Sessions aren't locked to IP address"
|
1611 |
msgstr ""
|
1612 |
|
1613 |
+
#: src/features/user_management.php:369
|
1614 |
msgid "Pwned Passwords"
|
1615 |
msgstr ""
|
1616 |
|
1617 |
+
#: src/features/user_management.php:372
|
1618 |
msgid "Pwned passwords are blocked on this site"
|
1619 |
msgstr ""
|
1620 |
|
1621 |
+
#: src/features/user_management.php:373
|
1622 |
msgid "Pwned passwords are allowed on this site"
|
1623 |
msgstr ""
|
1624 |
|
1625 |
+
#: src/features/user_management.php:383
|
1626 |
msgid "Several password policies are active"
|
1627 |
msgstr ""
|
1628 |
|
1629 |
+
#: src/features/user_management.php:384
|
1630 |
msgid "Limited or no password polices are active"
|
1631 |
msgstr ""
|
1632 |
|
1795 |
msgstr ""
|
1796 |
|
1797 |
#: src/lib/src/Modules/AuditTrail/Strings.php:95
|
1798 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:237
|
1799 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:238
|
1800 |
msgid "Emails"
|
1801 |
msgstr ""
|
1802 |
|
1803 |
#: src/lib/src/Modules/AuditTrail/Strings.php:96
|
1804 |
+
#: src/processors/user_management.php:237
|
1805 |
msgid "Time"
|
1806 |
msgstr ""
|
1807 |
|
1821 |
|
1822 |
#: src/lib/src/Modules/AuditTrail/Strings.php:101
|
1823 |
#: src/lib/src/Modules/Base/Strings.php:44
|
1824 |
+
#: src/lib/src/Modules/Plugin/Strings.php:388
|
1825 |
#: src/lib/src/Tables/Render/IpBase.php:21
|
1826 |
#: src/lib/src/Tables/Render/IpBlack.php:16
|
1827 |
+
#: src/lib/src/Tables/Render/IpWhite.php:12 src/processors/firewall.php:403
|
1828 |
#: src/processors/loginprotect_intentprovider_backup.php:165
|
1829 |
#: src/processors/loginprotect_intentprovider_email.php:156
|
1830 |
+
#: src/processors/user_management.php:205
|
1831 |
+
#: src/processors/user_management.php:236
|
1832 |
msgid "IP Address"
|
1833 |
msgstr ""
|
1834 |
|
2081 |
msgid "Specify which types of actions on your site are logged."
|
2082 |
msgstr ""
|
2083 |
|
2084 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:188
|
2085 |
#: src/lib/src/Modules/Autoupdates/Strings.php:90
|
2086 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:104
|
2087 |
#: src/lib/src/Modules/Firewall/Strings.php:80
|
2088 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:187
|
2089 |
#: src/lib/src/Modules/Headers/Strings.php:67
|
2090 |
#: src/lib/src/Modules/IPs/Strings.php:117
|
2091 |
#: src/lib/src/Modules/Lockdown/Strings.php:89
|
2092 |
#: src/lib/src/Modules/LoginGuard/Strings.php:164
|
2093 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:102
|
2094 |
#: src/lib/src/Modules/Sessions/Strings.php:50
|
2095 |
#: src/lib/src/Modules/Traffic/Strings.php:83
|
2096 |
#: src/lib/src/Modules/UserManagement/Strings.php:113
|
2098 |
msgid "Enable %s Module"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:189
|
2102 |
#: src/lib/src/Modules/Autoupdates/Strings.php:91
|
2103 |
#: src/lib/src/Modules/Firewall/Strings.php:81
|
2104 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:188
|
2105 |
#: src/lib/src/Modules/Headers/Strings.php:68
|
2106 |
#: src/lib/src/Modules/IPs/Strings.php:118
|
2107 |
#: src/lib/src/Modules/Lockdown/Strings.php:90
|
2113 |
msgid "Enable (or Disable) The %s Module"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:190
|
2117 |
#: src/lib/src/Modules/Autoupdates/Strings.php:92
|
2118 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:106
|
2119 |
#: src/lib/src/Modules/Firewall/Strings.php:82
|
2120 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:189
|
2121 |
#: src/lib/src/Modules/Headers/Strings.php:69
|
2122 |
#: src/lib/src/Modules/IPs/Strings.php:119
|
2123 |
#: src/lib/src/Modules/Lockdown/Strings.php:91
|
2129 |
msgid "Un-Checking this option will completely disable the %s module."
|
2130 |
msgstr ""
|
2131 |
|
2132 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:194
|
2133 |
msgid "Max Trail Length"
|
2134 |
msgstr ""
|
2135 |
|
2136 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:195
|
2137 |
msgid "Maximum Audit Trail Length To Keep"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:196
|
2141 |
msgid ""
|
2142 |
"Automatically remove any audit trail entries when this limit is exceeded."
|
2143 |
msgstr ""
|
2144 |
|
2145 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:201
|
2146 |
msgid "Auto Clean"
|
2147 |
msgstr ""
|
2148 |
|
2149 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:202
|
2150 |
msgid "Automatically Purge Audit Log Entries Older Than The Set Number Of Days"
|
2151 |
msgstr ""
|
2152 |
|
2153 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:203
|
2154 |
msgid ""
|
2155 |
"Events older than the number of days specified will be automatically cleaned "
|
2156 |
"from the database."
|
2157 |
msgstr ""
|
2158 |
|
|
|
|
|
2159 |
#: src/lib/src/Modules/AuditTrail/Strings.php:207
|
2160 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:208
|
2161 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:209
|
2162 |
msgid "Users And Logins"
|
2163 |
msgstr ""
|
2164 |
|
2165 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:208
|
2166 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:214
|
2167 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:220
|
2168 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:226
|
2169 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:232
|
2170 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:238
|
2171 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:244
|
2172 |
#, php-format
|
2173 |
msgid "Enable Audit Context - %s"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:209
|
2177 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:215
|
2178 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:221
|
2179 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:227
|
2180 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:233
|
2181 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:239
|
2182 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:245
|
2183 |
#, php-format
|
2184 |
msgid ""
|
2185 |
"When this context is enabled, the audit trail will track activity relating "
|
2186 |
"to: %s"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:215
|
2190 |
msgid "WordPress Plugins"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:221
|
2194 |
msgid "WordPress Themes"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:225
|
2198 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:226
|
2199 |
msgid "Posts And Pages"
|
2200 |
msgstr ""
|
2201 |
|
2202 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:227
|
2203 |
msgid "Editing and publishing of posts and pages"
|
2204 |
msgstr ""
|
2205 |
|
2206 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:231
|
2207 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:232
|
2208 |
msgid "WordPress And Settings"
|
2209 |
msgstr ""
|
2210 |
|
2211 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:233
|
2212 |
msgid "WordPress upgrades and changes to particular WordPress settings"
|
2213 |
msgstr ""
|
2214 |
|
2215 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:239
|
2216 |
msgid "Email Sending"
|
2217 |
msgstr ""
|
2218 |
|
2219 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:249
|
2220 |
msgid "Site Change Tracking"
|
2221 |
msgstr ""
|
2222 |
|
2223 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:250
|
2224 |
msgid "Track Major Changes To Your Site"
|
2225 |
msgstr ""
|
2226 |
|
2227 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:251
|
2228 |
msgid ""
|
2229 |
"Tracking major changes to your site will help you monitor and catch "
|
2230 |
"malicious damage."
|
2231 |
msgstr ""
|
2232 |
|
2233 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:255
|
2234 |
msgid "Snapshot Per Week"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:256
|
2238 |
msgid "Number Of Snapshots To Take Per Week"
|
2239 |
msgstr ""
|
2240 |
|
2241 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:257
|
2242 |
msgid ""
|
2243 |
"The number of snapshots to take per week. For daily snapshots, select 7."
|
2244 |
msgstr ""
|
2245 |
|
2246 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:258
|
2247 |
msgid "Data storage in your database increases with the number of snapshots."
|
2248 |
msgstr ""
|
2249 |
|
2250 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:259
|
2251 |
msgid ""
|
2252 |
"However, increased snapshots provide more granular information on when major "
|
2253 |
"site changes occurred."
|
2254 |
msgstr ""
|
2255 |
|
2256 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:263
|
2257 |
msgid "Max Snapshots"
|
2258 |
msgstr ""
|
2259 |
|
2260 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:264
|
2261 |
msgid "Maximum Number Of Snapshots To Retain"
|
2262 |
msgstr ""
|
2263 |
|
2264 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:265
|
2265 |
msgid ""
|
2266 |
"The more snapshots you retain, the further back you can look at changes over "
|
2267 |
"your site."
|
2268 |
msgstr ""
|
2269 |
|
2270 |
+
#: src/lib/src/Modules/AuditTrail/Strings.php:266
|
2271 |
msgid ""
|
2272 |
"You will need to consider the implications to database storage requirements."
|
2273 |
msgstr ""
|
2538 |
msgid "No Wizards"
|
2539 |
msgstr ""
|
2540 |
|
2541 |
+
#: src/lib/src/Modules/Base/Strings.php:28 src/lib/src/Tables/Build/Ip.php:54
|
2542 |
+
#: src/lib/src/Tables/Build/ScanBase.php:62
|
2543 |
#: src/lib/src/Tables/Build/Sessions.php:68
|
2544 |
#: src/lib/src/Tables/Build/Traffic.php:85
|
2545 |
#: src/lib/src/Tables/Build/Traffic.php:109
|
2628 |
msgstr ""
|
2629 |
|
2630 |
#: src/lib/src/Modules/Base/Strings.php:56
|
2631 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:205
|
2632 |
msgid "Description"
|
2633 |
msgstr ""
|
2634 |
|
2635 |
+
#: src/lib/src/Modules/Base/Strings.php:57 src/processors/ips.php:285
|
2636 |
#: src/processors/loginprotect_gasp.php:31
|
2637 |
msgid "Loading"
|
2638 |
msgstr ""
|
2909 |
msgstr ""
|
2910 |
|
2911 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:106
|
2912 |
+
#: src/wizards/plugin.php:693 src/wizards/plugin.php:698
|
2913 |
msgid "Comment SPAM Protection"
|
2914 |
msgstr ""
|
2915 |
|
2949 |
msgstr ""
|
2950 |
|
2951 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:121
|
|
|
2952 |
#: src/lib/src/Modules/HackGuard/Strings.php:342
|
2953 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:343
|
2954 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:351
|
2955 |
#: src/lib/src/Modules/LoginGuard/Strings.php:222
|
2956 |
#: src/lib/src/Modules/Plugin/Strings.php:239
|
2957 |
#: src/lib/src/Modules/Plugin/Strings.php:246
|
2958 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:70
|
2959 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:213
|
2960 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:230
|
2961 |
+
#: src/processors/hackprotect_scan_mal.php:121
|
2962 |
#: src/processors/loginprotect_intentprovider_backup.php:29
|
2963 |
msgid "Important"
|
2964 |
msgstr ""
|
2965 |
|
2966 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:121
|
2967 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:230
|
2968 |
msgid "Take a new line for each user role."
|
2969 |
msgstr ""
|
2970 |
|
2971 |
#: src/lib/src/Modules/CommentsFilter/Strings.php:122
|
2972 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:231
|
2973 |
msgid "Available Roles"
|
2974 |
msgstr ""
|
2975 |
|
3401 |
msgstr ""
|
3402 |
|
3403 |
#: src/lib/src/Modules/Events/Strings.php:162
|
3404 |
+
#: src/lib/src/Modules/Firewall/Strings.php:194 src/processors/firewall.php:430
|
3405 |
msgid "Directory Traversal"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
#: src/lib/src/Modules/Events/Strings.php:166
|
3409 |
#: src/lib/src/Modules/Firewall/Strings.php:104
|
3410 |
+
#: src/lib/src/Modules/Firewall/Strings.php:197 src/processors/firewall.php:433
|
3411 |
msgid "WordPress Terms"
|
3412 |
msgstr ""
|
3413 |
|
3414 |
#: src/lib/src/Modules/Events/Strings.php:170
|
3415 |
#: src/lib/src/Modules/Firewall/Strings.php:110
|
3416 |
+
#: src/lib/src/Modules/Firewall/Strings.php:200 src/processors/firewall.php:436
|
3417 |
msgid "Field Truncation"
|
3418 |
msgstr ""
|
3419 |
|
3420 |
#: src/lib/src/Modules/Events/Strings.php:174
|
3421 |
#: src/lib/src/Modules/Firewall/Strings.php:98
|
3422 |
+
#: src/lib/src/Modules/Firewall/Strings.php:203 src/processors/firewall.php:439
|
3423 |
msgid "SQL Queries"
|
3424 |
msgstr ""
|
3425 |
|
3426 |
#: src/lib/src/Modules/Events/Strings.php:178
|
3427 |
+
#: src/lib/src/Modules/Firewall/Strings.php:206 src/processors/firewall.php:445
|
3428 |
msgid "Leading Schema"
|
3429 |
msgstr ""
|
3430 |
|
3431 |
#: src/lib/src/Modules/Events/Strings.php:182
|
3432 |
+
#: src/lib/src/Modules/Firewall/Strings.php:209 src/processors/firewall.php:451
|
3433 |
msgid "Aggressive Rules"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
#: src/lib/src/Modules/Events/Strings.php:186
|
3437 |
#: src/lib/src/Modules/Firewall/Strings.php:116
|
3438 |
+
#: src/lib/src/Modules/Firewall/Strings.php:212 src/processors/firewall.php:448
|
3439 |
msgid "PHP Code"
|
3440 |
msgstr ""
|
3441 |
|
3442 |
#: src/lib/src/Modules/Events/Strings.php:190
|
3443 |
+
#: src/lib/src/Modules/Firewall/Strings.php:215 src/processors/firewall.php:442
|
3444 |
msgid "EXE File Uploads"
|
3445 |
msgstr ""
|
3446 |
|
3529 |
msgstr ""
|
3530 |
|
3531 |
#: src/lib/src/Modules/Events/Strings.php:228
|
|
|
3532 |
msgid "Theme Activated"
|
3533 |
msgstr ""
|
3534 |
|
3597 |
msgstr ""
|
3598 |
|
3599 |
#: src/lib/src/Modules/Events/Strings.php:245
|
|
|
3600 |
msgid "License Failure Email"
|
3601 |
msgstr ""
|
3602 |
|
3603 |
#: src/lib/src/Modules/Events/Strings.php:246
|
|
|
3604 |
msgid "License Deactivated"
|
3605 |
msgstr ""
|
3606 |
|
3875 |
#: src/lib/src/Modules/Firewall/Strings.php:206
|
3876 |
#: src/lib/src/Modules/Firewall/Strings.php:209
|
3877 |
#: src/lib/src/Modules/Firewall/Strings.php:212
|
3878 |
+
#: src/lib/src/Modules/Firewall/Strings.php:215 src/processors/firewall.php:203
|
3879 |
#, php-format
|
3880 |
msgid "Firewall Trigger: %s."
|
3881 |
msgstr ""
|
3890 |
msgid "Failed to send Firewall Block email alert to: %s"
|
3891 |
msgstr ""
|
3892 |
|
3893 |
+
#: src/lib/src/Modules/Firewall/Strings.php:228 src/processors/firewall.php:204
|
3894 |
msgid "Page parameter failed firewall check."
|
3895 |
msgstr ""
|
3896 |
|
3897 |
+
#: src/lib/src/Modules/Firewall/Strings.php:229 src/processors/firewall.php:205
|
3898 |
#, php-format
|
3899 |
msgid "The offending parameter was \"%s\" with a value of \"%s\"."
|
3900 |
msgstr ""
|
3916 |
msgstr ""
|
3917 |
|
3918 |
#: src/lib/src/Modules/Firewall/Strings.php:248
|
3919 |
+
#: src/lib/src/Tables/Build/ScanWcf.php:31
|
3920 |
#: src/lib/src/Tables/Build/Traffic.php:118
|
3921 |
#: src/lib/src/Tables/Build/Traffic.php:127
|
3922 |
msgid "Unknown"
|
3927 |
msgid "Firewall Block Response: %s."
|
3928 |
msgstr ""
|
3929 |
|
3930 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:158
|
3931 |
msgid "Unsupported scanner"
|
3932 |
msgstr ""
|
3933 |
|
3934 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:161
|
3935 |
msgid "Unsupported item(s) selected"
|
3936 |
msgstr ""
|
3937 |
|
3938 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:179
|
3939 |
msgid "Action successful."
|
3940 |
msgstr ""
|
3941 |
|
3942 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:182
|
3943 |
msgid "An error occurred."
|
3944 |
msgstr ""
|
3945 |
|
3946 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:182
|
3947 |
msgid "Some items may not have been processed."
|
3948 |
msgstr ""
|
3949 |
|
3950 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:188
|
3951 |
msgid "Rescanning"
|
3952 |
msgstr ""
|
3953 |
|
3954 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:191
|
3955 |
msgid "Reloading"
|
3956 |
msgstr ""
|
3957 |
|
3958 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:227
|
3959 |
msgid "No scan running."
|
3960 |
msgstr ""
|
3961 |
|
3962 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:237
|
3963 |
msgid "Current Scan"
|
3964 |
msgstr ""
|
3965 |
|
3966 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:239
|
3967 |
#, php-format
|
3968 |
msgid "%s of %s scans remaining."
|
3969 |
msgstr ""
|
3970 |
|
3971 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:242
|
3972 |
msgid "Please be patient."
|
3973 |
msgstr ""
|
3974 |
|
3975 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:243
|
3976 |
msgid "Some scans can take quite a while to complete."
|
3977 |
msgstr ""
|
3978 |
|
3979 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:244
|
3980 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:295
|
3981 |
msgid "Scans completed."
|
3982 |
msgstr ""
|
3983 |
|
3984 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:244
|
3985 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:295
|
3986 |
#: src/lib/src/Modules/License/AjaxHandler.php:88
|
3987 |
msgid "Reloading page"
|
3988 |
msgstr ""
|
3989 |
|
3990 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:260
|
3991 |
msgid "No scans were selected"
|
3992 |
msgstr ""
|
3993 |
|
3994 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:294
|
3995 |
msgid "Scans started."
|
3996 |
msgstr ""
|
3997 |
|
3998 |
+
#: src/lib/src/Modules/HackGuard/AjaxHandler.php:294
|
3999 |
msgid "Please wait, as this will take a few moments."
|
4000 |
msgstr ""
|
4001 |
|
4042 |
|
4043 |
#: src/lib/src/Modules/HackGuard/Strings.php:73
|
4044 |
#: src/lib/src/Modules/HackGuard/Strings.php:74
|
4045 |
+
#: src/processors/hack_protect.php:126
|
4046 |
msgid "Scan Options"
|
4047 |
msgstr ""
|
4048 |
|
4074 |
|
4075 |
#: src/lib/src/Modules/HackGuard/Strings.php:100
|
4076 |
#: src/lib/src/Modules/HackGuard/Strings.php:103
|
4077 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:214
|
4078 |
msgid "Vulnerabilities Scanner"
|
4079 |
msgstr ""
|
4080 |
|
4105 |
msgstr ""
|
4106 |
|
4107 |
#: src/lib/src/Modules/HackGuard/Strings.php:119
|
4108 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:251
|
4109 |
msgid "Unrecognised Files Scanner"
|
4110 |
msgstr ""
|
4111 |
|
4114 |
msgstr ""
|
4115 |
|
4116 |
#: src/lib/src/Modules/HackGuard/Strings.php:127
|
4117 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:316
|
4118 |
msgid "Enable The Abandoned Plugin Scanner"
|
4119 |
msgstr ""
|
4120 |
|
4169 |
msgid "Enable these to prevent unauthorized changes to your WordPress site."
|
4170 |
msgstr ""
|
4171 |
|
4172 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:193
|
4173 |
msgid "Daily Scan Frequency"
|
4174 |
msgstr ""
|
4175 |
|
4176 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:194
|
4177 |
msgid "Number Of Times To Automatically Run File Scan In 24hrs"
|
4178 |
msgstr ""
|
4179 |
|
4180 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:195
|
4181 |
msgid "Once every 24hrs."
|
4182 |
msgstr ""
|
4183 |
|
4184 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:196
|
4185 |
msgid "To improve security, increase the number of scans per day."
|
4186 |
msgstr ""
|
4187 |
|
4188 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:200
|
4189 |
msgid "Repeat Notifications"
|
4190 |
msgstr ""
|
4191 |
|
4192 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:201
|
4193 |
msgid "Item Repeat Notifications Suppression Interval"
|
4194 |
msgstr ""
|
4195 |
|
4196 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:202
|
4197 |
msgid ""
|
4198 |
"How long the automated scans should wait before repeating a notification "
|
4199 |
"about an item."
|
4200 |
msgstr ""
|
4201 |
|
4202 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:203
|
4203 |
msgid "Specify the number of days to suppress repeat notifications."
|
4204 |
msgstr ""
|
4205 |
|
4206 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:204
|
4207 |
msgid "This is per discovered item or file, not per scan."
|
4208 |
msgstr ""
|
4209 |
|
4210 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:208
|
4211 |
msgid "Email Files List"
|
4212 |
msgstr ""
|
4213 |
|
4214 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:209
|
4215 |
msgid "Scan Notification Emails Should Include Full Listing Of Files"
|
4216 |
msgstr ""
|
4217 |
|
4218 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:210
|
4219 |
msgid ""
|
4220 |
"Scanner notification emails will include a summary list of all affected "
|
4221 |
"files."
|
4222 |
msgstr ""
|
4223 |
|
4224 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:215
|
4225 |
#, php-format
|
4226 |
msgid "Daily Cron - %s"
|
4227 |
msgstr ""
|
4228 |
|
4229 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:215
|
4230 |
msgid "Scans Plugins For Known Vulnerabilities"
|
4231 |
msgstr ""
|
4232 |
|
4233 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:216
|
4234 |
msgid ""
|
4235 |
"Runs a scan of all your plugins against a database of known WordPress plugin "
|
4236 |
"vulnerabilities."
|
4237 |
msgstr ""
|
4238 |
|
4239 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:220
|
4240 |
msgid "Vulnerability Scanner"
|
4241 |
msgstr ""
|
4242 |
|
4243 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:221
|
4244 |
msgid "Enable The Vulnerability Scanner"
|
4245 |
msgstr ""
|
4246 |
|
4247 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:222
|
4248 |
msgid ""
|
4249 |
"Runs a scan of all your plugins against a database of known WordPress "
|
4250 |
"vulnerabilities."
|
4251 |
msgstr ""
|
4252 |
|
4253 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:227
|
4254 |
msgid "Apply Updates Automatically To Vulnerable Plugins"
|
4255 |
msgstr ""
|
4256 |
|
4257 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:228
|
4258 |
msgid ""
|
4259 |
"When an update becomes available, automatically apply updates to items with "
|
4260 |
"known vulnerabilities."
|
4261 |
msgstr ""
|
4262 |
|
4263 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:232
|
4264 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:321
|
4265 |
msgid "Highlight Plugins"
|
4266 |
msgstr ""
|
4267 |
|
4268 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:233
|
4269 |
msgid "Highlight Vulnerable Plugins Upon Display"
|
4270 |
msgstr ""
|
4271 |
|
4272 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:234
|
4273 |
msgid "Vulnerable plugins will be highlighted on the main plugins page."
|
4274 |
msgstr ""
|
4275 |
|
4276 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:238
|
4277 |
msgid "WP Core File Scanner"
|
4278 |
msgstr ""
|
4279 |
|
4280 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:239
|
4281 |
msgid "Automatically Scans WordPress Core Files For Changes"
|
4282 |
msgstr ""
|
4283 |
|
4284 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:240
|
4285 |
msgid ""
|
4286 |
"Compares all WordPress core files on your site against the official "
|
4287 |
"WordPress files."
|
4288 |
msgstr ""
|
4289 |
|
4290 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:241
|
4291 |
msgid "WordPress Core files should never be altered for any reason."
|
4292 |
msgstr ""
|
4293 |
|
4294 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:245
|
4295 |
msgid "Auto Repair"
|
4296 |
msgstr ""
|
4297 |
|
4298 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:246
|
4299 |
msgid "Automatically Repair WordPress Core Files That Have Been Altered"
|
4300 |
msgstr ""
|
4301 |
|
4302 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:247
|
4303 |
msgid ""
|
4304 |
"Attempts to automatically repair WordPress Core files with the official "
|
4305 |
"WordPress file data, for files that have been altered or are missing."
|
4306 |
msgstr ""
|
4307 |
|
4308 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:252
|
4309 |
msgid "Automatically Scans For Unrecognised Files In Core Directories"
|
4310 |
msgstr ""
|
4311 |
|
4312 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:253
|
4313 |
msgid ""
|
4314 |
"Scans for, and automatically deletes, any files in your core WordPress "
|
4315 |
"folders that are not part of your WordPress installation."
|
4316 |
msgstr ""
|
4317 |
|
4318 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:257
|
4319 |
msgid "Scan Uploads"
|
4320 |
msgstr ""
|
4321 |
|
4322 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:258
|
4323 |
msgid "Scan Uploads Folder For PHP and Javascript"
|
4324 |
msgstr ""
|
4325 |
|
4326 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:259
|
4327 |
msgid ""
|
4328 |
"Take care when turning on this option - if you are unsure, leave it disabled."
|
4329 |
msgstr ""
|
4330 |
|
4331 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:260
|
4332 |
msgid ""
|
4333 |
"The Uploads folder is primarily for media, but could be used to store "
|
4334 |
"nefarious files."
|
4335 |
msgstr ""
|
4336 |
|
4337 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:264
|
4338 |
msgid "File Exclusions"
|
4339 |
msgstr ""
|
4340 |
|
4341 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:265
|
4342 |
msgid "Provide A List Of Files To Be Excluded From The Scan"
|
4343 |
msgstr ""
|
4344 |
|
4345 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:267
|
4346 |
msgid "Take a new line for each file you wish to exclude from the scan."
|
4347 |
msgstr ""
|
4348 |
|
4349 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:268
|
4350 |
msgid "No commas are necessary."
|
4351 |
msgstr ""
|
4352 |
|
4353 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:273
|
4354 |
msgid "Enable Integrity Scan"
|
4355 |
msgstr ""
|
4356 |
|
4357 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:274
|
4358 |
msgid "Scans For Critical Changes Made To Your WordPress Site"
|
4359 |
msgstr ""
|
4360 |
|
4361 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:275
|
4362 |
msgid "Detects changes made to your WordPress site outside of WordPress."
|
4363 |
msgstr ""
|
4364 |
|
4365 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:279
|
4366 |
msgid "Monitor User Accounts"
|
4367 |
msgstr ""
|
4368 |
|
4369 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:280
|
4370 |
msgid "Scans For Critical Changes Made To User Accounts"
|
4371 |
msgstr ""
|
4372 |
|
4373 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:281
|
4374 |
msgid ""
|
4375 |
"Detects changes made to critical user account information that were made "
|
4376 |
"directly on the database and outside of the WordPress system."
|
4377 |
msgstr ""
|
4378 |
|
4379 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:282
|
4380 |
msgid "An example of this might be some form of SQL Injection attack."
|
4381 |
msgstr ""
|
4382 |
|
4383 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:283
|
4384 |
msgid ""
|
4385 |
"Enabling this option for every page low may slow down your site with large "
|
4386 |
"numbers of users."
|
4387 |
msgstr ""
|
4388 |
|
4389 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:284
|
4390 |
msgid ""
|
4391 |
"This option may cause critical problem with 3rd party plugins that manage "
|
4392 |
"user accounts."
|
4393 |
msgstr ""
|
4394 |
|
4395 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:288
|
4396 |
#: src/lib/src/Modules/Headers/Strings.php:98
|
4397 |
#: src/lib/src/Modules/Headers/Strings.php:99
|
4398 |
#: src/lib/src/Modules/LoginGuard/Strings.php:180
|
4402 |
msgid "Enable %s"
|
4403 |
msgstr ""
|
4404 |
|
4405 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:288
|
4406 |
msgid "Guard"
|
4407 |
msgstr ""
|
4408 |
|
4409 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:289
|
4410 |
msgid "Enable The Guard For Plugin And Theme Files"
|
4411 |
msgstr ""
|
4412 |
|
4413 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:290
|
4414 |
msgid ""
|
4415 |
"When enabled the Guard will automatically scan for changes to your Plugin "
|
4416 |
"and Theme files."
|
4417 |
msgstr ""
|
4418 |
|
4419 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:294
|
4420 |
msgid "Guard/Scan Depth"
|
4421 |
msgstr ""
|
4422 |
|
4423 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:295
|
4424 |
msgid "How Deep Into The Plugin Directories To Scan And Guard"
|
4425 |
msgstr ""
|
4426 |
|
4427 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:296
|
4428 |
msgid ""
|
4429 |
"The Guard normally scans only the top level of a folder. Increasing depth "
|
4430 |
"will increase scan times."
|
4431 |
msgstr ""
|
4432 |
|
4433 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:297
|
4434 |
#, php-format
|
4435 |
msgid ""
|
4436 |
"Setting it to %s will remove this limit and all sub-folders will be scanned "
|
4437 |
"- not recommended"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:301
|
4441 |
msgid "Included File Types"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:302
|
4445 |
msgid "The File Types (by File Extension) Included In The Scan"
|
4446 |
msgstr ""
|
4447 |
|
4448 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:303
|
4449 |
msgid "Take a new line for each file extension."
|
4450 |
msgstr ""
|
4451 |
|
4452 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:304
|
4453 |
msgid "No commas(,) or periods(.) necessary."
|
4454 |
msgstr ""
|
4455 |
|
4456 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:305
|
4457 |
msgid "Remove all extensions to scan all file type (not recommended)."
|
4458 |
msgstr ""
|
4459 |
|
4460 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:309
|
4461 |
msgid "Show Re-Install Links"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:310
|
4465 |
msgid "Show Re-Install Links For Plugins"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:311
|
4469 |
msgid ""
|
4470 |
"Show links to re-install plugins and offer re-install when activating "
|
4471 |
"plugins."
|
4472 |
msgstr ""
|
4473 |
|
4474 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:315
|
4475 |
msgid "Abandoned Plugin Scanner"
|
4476 |
msgstr ""
|
4477 |
|
4478 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:317
|
4479 |
msgid "Scan your WordPress.org assets for whether they've been abandoned."
|
4480 |
msgstr ""
|
4481 |
|
4482 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:322
|
4483 |
msgid "Highlight Abandoned Plugins"
|
4484 |
msgstr ""
|
4485 |
|
4486 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:323
|
4487 |
msgid "Abandoned plugins will be highlighted on the main plugins page."
|
4488 |
msgstr ""
|
4489 |
|
4490 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:327
|
4491 |
msgid "Automatic Malware Scan"
|
4492 |
msgstr ""
|
4493 |
|
4494 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:328
|
4495 |
msgid "Turn On Automatic Malware Scanning"
|
4496 |
msgstr ""
|
4497 |
|
4498 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:329
|
4499 |
msgid ""
|
4500 |
"Automatically run scanner to detect files infected with malware signatures."
|
4501 |
msgstr ""
|
4502 |
|
4503 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:333
|
4504 |
msgid "Auto-Repair WP Core"
|
4505 |
msgstr ""
|
4506 |
|
4507 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:334
|
4508 |
msgid "Automatically Repair WordPress Core Files"
|
4509 |
msgstr ""
|
4510 |
|
4511 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:335
|
4512 |
msgid "Automatically reinstall any core files found to have potential malware."
|
4513 |
msgstr ""
|
4514 |
|
4515 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:339
|
4516 |
msgid "Auto-Repair WP Plugins"
|
4517 |
msgstr ""
|
4518 |
|
4519 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:340
|
4520 |
msgid "Automatically Repair WordPress.org Plugins"
|
4521 |
msgstr ""
|
4522 |
|
4523 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:341
|
4524 |
msgid "Automatically repair any plugin files found to have potential malware."
|
4525 |
msgstr ""
|
4526 |
|
4527 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:342
|
4528 |
msgid "Only compatible with plugins installed from WordPress.org."
|
4529 |
msgstr ""
|
4530 |
|
4531 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:343
|
4532 |
msgid ""
|
4533 |
"Also deletes suspected files if they weren't originally distributed with the "
|
4534 |
"plugin."
|
4535 |
msgstr ""
|
4536 |
|
4537 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:347
|
4538 |
msgid "Surgical Auto-Repair"
|
4539 |
msgstr ""
|
4540 |
|
4541 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:348
|
4542 |
msgid "Automatically Attempt To Surgically Remove Malware Code"
|
4543 |
msgstr ""
|
4544 |
|
4545 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:349
|
4546 |
msgid "Attempts to automatically remove code from infected files."
|
4547 |
msgstr ""
|
4548 |
|
4549 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:350
|
4550 |
msgid ""
|
4551 |
"This could break your site if code removal leaves remaining code in an "
|
4552 |
"inconsistent state."
|
4553 |
msgstr ""
|
4554 |
|
4555 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:351
|
4556 |
msgid ""
|
4557 |
"Only applies to files that don't fall under the other categories for "
|
4558 |
"automatic repair."
|
4559 |
msgstr ""
|
4560 |
|
4561 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:355
|
4562 |
msgid "WP Config"
|
4563 |
msgstr ""
|
4564 |
|
4565 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:356
|
4566 |
msgid "Realtime Protection For WP Config File"
|
4567 |
msgstr ""
|
4568 |
|
4569 |
+
#: src/lib/src/Modules/HackGuard/Strings.php:357
|
4570 |
msgid "Realtime protection for the wp-config.php file."
|
4571 |
msgstr ""
|
4572 |
|
4771 |
msgstr ""
|
4772 |
|
4773 |
#: src/lib/src/Modules/IPs/AdminNotices.php:40
|
4774 |
+
#: src/lib/src/Modules/Plugin/Strings.php:380 src/processors/plugin.php:84
|
|
|
4775 |
#, php-format
|
4776 |
msgid "Your IP address is: %s"
|
4777 |
msgstr ""
|
4841 |
msgstr ""
|
4842 |
|
4843 |
#: src/lib/src/Modules/IPs/Strings.php:28
|
4844 |
+
#: src/lib/src/Modules/Plugin/Strings.php:413 src/wizards/plugin.php:514
|
4845 |
#: src/wizards/plugin.php:519
|
4846 |
msgid "IP Manager"
|
4847 |
msgstr ""
|
5437 |
msgstr ""
|
5438 |
|
5439 |
#: src/lib/src/Modules/License/Strings.php:14
|
|
|
5440 |
msgid "License Summary"
|
5441 |
msgstr ""
|
5442 |
|
5443 |
#: src/lib/src/Modules/License/Strings.php:15
|
|
|
5444 |
msgid "License Activation"
|
5445 |
msgstr ""
|
5446 |
|
6019 |
msgstr ""
|
6020 |
|
6021 |
#: src/lib/src/Modules/LoginGuard/Strings.php:205
|
6022 |
+
#: src/lib/src/Modules/Plugin/Strings.php:407
|
6023 |
+
#: src/processors/user_management.php:204
|
6024 |
msgid "Email"
|
6025 |
msgstr ""
|
6026 |
|
6069 |
msgstr ""
|
6070 |
|
6071 |
#: src/lib/src/Modules/LoginGuard/Strings.php:220
|
6072 |
+
#: src/lib/src/Modules/Plugin/Strings.php:430
|
6073 |
msgid "Light Theme"
|
6074 |
msgstr ""
|
6075 |
|
6476 |
msgid "Note could not be created."
|
6477 |
msgstr ""
|
6478 |
|
6479 |
+
#: src/lib/src/Modules/Plugin/Components/BadgeWidget.php:23
|
6480 |
+
#, php-format
|
6481 |
+
msgid "%s Plugin Badge"
|
6482 |
+
msgstr ""
|
6483 |
+
|
6484 |
+
#: src/lib/src/Modules/Plugin/Components/BadgeWidget.php:25
|
6485 |
+
#, php-format
|
6486 |
+
msgid ""
|
6487 |
+
"You can now help spread the word about the %s plugin anywhere on your site"
|
6488 |
+
msgstr ""
|
6489 |
+
|
6490 |
+
#: src/lib/src/Modules/Plugin/Components/BadgeWidget.php:51
|
6491 |
+
msgid "Site Secured"
|
6492 |
+
msgstr ""
|
6493 |
+
|
6494 |
#: src/lib/src/Modules/Plugin/Strings.php:15
|
6495 |
msgid "Plugin Actions"
|
6496 |
msgstr ""
|
6864 |
msgid "How Google reCAPTCHA Will Be Displayed By Default"
|
6865 |
msgstr ""
|
6866 |
|
6867 |
+
#: src/lib/src/Modules/Plugin/Strings.php:302
|
6868 |
msgid "Install"
|
6869 |
msgstr ""
|
6870 |
|
6871 |
+
#: src/lib/src/Modules/Plugin/Strings.php:303
|
6872 |
msgid "Update"
|
6873 |
msgstr ""
|
6874 |
|
6875 |
+
#: src/lib/src/Modules/Plugin/Strings.php:304
|
6876 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:146
|
6877 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:172
|
6878 |
msgid "Activate"
|
6879 |
msgstr ""
|
6880 |
|
6881 |
+
#: src/lib/src/Modules/Plugin/Strings.php:305
|
6882 |
#: src/lib/src/Tables/Render/AdminNotes.php:20
|
6883 |
#: src/lib/src/Tables/Render/Base.php:203
|
6884 |
#: src/lib/src/Tables/Render/ScanUfc.php:29
|
6885 |
msgid "Delete"
|
6886 |
msgstr ""
|
6887 |
|
6888 |
+
#: src/lib/src/Modules/Plugin/Strings.php:306
|
6889 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:173
|
6890 |
msgid "Edit Theme Options"
|
6891 |
msgstr ""
|
6892 |
|
6893 |
+
#: src/lib/src/Modules/Plugin/Strings.php:307
|
6894 |
msgid "Create/Edit"
|
6895 |
msgstr ""
|
6896 |
|
6897 |
+
#: src/lib/src/Modules/Plugin/Strings.php:308
|
6898 |
msgid "Publish"
|
6899 |
msgstr ""
|
6900 |
|
6901 |
+
#: src/lib/src/Modules/Plugin/Strings.php:309
|
6902 |
msgid "Author Name"
|
6903 |
msgstr ""
|
6904 |
|
6905 |
+
#: src/lib/src/Modules/Plugin/Strings.php:310
|
6906 |
msgid "Author Email"
|
6907 |
msgstr ""
|
6908 |
|
6909 |
+
#: src/lib/src/Modules/Plugin/Strings.php:311
|
6910 |
msgid "Comment Content"
|
6911 |
msgstr ""
|
6912 |
|
6913 |
+
#: src/lib/src/Modules/Plugin/Strings.php:312
|
6914 |
msgid "Browser User Agent"
|
6915 |
msgstr ""
|
6916 |
|
6917 |
+
#: src/lib/src/Modules/Plugin/Strings.php:313
|
6918 |
msgid "Login"
|
6919 |
msgstr ""
|
6920 |
|
6921 |
+
#: src/lib/src/Modules/Plugin/Strings.php:314
|
6922 |
msgid "Register"
|
6923 |
msgstr ""
|
6924 |
|
6925 |
+
#: src/lib/src/Modules/Plugin/Strings.php:315
|
6926 |
msgid "Lost Password"
|
6927 |
msgstr ""
|
6928 |
|
6929 |
+
#: src/lib/src/Modules/Plugin/Strings.php:316
|
6930 |
msgid "Checkout (WooCommerce)"
|
6931 |
msgstr ""
|
6932 |
|
6933 |
+
#: src/lib/src/Modules/Plugin/Strings.php:317
|
6934 |
msgid "Simple Requests"
|
6935 |
msgstr ""
|
6936 |
|
6937 |
+
#: src/lib/src/Modules/Plugin/Strings.php:318
|
6938 |
msgid "Logged-In Users"
|
6939 |
msgstr ""
|
6940 |
|
6941 |
+
#: src/lib/src/Modules/Plugin/Strings.php:319
|
6942 |
msgid "Search Engines"
|
6943 |
msgstr ""
|
6944 |
|
6945 |
+
#: src/lib/src/Modules/Plugin/Strings.php:320
|
6946 |
msgid "Uptime Monitoring Services"
|
6947 |
msgstr ""
|
6948 |
|
6949 |
+
#: src/lib/src/Modules/Plugin/Strings.php:321
|
6950 |
msgid "Enabled With Email Reports"
|
6951 |
msgstr ""
|
6952 |
|
6953 |
+
#: src/lib/src/Modules/Plugin/Strings.php:323
|
6954 |
msgid "Minor Versions Only"
|
6955 |
msgstr ""
|
6956 |
|
6957 |
+
#: src/lib/src/Modules/Plugin/Strings.php:324
|
6958 |
msgid "Major and Minor Versions"
|
6959 |
msgstr ""
|
6960 |
|
6961 |
+
#: src/lib/src/Modules/Plugin/Strings.php:325
|
6962 |
msgid "Let The Plugin Decide"
|
6963 |
msgstr ""
|
6964 |
|
6965 |
+
#: src/lib/src/Modules/Plugin/Strings.php:326
|
6966 |
msgid "As Soon As Possible"
|
6967 |
msgstr ""
|
6968 |
|
6969 |
+
#: src/lib/src/Modules/Plugin/Strings.php:327
|
6970 |
msgid "Move To Pending Moderation"
|
6971 |
msgstr ""
|
6972 |
|
6973 |
+
#: src/lib/src/Modules/Plugin/Strings.php:328
|
6974 |
msgid "Move To SPAM"
|
6975 |
msgstr ""
|
6976 |
|
6977 |
+
#: src/lib/src/Modules/Plugin/Strings.php:329
|
6978 |
msgid "Move To Trash"
|
6979 |
msgstr ""
|
6980 |
|
6981 |
+
#: src/lib/src/Modules/Plugin/Strings.php:330
|
6982 |
msgid "Block And Redirect"
|
6983 |
msgstr ""
|
6984 |
|
6985 |
+
#: src/lib/src/Modules/Plugin/Strings.php:331
|
6986 |
msgid "Invisible"
|
6987 |
msgstr ""
|
6988 |
|
6989 |
+
#: src/lib/src/Modules/Plugin/Strings.php:332
|
6990 |
msgid "Default Style"
|
6991 |
msgstr ""
|
6992 |
|
6993 |
+
#: src/lib/src/Modules/Plugin/Strings.php:333
|
6994 |
msgid "Redirect To Home Page"
|
6995 |
msgstr ""
|
6996 |
|
6997 |
+
#: src/lib/src/Modules/Plugin/Strings.php:334
|
6998 |
msgid "Return 404"
|
6999 |
msgstr ""
|
7000 |
|
7001 |
+
#: src/lib/src/Modules/Plugin/Strings.php:335
|
7002 |
msgid "Die"
|
7003 |
msgstr ""
|
7004 |
|
7005 |
+
#: src/lib/src/Modules/Plugin/Strings.php:336
|
7006 |
msgid "Scan Disabled"
|
7007 |
msgstr ""
|
7008 |
|
7009 |
+
#: src/lib/src/Modules/Plugin/Strings.php:337
|
7010 |
msgid "Scan Enabled"
|
7011 |
msgstr ""
|
7012 |
|
7013 |
+
#: src/lib/src/Modules/Plugin/Strings.php:338
|
7014 |
msgid "Automatic Scan Disabled"
|
7015 |
msgstr ""
|
7016 |
|
7017 |
+
#: src/lib/src/Modules/Plugin/Strings.php:339
|
7018 |
msgid "Automatic Scan Enabled"
|
7019 |
msgstr ""
|
7020 |
|
7021 |
+
#: src/lib/src/Modules/Plugin/Strings.php:340
|
7022 |
msgid "Scan Enabled - Send Email Notification"
|
7023 |
msgstr ""
|
7024 |
|
7025 |
+
#: src/lib/src/Modules/Plugin/Strings.php:341
|
7026 |
msgid "Scan Enabled - No Email Notification"
|
7027 |
msgstr ""
|
7028 |
|
7029 |
+
#: src/lib/src/Modules/Plugin/Strings.php:342
|
7030 |
msgid "Scan Enabled - Automatically Delete Files"
|
7031 |
msgstr ""
|
7032 |
|
7033 |
+
#: src/lib/src/Modules/Plugin/Strings.php:343
|
7034 |
msgid "Scan Enabled - Delete Files and Send Email Notification"
|
7035 |
msgstr ""
|
7036 |
|
7037 |
+
#: src/lib/src/Modules/Plugin/Strings.php:344
|
7038 |
msgid "Off: iFrames Not Blocked"
|
7039 |
msgstr ""
|
7040 |
|
7041 |
+
#: src/lib/src/Modules/Plugin/Strings.php:345
|
7042 |
msgid "On: Allow iFrames On The Same Domain"
|
7043 |
msgstr ""
|
7044 |
|
7045 |
+
#: src/lib/src/Modules/Plugin/Strings.php:346
|
7046 |
msgid "On: Block All iFrames"
|
7047 |
msgstr ""
|
7048 |
|
7049 |
+
#: src/lib/src/Modules/Plugin/Strings.php:347
|
7050 |
msgid "Default: Full Referrer URL (aka 'Unsafe URL')"
|
7051 |
msgstr ""
|
7052 |
|
7053 |
+
#: src/lib/src/Modules/Plugin/Strings.php:348
|
7054 |
msgid "No Referrer"
|
7055 |
msgstr ""
|
7056 |
|
7057 |
+
#: src/lib/src/Modules/Plugin/Strings.php:349
|
7058 |
msgid "No Referrer When Downgrade"
|
7059 |
msgstr ""
|
7060 |
|
7061 |
+
#: src/lib/src/Modules/Plugin/Strings.php:350
|
7062 |
msgid "Same Origin"
|
7063 |
msgstr ""
|
7064 |
|
7065 |
+
#: src/lib/src/Modules/Plugin/Strings.php:351
|
7066 |
msgid "Origin"
|
7067 |
msgstr ""
|
7068 |
|
7069 |
+
#: src/lib/src/Modules/Plugin/Strings.php:352
|
7070 |
msgid "Strict Origin"
|
7071 |
msgstr ""
|
7072 |
|
7073 |
+
#: src/lib/src/Modules/Plugin/Strings.php:353
|
7074 |
msgid "Origin When Cross-Origin"
|
7075 |
msgstr ""
|
7076 |
|
7077 |
+
#: src/lib/src/Modules/Plugin/Strings.php:354
|
7078 |
msgid "Strict Origin When Cross-Origin"
|
7079 |
msgstr ""
|
7080 |
|
7081 |
+
#: src/lib/src/Modules/Plugin/Strings.php:355
|
7082 |
msgid "Empty Header"
|
7083 |
msgstr ""
|
7084 |
|
7085 |
+
#: src/lib/src/Modules/Plugin/Strings.php:356
|
7086 |
msgid "Disabled - Don't Send This Header"
|
7087 |
msgstr ""
|
7088 |
|
7089 |
+
#: src/lib/src/Modules/Plugin/Strings.php:357
|
7090 |
msgid "Minute"
|
7091 |
msgstr ""
|
7092 |
|
7093 |
+
#: src/lib/src/Modules/Plugin/Strings.php:358
|
7094 |
msgid "Hour"
|
7095 |
msgstr ""
|
7096 |
|
7097 |
+
#: src/lib/src/Modules/Plugin/Strings.php:359
|
7098 |
msgid "Day"
|
7099 |
msgstr ""
|
7100 |
|
7101 |
+
#: src/lib/src/Modules/Plugin/Strings.php:360
|
7102 |
msgid "Week"
|
7103 |
msgstr ""
|
7104 |
|
7105 |
+
#: src/lib/src/Modules/Plugin/Strings.php:361
|
7106 |
msgid "Month"
|
7107 |
msgstr ""
|
7108 |
|
7109 |
+
#: src/lib/src/Modules/Plugin/Strings.php:362
|
7110 |
msgid "With Shield Bot Protection"
|
7111 |
msgstr ""
|
7112 |
|
7113 |
+
#: src/lib/src/Modules/Plugin/Strings.php:363
|
7114 |
msgid "Audit Log Only"
|
7115 |
msgstr ""
|
7116 |
|
7117 |
+
#: src/lib/src/Modules/Plugin/Strings.php:364
|
7118 |
msgid "Increment Offense Counter"
|
7119 |
msgstr ""
|
7120 |
|
7121 |
+
#: src/lib/src/Modules/Plugin/Strings.php:365
|
7122 |
msgid "Double-Increment Offense Counter"
|
7123 |
msgstr ""
|
7124 |
|
7125 |
+
#: src/lib/src/Modules/Plugin/Strings.php:366
|
7126 |
msgid "Immediate Block"
|
7127 |
msgstr ""
|
7128 |
|
7129 |
+
#: src/lib/src/Modules/Plugin/Strings.php:375
|
7130 |
msgid "Security Dashboard"
|
7131 |
msgstr ""
|
7132 |
|
7133 |
+
#: src/lib/src/Modules/Plugin/Strings.php:376
|
7134 |
msgid "Automatically Detect Visitor IP"
|
7135 |
msgstr ""
|
7136 |
|
7137 |
+
#: src/lib/src/Modules/Plugin/Strings.php:378
|
7138 |
msgid "IP Address White List"
|
7139 |
msgstr ""
|
7140 |
|
7141 |
+
#: src/lib/src/Modules/Plugin/Strings.php:379
|
7142 |
msgid ""
|
7143 |
"Any IP addresses on this list will by-pass all Plugin Security Checking."
|
7144 |
msgstr ""
|
7145 |
|
7146 |
+
#: src/lib/src/Modules/Plugin/Strings.php:381
|
7147 |
msgid "Choose IP Addresses To Blacklist"
|
7148 |
msgstr ""
|
7149 |
|
7150 |
+
#: src/lib/src/Modules/Plugin/Strings.php:382
|
7151 |
#, php-format
|
7152 |
msgid "Recommendation - %s"
|
7153 |
msgstr ""
|
7154 |
|
7155 |
+
#: src/lib/src/Modules/Plugin/Strings.php:383
|
7156 |
msgid "Blacklist"
|
7157 |
msgstr ""
|
7158 |
|
7159 |
+
#: src/lib/src/Modules/Plugin/Strings.php:384
|
7160 |
msgid "Logging"
|
7161 |
msgstr ""
|
7162 |
|
7163 |
+
#: src/lib/src/Modules/Plugin/Strings.php:385
|
7164 |
#, php-format
|
7165 |
msgid ""
|
7166 |
"User \"%s\" was forcefully logged out as they were not verified by either "
|
7167 |
"cookie or IP address (or both)."
|
7168 |
msgstr ""
|
7169 |
|
7170 |
+
#: src/lib/src/Modules/Plugin/Strings.php:386
|
7171 |
#, php-format
|
7172 |
msgid ""
|
7173 |
"User \"%s\" was found to be un-verified at the given IP Address: \"%s\"."
|
7174 |
msgstr ""
|
7175 |
|
7176 |
+
#: src/lib/src/Modules/Plugin/Strings.php:387
|
7177 |
msgid "Cookie"
|
7178 |
msgstr ""
|
7179 |
|
7180 |
+
#: src/lib/src/Modules/Plugin/Strings.php:389
|
7181 |
#: src/lib/src/Tables/Build/Traffic.php:140
|
7182 |
msgid "IP"
|
7183 |
msgstr ""
|
7184 |
|
7185 |
+
#: src/lib/src/Modules/Plugin/Strings.php:390
|
7186 |
msgid ""
|
7187 |
"This will restrict all user login sessions to a single browser. Use this if "
|
7188 |
"your users have dynamic IP addresses."
|
7189 |
msgstr ""
|
7190 |
|
7191 |
+
#: src/lib/src/Modules/Plugin/Strings.php:391
|
7192 |
msgid ""
|
7193 |
"All users will be required to authenticate their login by email-based two-"
|
7194 |
"factor authentication, when logging in from a new IP address"
|
7195 |
msgstr ""
|
7196 |
|
7197 |
+
#: src/lib/src/Modules/Plugin/Strings.php:392
|
7198 |
msgid "2-Factor Auth"
|
7199 |
msgstr ""
|
7200 |
|
7201 |
+
#: src/lib/src/Modules/Plugin/Strings.php:393
|
7202 |
msgid "Include Logged-In Users"
|
7203 |
msgstr ""
|
7204 |
|
7205 |
+
#: src/lib/src/Modules/Plugin/Strings.php:394
|
7206 |
msgid "You may also enable GASP for logged in users"
|
7207 |
msgstr ""
|
7208 |
|
7209 |
+
#: src/lib/src/Modules/Plugin/Strings.php:395
|
7210 |
msgid ""
|
7211 |
"Since logged-in users would be expected to be vetted already, this is off by "
|
7212 |
"default."
|
7213 |
msgstr ""
|
7214 |
|
7215 |
+
#: src/lib/src/Modules/Plugin/Strings.php:397
|
7216 |
msgid "Protect your security plugin not just your WordPress site"
|
7217 |
msgstr ""
|
7218 |
|
7219 |
+
#: src/lib/src/Modules/Plugin/Strings.php:400
|
7220 |
msgid "Get a view on what happens on your site, when it happens"
|
7221 |
msgstr ""
|
7222 |
|
7223 |
+
#: src/lib/src/Modules/Plugin/Strings.php:401
|
7224 |
msgid "Audit Trail Viewer"
|
7225 |
msgstr ""
|
7226 |
|
7227 |
+
#: src/lib/src/Modules/Plugin/Strings.php:403
|
7228 |
msgid "Take back full control of WordPress automatic updates"
|
7229 |
msgstr ""
|
7230 |
|
7231 |
+
#: src/lib/src/Modules/Plugin/Strings.php:404
|
7232 |
msgid "Comments SPAM"
|
7233 |
msgstr ""
|
7234 |
|
7235 |
+
#: src/lib/src/Modules/Plugin/Strings.php:405
|
7236 |
msgid "Block Bad IPs/Visitors"
|
7237 |
msgstr ""
|
7238 |
|
7239 |
+
#: src/lib/src/Modules/Plugin/Strings.php:406
|
7240 |
msgid "Block comment SPAM and retain your privacy"
|
7241 |
msgstr ""
|
7242 |
|
7243 |
+
#: src/lib/src/Modules/Plugin/Strings.php:409
|
7244 |
msgid "Automatically block malicious URLs and data sent to your site"
|
7245 |
msgstr ""
|
7246 |
|
7247 |
+
#: src/lib/src/Modules/Plugin/Strings.php:412
|
7248 |
msgid "Control HTTP Security Headers"
|
7249 |
msgstr ""
|
7250 |
|
7251 |
+
#: src/lib/src/Modules/Plugin/Strings.php:414
|
7252 |
msgid "Manage Visitor IP Address"
|
7253 |
msgstr ""
|
7254 |
|
7255 |
+
#: src/lib/src/Modules/Plugin/Strings.php:416
|
7256 |
msgid "Harden the more loosely controlled settings of your site"
|
7257 |
msgstr ""
|
7258 |
|
7259 |
+
#: src/lib/src/Modules/Plugin/Strings.php:418
|
7260 |
msgid ""
|
7261 |
"Block brute force attacks and secure user identities with Two-Factor "
|
7262 |
"Authentication"
|
7263 |
msgstr ""
|
7264 |
|
7265 |
+
#: src/lib/src/Modules/Plugin/Strings.php:419
|
7266 |
msgid "Dashboard"
|
7267 |
msgstr ""
|
7268 |
|
7269 |
+
#: src/lib/src/Modules/Plugin/Strings.php:420
|
7270 |
msgid "General Plugin Settings"
|
7271 |
msgstr ""
|
7272 |
|
7273 |
+
#: src/lib/src/Modules/Plugin/Strings.php:421
|
7274 |
msgid "Statistics"
|
7275 |
msgstr ""
|
7276 |
|
7277 |
+
#: src/lib/src/Modules/Plugin/Strings.php:422
|
7278 |
msgid "Summary of the main security actions taken by this plugin"
|
7279 |
msgstr ""
|
7280 |
|
7281 |
+
#: src/lib/src/Modules/Plugin/Strings.php:423
|
7282 |
msgid "Stats Viewer"
|
7283 |
msgstr ""
|
7284 |
|
7285 |
+
#: src/lib/src/Modules/Plugin/Strings.php:424
|
7286 |
msgid "Premium Support"
|
7287 |
msgstr ""
|
7288 |
|
7289 |
+
#: src/lib/src/Modules/Plugin/Strings.php:425
|
7290 |
msgid "Premium Plugin Support Centre"
|
7291 |
msgstr ""
|
7292 |
|
7293 |
+
#: src/lib/src/Modules/Plugin/Strings.php:427
|
7294 |
msgid ""
|
7295 |
"Get true user sessions and control account sharing, session duration and "
|
7296 |
"timeouts"
|
7297 |
msgstr ""
|
7298 |
|
7299 |
+
#: src/lib/src/Modules/Plugin/Strings.php:428
|
7300 |
msgid "Two-Factor Authentication"
|
7301 |
msgstr ""
|
7302 |
|
7303 |
+
#: src/lib/src/Modules/Plugin/Strings.php:431
|
7304 |
msgid "Dark Theme"
|
7305 |
msgstr ""
|
7306 |
|
7307 |
+
#: src/lib/src/Modules/Plugin/Strings.php:432
|
7308 |
msgid "Once"
|
7309 |
msgstr ""
|
7310 |
|
7311 |
+
#: src/lib/src/Modules/Plugin/Strings.php:433
|
7312 |
msgid "Twice"
|
7313 |
msgstr ""
|
7314 |
|
7315 |
+
#: src/lib/src/Modules/Plugin/Strings.php:434
|
7316 |
msgid "Go To Security Dashboard"
|
7317 |
msgstr ""
|
7318 |
|
7358 |
|
7359 |
#: src/lib/src/Modules/SecurityAdmin/AdminNotices.php:73
|
7360 |
#: src/lib/src/Modules/SecurityAdmin/AdminNotices.php:81
|
7361 |
+
#: src/processors/admin_access_restriction.php:494
|
7362 |
msgid "Security Admin Login"
|
7363 |
msgstr ""
|
7364 |
|
7438 |
|
7439 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:62
|
7440 |
#: src/lib/src/Modules/SecurityAdmin/Strings.php:75
|
7441 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:180
|
7442 |
msgid "White Label"
|
7443 |
msgstr ""
|
7444 |
|
7451 |
msgid "The Security Admin system must be active for these settings to apply."
|
7452 |
msgstr ""
|
7453 |
|
7454 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:103
|
7455 |
msgid "Enforce Security Admin Access Restriction"
|
7456 |
msgstr ""
|
7457 |
|
7458 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:104
|
7459 |
msgid ""
|
7460 |
"Enable this with great care and consideration. Ensure that you set a key "
|
7461 |
"that you have set an access key that you will remember."
|
7462 |
msgstr ""
|
7463 |
|
7464 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:108
|
7465 |
msgid "Security Admin Access Key"
|
7466 |
msgstr ""
|
7467 |
|
7468 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:109
|
7469 |
msgid "Provide/Update Security Admin Access Key"
|
7470 |
msgstr ""
|
7471 |
|
7472 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:110
|
7473 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:138
|
7474 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:145
|
7475 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:152
|
7476 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:158
|
7477 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:164
|
7478 |
msgid "Careful"
|
7479 |
msgstr ""
|
7480 |
|
7481 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:110
|
7482 |
msgid ""
|
7483 |
"If you forget this, you could potentially lock yourself out from using this "
|
7484 |
"plugin."
|
7485 |
msgstr ""
|
7486 |
|
7487 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:111
|
7488 |
msgid "Security Key Currently Set"
|
7489 |
msgstr ""
|
7490 |
|
7491 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:111
|
7492 |
msgid "Security Key NOT Currently Set"
|
7493 |
msgstr ""
|
7494 |
|
7495 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:112
|
7496 |
#, php-format
|
7497 |
msgid "To delete the current security key, type exactly \"%s\" and save."
|
7498 |
msgstr ""
|
7499 |
|
7500 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:116
|
7501 |
msgid "Security Admins"
|
7502 |
msgstr ""
|
7503 |
|
7504 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:117
|
7505 |
msgid "Persistent Security Admins"
|
7506 |
msgstr ""
|
7507 |
|
7508 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:118
|
7509 |
msgid ""
|
7510 |
"Users provided will be security admins automatically, without needing the "
|
7511 |
"security key."
|
7512 |
msgstr ""
|
7513 |
|
7514 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:119
|
7515 |
msgid "Enter admin username, email or ID."
|
7516 |
msgstr ""
|
7517 |
|
7518 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:119
|
7519 |
msgid "1 entry per-line."
|
7520 |
msgstr ""
|
7521 |
|
7522 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:120
|
7523 |
msgid "Verified users will be converted to usernames."
|
7524 |
msgstr ""
|
7525 |
|
7526 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:124
|
7527 |
msgid "Security Admin Timeout"
|
7528 |
msgstr ""
|
7529 |
|
7530 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:125
|
7531 |
msgid "Specify An Automatic Timeout Interval For Security Admin Access"
|
7532 |
msgstr ""
|
7533 |
|
7534 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:126
|
7535 |
msgid "This will automatically expire your Security Admin Session."
|
7536 |
msgstr ""
|
7537 |
|
7538 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:136
|
7539 |
msgid "Pages"
|
7540 |
msgstr ""
|
7541 |
|
7542 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:137
|
7543 |
msgid "Restrict Access To Key WordPress Posts And Pages Actions"
|
7544 |
msgstr ""
|
7545 |
|
7546 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:138
|
7547 |
msgid "This will restrict access to page/post creation, editing and deletion."
|
7548 |
msgstr ""
|
7549 |
|
7550 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:139
|
7551 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:146
|
7552 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:169
|
7553 |
#, php-format
|
7554 |
msgid "Selecting \"%s\" will also restrict all other options."
|
7555 |
msgstr ""
|
7556 |
|
7557 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:139
|
7558 |
msgid "Edit"
|
7559 |
msgstr ""
|
7560 |
|
7561 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:144
|
7562 |
msgid "Restrict Access To Key WordPress Plugin Actions"
|
7563 |
msgstr ""
|
7564 |
|
7565 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:145
|
7566 |
msgid ""
|
7567 |
"This will restrict access to plugin installation, update, activation and "
|
7568 |
"deletion."
|
7569 |
msgstr ""
|
7570 |
|
7571 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:150
|
7572 |
msgid "WordPress Options"
|
7573 |
msgstr ""
|
7574 |
|
7575 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:151
|
7576 |
msgid "Restrict Access To Certain WordPress Admin Options"
|
7577 |
msgstr ""
|
7578 |
|
7579 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:152
|
7580 |
msgid ""
|
7581 |
"This will restrict the ability of WordPress administrators from changing key "
|
7582 |
"WordPress settings."
|
7583 |
msgstr ""
|
7584 |
|
7585 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:156
|
7586 |
msgid "Admin Users"
|
7587 |
msgstr ""
|
7588 |
|
7589 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:157
|
7590 |
msgid "Restrict Access To Create/Delete/Modify Other Admin Users"
|
7591 |
msgstr ""
|
7592 |
|
7593 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:158
|
7594 |
msgid ""
|
7595 |
"This will restrict the ability of WordPress administrators from creating, "
|
7596 |
"modifying or promoting other administrators."
|
7597 |
msgstr ""
|
7598 |
|
7599 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:163
|
7600 |
msgid "Restrict Access To WordPress Theme Actions"
|
7601 |
msgstr ""
|
7602 |
|
7603 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:164
|
7604 |
msgid ""
|
7605 |
"This will restrict access to theme installation, update, activation and "
|
7606 |
"deletion."
|
7607 |
msgstr ""
|
7608 |
|
7609 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:171
|
7610 |
#, php-format
|
7611 |
msgid "%s and %s"
|
7612 |
msgstr ""
|
7613 |
|
7614 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:180
|
7615 |
msgid "Enable"
|
7616 |
msgstr ""
|
7617 |
|
7618 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:181
|
7619 |
msgid "Activate Your White Label Settings"
|
7620 |
msgstr ""
|
7621 |
|
7622 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:182
|
7623 |
msgid "Turn on/off the application of your White Label settings."
|
7624 |
msgstr ""
|
7625 |
|
7626 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:185
|
7627 |
msgid "Hide Updates"
|
7628 |
msgstr ""
|
7629 |
|
7630 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:186
|
7631 |
msgid "Hide Plugin Updates From Non-Security Admins"
|
7632 |
msgstr ""
|
7633 |
|
7634 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:187
|
7635 |
#, php-format
|
7636 |
msgid "Hide available %s updates from non-security administrators."
|
7637 |
msgstr ""
|
7638 |
|
7639 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:190
|
7640 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:197
|
7641 |
msgid "Plugin Name"
|
7642 |
msgstr ""
|
7643 |
|
7644 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:191
|
7645 |
msgid "The Name Of The Plugin"
|
7646 |
msgstr ""
|
7647 |
|
7648 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:192
|
7649 |
msgid "The name of the plugin that will be displayed to your site users."
|
7650 |
msgstr ""
|
7651 |
|
7652 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:195
|
7653 |
msgid "Menu Title"
|
7654 |
msgstr ""
|
7655 |
|
7656 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:196
|
7657 |
msgid "The Main Menu Title Of The Plugin"
|
7658 |
msgstr ""
|
7659 |
|
7660 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:197
|
7661 |
#, php-format
|
7662 |
msgid ""
|
7663 |
"The Main Menu Title Of The Plugin. If left empty, the \"%s\" will be used."
|
7664 |
msgstr ""
|
7665 |
|
7666 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:200
|
7667 |
msgid "Company Name"
|
7668 |
msgstr ""
|
7669 |
|
7670 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:201
|
7671 |
msgid "The Name Of Your Company"
|
7672 |
msgstr ""
|
7673 |
|
7674 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:202
|
7675 |
msgid "Provide the name of your company."
|
7676 |
msgstr ""
|
7677 |
|
7678 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:206
|
7679 |
msgid "The Description Of The Plugin"
|
7680 |
msgstr ""
|
7681 |
|
7682 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:207
|
7683 |
msgid "The description of the plugin displayed on the plugins page."
|
7684 |
msgstr ""
|
7685 |
|
7686 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:210
|
7687 |
msgid "Home URL"
|
7688 |
msgstr ""
|
7689 |
|
7690 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:211
|
7691 |
msgid "Plugin Home Page URL"
|
7692 |
msgstr ""
|
7693 |
|
7694 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:212
|
7695 |
msgid ""
|
7696 |
"When a user clicks the home link for this plugin, this is where they'll be "
|
7697 |
"directed."
|
7698 |
msgstr ""
|
7699 |
|
7700 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:215
|
7701 |
msgid "Menu Icon"
|
7702 |
msgstr ""
|
7703 |
|
7704 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:216
|
7705 |
msgid "Menu Icon URL"
|
7706 |
msgstr ""
|
7707 |
|
7708 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:217
|
7709 |
msgid "The URL of the icon to display in the menu."
|
7710 |
msgstr ""
|
7711 |
|
7712 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:218
|
7713 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:224
|
7714 |
#, php-format
|
7715 |
msgid "The %s should measure %s."
|
7716 |
msgstr ""
|
7717 |
|
7718 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:218
|
7719 |
msgid "icon"
|
7720 |
msgstr ""
|
7721 |
|
7722 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:221
|
7723 |
msgid "Dashboard Logo"
|
7724 |
msgstr ""
|
7725 |
|
7726 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:222
|
7727 |
msgid "Dashboard Logo URL"
|
7728 |
msgstr ""
|
7729 |
|
7730 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:223
|
7731 |
msgid "The URL of the logo to display in the admin pages."
|
7732 |
msgstr ""
|
7733 |
|
7734 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:224
|
7735 |
msgid "logo"
|
7736 |
msgstr ""
|
7737 |
|
7738 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:227
|
7739 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:228
|
7740 |
msgid "2FA Login Logo URL"
|
7741 |
msgstr ""
|
7742 |
|
7743 |
+
#: src/lib/src/Modules/SecurityAdmin/Strings.php:229
|
7744 |
msgid ""
|
7745 |
"The URL of the logo to display on the Two-Factor Authentication login page."
|
7746 |
msgstr ""
|
8097 |
msgid "No email address - No Notification."
|
8098 |
msgstr ""
|
8099 |
|
8100 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:123
|
8101 |
+
msgid "Pro customers may provide multiple email address, separated by commas."
|
8102 |
msgstr ""
|
8103 |
|
8104 |
#: src/lib/src/Modules/UserManagement/Strings.php:127
|
8105 |
+
msgid "User Login Notification Email"
|
8106 |
msgstr ""
|
8107 |
|
8108 |
#: src/lib/src/Modules/UserManagement/Strings.php:128
|
8109 |
+
msgid "Send Email Notification To Each User Upon Successful Login"
|
8110 |
+
msgstr ""
|
8111 |
+
|
8112 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:129
|
8113 |
msgid ""
|
8114 |
"A notification is sent to each user when a successful login occurs for their "
|
8115 |
"account."
|
8116 |
msgstr ""
|
8117 |
|
8118 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:133
|
8119 |
msgid "Session Timeout"
|
8120 |
msgstr ""
|
8121 |
|
8122 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:134
|
8123 |
msgid "Specify How Many Days After Login To Automatically Force Re-Login"
|
8124 |
msgstr ""
|
8125 |
|
8126 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:135
|
8127 |
msgid ""
|
8128 |
"WordPress default is 2 days, or 14 days if you check the \"Remember Me\" box."
|
8129 |
msgstr ""
|
8130 |
|
8131 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:136
|
8132 |
msgid "Think of this as an absolute maximum possible session length."
|
8133 |
msgstr ""
|
8134 |
|
8135 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:137
|
8136 |
#, php-format
|
8137 |
msgid "This cannot be less than %s."
|
8138 |
msgstr ""
|
8139 |
|
8140 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:142
|
8141 |
msgid "Idle Timeout"
|
8142 |
msgstr ""
|
8143 |
|
8144 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:143
|
8145 |
msgid "Specify How Many Hours After Inactivity To Automatically Logout User"
|
8146 |
msgstr ""
|
8147 |
|
8148 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:144
|
8149 |
msgid ""
|
8150 |
"If the user is inactive for the number of hours specified, they will be "
|
8151 |
"forcefully logged out next time they return."
|
8152 |
msgstr ""
|
8153 |
|
8154 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:145
|
8155 |
#, php-format
|
8156 |
msgid "Set to %s to turn off this option."
|
8157 |
msgstr ""
|
8158 |
|
8159 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:149
|
8160 |
msgid "Lock To Location"
|
8161 |
msgstr ""
|
8162 |
|
8163 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:150
|
8164 |
msgid "Locks A User Session To IP address"
|
8165 |
msgstr ""
|
8166 |
|
8167 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:151
|
8168 |
msgid ""
|
8169 |
"When selected, a session is restricted to the same IP address as when the "
|
8170 |
"user logged in."
|
8171 |
msgstr ""
|
8172 |
|
8173 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:152
|
8174 |
msgid ""
|
8175 |
"If a logged-in user's IP address changes, the session will be invalidated "
|
8176 |
"and they'll be forced to re-login to WordPress."
|
8177 |
msgstr ""
|
8178 |
|
8179 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:156
|
8180 |
msgid "Max Simultaneous Sessions"
|
8181 |
msgstr ""
|
8182 |
|
8183 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:157
|
8184 |
msgid "Limit Simultaneous Sessions For The Same Username"
|
8185 |
msgstr ""
|
8186 |
|
8187 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:158
|
8188 |
msgid ""
|
8189 |
"The number provided here is the maximum number of simultaneous, distinct, "
|
8190 |
"sessions allowed for any given username."
|
8191 |
msgstr ""
|
8192 |
|
8193 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:159
|
8194 |
msgid "Zero (0) will allow unlimited simultaneous sessions."
|
8195 |
msgstr ""
|
8196 |
|
8197 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:163
|
8198 |
msgid "Enable Password Policies"
|
8199 |
msgstr ""
|
8200 |
|
8201 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:164
|
8202 |
msgid "Enable The Password Policies Detailed Below"
|
8203 |
msgstr ""
|
8204 |
|
8205 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:165
|
8206 |
msgid "Turn on/off all password policy settings."
|
8207 |
msgstr ""
|
8208 |
|
8209 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:169
|
8210 |
msgid "Prevent Pwned Passwords"
|
8211 |
msgstr ""
|
8212 |
|
8213 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:170
|
8214 |
msgid "Prevent Use Of \"Pwned\" Passwords"
|
8215 |
msgstr ""
|
8216 |
|
8217 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:171
|
8218 |
msgid ""
|
8219 |
"Prevents users from using any passwords found on the public available list "
|
8220 |
"of \"pwned\" passwords."
|
8221 |
msgstr ""
|
8222 |
|
8223 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:175
|
8224 |
msgid "Minimum Length"
|
8225 |
msgstr ""
|
8226 |
|
8227 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:176
|
8228 |
msgid "Minimum Password Length"
|
8229 |
msgstr ""
|
8230 |
|
8231 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:177
|
8232 |
msgid ""
|
8233 |
"All passwords that a user sets must be at least this many characters in "
|
8234 |
"length."
|
8235 |
msgstr ""
|
8236 |
|
8237 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:178
|
8238 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:198
|
8239 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:223
|
8240 |
msgid "Set to Zero(0) to disable."
|
8241 |
msgstr ""
|
8242 |
|
8243 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:182
|
8244 |
msgid "Minimum Strength"
|
8245 |
msgstr ""
|
8246 |
|
8247 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:183
|
8248 |
msgid "Minimum Password Strength"
|
8249 |
msgstr ""
|
8250 |
|
8251 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:184
|
8252 |
msgid "All passwords that a user sets must meet this minimum strength."
|
8253 |
msgstr ""
|
8254 |
|
8255 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:188
|
8256 |
msgid "Apply To Existing Users"
|
8257 |
msgstr ""
|
8258 |
|
8259 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:189
|
8260 |
msgid "Apply Password Policies To Existing Users and Their Passwords"
|
8261 |
msgstr ""
|
8262 |
|
8263 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:190
|
8264 |
msgid ""
|
8265 |
"Forces existing users to update their passwords if they don't meet "
|
8266 |
"requirements, after they next login."
|
8267 |
msgstr ""
|
8268 |
|
8269 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:191
|
8270 |
msgid "Note: You may want to warn users prior to enabling this option."
|
8271 |
msgstr ""
|
8272 |
|
8273 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:195
|
8274 |
msgid "Password Expiration"
|
8275 |
msgstr ""
|
8276 |
|
8277 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:196
|
8278 |
msgid "Passwords Expire After This Many Days"
|
8279 |
msgstr ""
|
8280 |
|
8281 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:197
|
8282 |
msgid ""
|
8283 |
"Users will be forced to reset their passwords after the number of days "
|
8284 |
"specified."
|
8285 |
msgstr ""
|
8286 |
|
8287 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:202
|
8288 |
msgid "Allow Manual User Suspension"
|
8289 |
msgstr ""
|
8290 |
|
8291 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:203
|
8292 |
msgid "Manually Suspend User Accounts To Prevent Login"
|
8293 |
msgstr ""
|
8294 |
|
8295 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:204
|
8296 |
msgid "Users may be suspended by administrators to prevent future login."
|
8297 |
msgstr ""
|
8298 |
|
8299 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:208
|
8300 |
msgid "Auto-Suspend Expired Passwords"
|
8301 |
msgstr ""
|
8302 |
|
8303 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:209
|
8304 |
msgid "Automatically Suspend Users With Expired Passwords"
|
8305 |
msgstr ""
|
8306 |
|
8307 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:210
|
8308 |
msgid ""
|
8309 |
"Automatically suspends login by users and requires password reset to "
|
8310 |
"unsuspend."
|
8311 |
msgstr ""
|
8312 |
|
8313 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:214
|
8314 |
msgid "Requires password expiration policy to be set."
|
8315 |
msgstr ""
|
8316 |
|
8317 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:219
|
8318 |
msgid "Auto-Suspend Idle Users"
|
8319 |
msgstr ""
|
8320 |
|
8321 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:220
|
8322 |
msgid "Automatically Suspend Idle User Accounts"
|
8323 |
msgstr ""
|
8324 |
|
8325 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:221
|
8326 |
msgid ""
|
8327 |
"Automatically suspends login for idle accounts and requires password reset "
|
8328 |
"to unsuspend."
|
8329 |
msgstr ""
|
8330 |
|
8331 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:222
|
8332 |
msgid "Specify the number of days since last login to consider a user as idle."
|
8333 |
msgstr ""
|
8334 |
|
8335 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:227
|
8336 |
msgid "Auto-Suspend Idle User Roles"
|
8337 |
msgstr ""
|
8338 |
|
8339 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:228
|
8340 |
msgid "Apply Automatic Suspension To Accounts With These Roles"
|
8341 |
msgstr ""
|
8342 |
|
8343 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:229
|
8344 |
msgid ""
|
8345 |
"Automatic suspension for idle accounts applies only to the roles you specify."
|
8346 |
msgstr ""
|
8347 |
|
8348 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:253
|
8349 |
msgid "Forcing user to update expired password."
|
8350 |
msgstr ""
|
8351 |
|
8352 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:256
|
8353 |
msgid "Forcing user to update password that fails to meet policies."
|
8354 |
msgstr ""
|
8355 |
|
8356 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:259
|
8357 |
msgid "Blocked attempted password update that failed policy requirements."
|
8358 |
msgstr ""
|
8359 |
|
8360 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:262
|
8361 |
msgid "Valid user session could not be found."
|
8362 |
msgstr ""
|
8363 |
|
8364 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:263
|
8365 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:267
|
8366 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:271
|
8367 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:275
|
8368 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:279
|
8369 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:283
|
8370 |
msgid "Logging out."
|
8371 |
msgstr ""
|
8372 |
|
8373 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:266
|
8374 |
msgid "User session has expired."
|
8375 |
msgstr ""
|
8376 |
|
8377 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:270
|
8378 |
msgid "User session has expired due to inactivity."
|
8379 |
msgstr ""
|
8380 |
|
8381 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:274
|
8382 |
msgid "Access to an established user session from a different IP address."
|
8383 |
msgstr ""
|
8384 |
|
8385 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:278
|
8386 |
msgid "Browser signature has changed for this user session."
|
8387 |
msgstr ""
|
8388 |
|
8389 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:282
|
8390 |
msgid ""
|
8391 |
"Unable to verify the current User Session. Forcefully logging out session."
|
8392 |
msgstr ""
|
8393 |
|
8394 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:286
|
8395 |
#, php-format
|
8396 |
msgid "User ID %s suspended by admin (%s)"
|
8397 |
msgstr ""
|
8398 |
|
8399 |
+
#: src/lib/src/Modules/UserManagement/Strings.php:289
|
8400 |
#, php-format
|
8401 |
msgid "User ID %s unsuspended by admin (%s)"
|
8402 |
msgstr ""
|
8432 |
msgid "%s not installed from WordPress.org."
|
8433 |
msgstr ""
|
8434 |
|
8435 |
+
#: src/lib/src/Scans/Mal/Repair.php:78 src/processors/hack_protect.php:283
|
8436 |
+
#: src/processors/hackprotect_scan_apc.php:84
|
8437 |
+
#: src/processors/hackprotect_scan_wpv.php:241
|
8438 |
msgid "Plugin"
|
8439 |
msgstr ""
|
8440 |
|
8451 |
msgstr ""
|
8452 |
|
8453 |
#: src/lib/src/Tables/Build/BaseBuild.php:56
|
8454 |
+
#: src/processors/hack_protect.php:133
|
8455 |
msgid "No entries to display."
|
8456 |
msgstr ""
|
8457 |
|
8458 |
+
#: src/lib/src/Tables/Build/ScanApc.php:35
|
8459 |
msgid "Abandoned"
|
8460 |
msgstr ""
|
8461 |
|
8462 |
+
#: src/lib/src/Tables/Build/ScanMal.php:32
|
8463 |
+
#: src/processors/hackprotect_scan_mal.php:94
|
8464 |
msgid "Potential Malware Detected"
|
8465 |
msgstr ""
|
8466 |
|
8467 |
+
#: src/lib/src/Tables/Build/ScanMal.php:39
|
8468 |
msgid "Repair Unavailable"
|
8469 |
msgstr ""
|
8470 |
|
8471 |
+
#: src/lib/src/Tables/Build/ScanPtg.php:31
|
8472 |
+
#: src/lib/src/Tables/Build/ScanWcf.php:30
|
8473 |
msgid "Modified"
|
8474 |
msgstr ""
|
8475 |
|
8476 |
+
#: src/lib/src/Tables/Build/ScanPtg.php:32
|
8477 |
+
#: src/lib/src/Tables/Build/ScanWcf.php:31
|
8478 |
msgid "Missing"
|
8479 |
msgstr ""
|
8480 |
|
8481 |
+
#: src/lib/src/Tables/Build/ScanPtg.php:32
|
8482 |
+
#: src/lib/src/Tables/Build/ScanUfc.php:31
|
8483 |
msgid "Unrecognised"
|
8484 |
msgstr ""
|
8485 |
|
8561 |
msgstr ""
|
8562 |
|
8563 |
#: src/lib/src/Tables/Render/ScanApc.php:35
|
8564 |
+
#: src/processors/hackprotect_scan_apc.php:91
|
8565 |
+
#: src/processors/hackprotect_scan_wpv.php:249
|
8566 |
msgid "Item"
|
8567 |
msgstr ""
|
8568 |
|
8595 |
msgstr ""
|
8596 |
|
8597 |
#: src/lib/src/Tables/Render/ScanWpv.php:55
|
8598 |
+
#: src/processors/hackprotect_scan_mal.php:138
|
8599 |
+
#: src/processors/hackprotect_scan_wcf.php:112
|
8600 |
+
#: src/processors/hackprotect_scan_wpv.php:201
|
8601 |
#: src/processors/loginprotect_intent.php:285
|
8602 |
msgid "More Info"
|
8603 |
msgstr ""
|
8636 |
msgid "Maybe refresh the page and try again."
|
8637 |
msgstr ""
|
8638 |
|
8639 |
+
#: src/processors/admin_access_restriction.php:196
|
8640 |
msgid ""
|
8641 |
"Sorry, deleting administrators is currently restricted to your Security Admin"
|
8642 |
msgstr ""
|
8643 |
|
8644 |
+
#: src/processors/admin_access_restriction.php:469
|
8645 |
+
#: src/processors/hackprotect_scan_ptg.php:167 src/processors/plugin.php:171
|
8646 |
msgid "Editing this option is currently restricted."
|
8647 |
msgstr ""
|
8648 |
|
8649 |
+
#: src/processors/admin_access_restriction.php:489
|
8650 |
msgid "Unlock"
|
8651 |
msgstr ""
|
8652 |
|
8653 |
+
#: src/processors/autoupdates.php:468
|
8654 |
#, php-format
|
8655 |
msgid ""
|
8656 |
"This is a quick notification from the %s that WordPress Automatic Updates "
|
8657 |
"just completed on your site with the following results."
|
8658 |
msgstr ""
|
8659 |
|
8660 |
+
#: src/processors/autoupdates.php:480
|
8661 |
msgid "Plugins Updated:"
|
8662 |
msgstr ""
|
8663 |
|
8664 |
+
#: src/processors/autoupdates.php:488
|
8665 |
#, php-format
|
8666 |
msgid "Plugin \"%s\" auto-updated from \"%s\" to version \"%s\""
|
8667 |
msgstr ""
|
8668 |
|
8669 |
+
#: src/processors/autoupdates.php:505
|
8670 |
msgid "Themes Updated:"
|
8671 |
msgstr ""
|
8672 |
|
8673 |
+
#: src/processors/autoupdates.php:513
|
8674 |
#, php-format
|
8675 |
msgid "Theme \"%s\" auto-updated from \"%s\" to version \"%s\""
|
8676 |
msgstr ""
|
8677 |
|
8678 |
+
#: src/processors/autoupdates.php:528
|
8679 |
msgid "WordPress Core Updated:"
|
8680 |
msgstr ""
|
8681 |
|
8682 |
+
#: src/processors/autoupdates.php:547
|
8683 |
msgid "Thank you."
|
8684 |
msgstr ""
|
8685 |
|
8686 |
+
#: src/processors/autoupdates.php:549
|
8687 |
#: src/processors/loginprotect_intentprovider_backup.php:170
|
8688 |
#, php-format
|
8689 |
msgid "Notice: %s"
|
8690 |
msgstr ""
|
8691 |
|
8692 |
+
#: src/processors/autoupdates.php:549
|
8693 |
msgid "Automatic Updates Completed"
|
8694 |
msgstr ""
|
8695 |
|
8696 |
+
#: src/processors/autoupdates.php:571
|
8697 |
msgid ""
|
8698 |
"Automatic updates for this plugin is controlled by another plugin or setting."
|
8699 |
msgstr ""
|
8700 |
|
8701 |
+
#: src/processors/email.php:53
|
8702 |
msgid "Hi !"
|
8703 |
msgstr ""
|
8704 |
|
8705 |
+
#: src/processors/email.php:65
|
8706 |
#, php-format
|
8707 |
msgid "Email sent from the %s Plugin v%s, on %s."
|
8708 |
msgstr ""
|
8709 |
|
8710 |
+
#: src/processors/email.php:70
|
8711 |
msgid "Note: Email delays are caused by website hosting and email providers."
|
8712 |
msgstr ""
|
8713 |
|
8714 |
+
#: src/processors/email.php:71
|
8715 |
#, php-format
|
8716 |
msgid "Time Sent: %s"
|
8717 |
msgstr ""
|
8729 |
msgid "%s Statistics"
|
8730 |
msgstr ""
|
8731 |
|
8732 |
+
#: src/processors/firewall.php:200
|
8733 |
msgid "Something in the URL, Form or Cookie data wasn't appropriate."
|
8734 |
msgstr ""
|
8735 |
|
8736 |
+
#: src/processors/firewall.php:400
|
8737 |
#, php-format
|
8738 |
msgid "%s has blocked a page visit to your site."
|
8739 |
msgstr ""
|
8740 |
|
8741 |
+
#: src/processors/firewall.php:402
|
8742 |
msgid "Log details for this visitor are below:"
|
8743 |
msgstr ""
|
8744 |
|
8745 |
+
#: src/processors/firewall.php:413
|
8746 |
#, php-format
|
8747 |
msgid "You can look up the offending IP Address here: %s"
|
8748 |
msgstr ""
|
8749 |
|
8750 |
+
#: src/processors/firewall.php:418
|
8751 |
msgid "Firewall Block Alert"
|
8752 |
msgstr ""
|
8753 |
|
8754 |
+
#: src/processors/firewall.php:454
|
8755 |
msgid "Unknown Rules"
|
8756 |
msgstr ""
|
8757 |
|
8758 |
+
#: src/processors/hack_protect.php:84
|
|
|
|
|
|
|
|
|
|
|
8759 |
#, php-format
|
8760 |
msgid "Last Scan: %s"
|
8761 |
msgstr ""
|
8762 |
|
8763 |
+
#: src/processors/hack_protect.php:118
|
8764 |
msgid "Sorry, this scan is not available."
|
8765 |
msgstr ""
|
8766 |
|
8767 |
+
#: src/processors/hack_protect.php:119
|
8768 |
msgid "This scan is not currently enabled."
|
8769 |
msgstr ""
|
8770 |
|
8771 |
+
#: src/processors/hack_protect.php:120
|
8772 |
msgid "Please turn on this scan in the options."
|
8773 |
msgstr ""
|
8774 |
|
8775 |
+
#: src/processors/hack_protect.php:121
|
8776 |
msgid "Click a scan to see its results"
|
8777 |
msgstr ""
|
8778 |
|
8779 |
+
#: src/processors/hack_protect.php:122 src/processors/hack_protect.php:123
|
8780 |
msgid "Scan Your Site Now"
|
8781 |
msgstr ""
|
8782 |
|
8783 |
+
#: src/processors/hack_protect.php:124
|
8784 |
msgid "Run the selected scans on your site now to get the latest results"
|
8785 |
msgstr ""
|
8786 |
|
8787 |
+
#: src/processors/hack_protect.php:125
|
8788 |
msgid "The more scans that are selected, the longer the scan may take."
|
8789 |
msgstr ""
|
8790 |
|
8791 |
+
#: src/processors/hack_protect.php:127
|
8792 |
msgid "Select Scans To Run"
|
8793 |
msgstr ""
|
8794 |
|
8795 |
+
#: src/processors/hack_protect.php:128
|
8796 |
msgid "Clear Ignore Flags"
|
8797 |
msgstr ""
|
8798 |
|
8799 |
+
#: src/processors/hack_protect.php:129
|
8800 |
msgid ""
|
8801 |
"Previously ignored results will be revealed (for the selected scans only)"
|
8802 |
msgstr ""
|
8803 |
|
8804 |
+
#: src/processors/hack_protect.php:130
|
8805 |
msgid "Remove Notification Suppression"
|
8806 |
msgstr ""
|
8807 |
|
8808 |
+
#: src/processors/hack_protect.php:131
|
8809 |
msgid "Allow notification emails to be resent (for the selected scans only)"
|
8810 |
msgstr ""
|
8811 |
|
8812 |
+
#: src/processors/hack_protect.php:132
|
8813 |
msgid "Run Scans Now"
|
8814 |
msgstr ""
|
8815 |
|
8816 |
+
#: src/processors/hack_protect.php:134
|
8817 |
msgid "Scan Progress"
|
8818 |
msgstr ""
|
8819 |
|
8820 |
+
#: src/processors/hack_protect.php:147
|
8821 |
msgid "Discover plugins that may have been abandoned by their authors"
|
8822 |
msgstr ""
|
8823 |
|
8824 |
+
#: src/processors/hack_protect.php:157
|
8825 |
msgid ""
|
8826 |
"Detect changes to core WordPress files when compared to the official "
|
8827 |
"distribution"
|
8828 |
msgstr ""
|
8829 |
|
8830 |
+
#: src/processors/hack_protect.php:167
|
8831 |
msgid ""
|
8832 |
"Detect files which aren't part of the official WordPress.org distribution"
|
8833 |
msgstr ""
|
8834 |
|
8835 |
+
#: src/processors/hack_protect.php:177
|
8836 |
msgid "Detect files that may be infected with malware"
|
8837 |
msgstr ""
|
8838 |
|
8839 |
+
#: src/processors/hack_protect.php:187
|
8840 |
msgid "Be alerted to plugins and themes with known security vulnerabilities"
|
8841 |
msgstr ""
|
8842 |
|
8843 |
+
#: src/processors/hack_protect.php:251 src/processors/hack_protect.php:259
|
8844 |
+
#: src/processors/hack_protect.php:260 src/processors/hack_protect.php:279
|
8845 |
+
#: src/processors/hack_protect.php:280 src/processors/hack_protect.php:300
|
8846 |
+
#: src/processors/hack_protect.php:308 src/processors/hack_protect.php:309
|
8847 |
+
#: src/processors/hack_protect.php:310
|
8848 |
msgid "unknown"
|
8849 |
msgstr ""
|
8850 |
|
8851 |
+
#: src/processors/hack_protect.php:325
|
8852 |
+
#: src/processors/hackprotect_scan_apc.php:87
|
8853 |
+
#: src/processors/hackprotect_scan_wpv.php:244
|
8854 |
msgid "Theme"
|
8855 |
msgstr ""
|
8856 |
|
8857 |
+
#: src/processors/hack_protect.php:340
|
8858 |
msgid "Detects unauthorized changes to plugins/themes"
|
8859 |
msgstr ""
|
8860 |
|
8861 |
+
#: src/processors/hack_protect.php:341
|
8862 |
msgid "Files with problems"
|
8863 |
msgstr ""
|
8864 |
|
8865 |
+
#: src/processors/hack_protect.php:342
|
8866 |
msgid "Root directory"
|
8867 |
msgstr ""
|
8868 |
|
8869 |
+
#: src/processors/hack_protect.php:343
|
8870 |
msgid "Snapshot taken"
|
8871 |
msgstr ""
|
8872 |
|
8873 |
+
#: src/processors/hack_protect.php:344
|
8874 |
+
#: src/processors/hackprotect_scan_ptg.php:111
|
8875 |
msgid "Re-Install"
|
8876 |
msgstr ""
|
8877 |
|
8878 |
+
#: src/processors/hack_protect.php:345
|
8879 |
msgid "Deactivate and Ignore"
|
8880 |
msgstr ""
|
8881 |
|
8882 |
+
#: src/processors/hack_protect.php:346
|
8883 |
msgid "Accept"
|
8884 |
msgstr ""
|
8885 |
|
8886 |
+
#: src/processors/hack_protect.php:347
|
8887 |
msgid "Upgrade"
|
8888 |
msgstr ""
|
8889 |
|
8890 |
+
#: src/processors/hackprotect_scan_apc.php:73
|
8891 |
#, php-format
|
8892 |
msgid "%s has detected abandoned plugins installed on your site."
|
8893 |
msgstr ""
|
8894 |
|
8895 |
+
#: src/processors/hackprotect_scan_apc.php:74
|
8896 |
msgid ""
|
8897 |
"Running code that hasn't seen any updates for over 2 years is far from ideal."
|
8898 |
msgstr ""
|
8899 |
|
8900 |
+
#: src/processors/hackprotect_scan_apc.php:75
|
8901 |
+
#: src/processors/hackprotect_scan_wpv.php:232
|
8902 |
msgid "Details for the items(s) are below:"
|
8903 |
msgstr ""
|
8904 |
|
8905 |
+
#: src/processors/hackprotect_scan_apc.php:92
|
8906 |
#, php-format
|
8907 |
msgid "Last Updated: %s"
|
8908 |
msgstr ""
|
8909 |
|
8910 |
+
#: src/processors/hackprotect_scan_apc.php:100
|
8911 |
msgid "Abandoned Plugin(s) Discovered On Your Site."
|
8912 |
msgstr ""
|
8913 |
|
8914 |
+
#: src/processors/hackprotect_scan_base.php:377
|
8915 |
msgid "Run Scanner"
|
8916 |
msgstr ""
|
8917 |
|
8918 |
+
#: src/processors/hackprotect_scan_mal.php:120
|
8919 |
#, php-format
|
8920 |
msgid "The %s Malware Scanner found files with potential malware."
|
8921 |
msgstr ""
|
8922 |
|
8923 |
+
#: src/processors/hackprotect_scan_mal.php:122
|
8924 |
msgid ""
|
8925 |
"You must examine the file(s) carefully to determine whether suspicious code "
|
8926 |
"is really present."
|
8927 |
msgstr ""
|
8928 |
|
8929 |
+
#: src/processors/hackprotect_scan_mal.php:123
|
8930 |
#, php-format
|
8931 |
msgid ""
|
8932 |
"The %s Malware Scanner searches for common malware patterns and so false "
|
8933 |
"positives (detection errors) are to be expected sometimes."
|
8934 |
msgstr ""
|
8935 |
|
8936 |
+
#: src/processors/hackprotect_scan_mal.php:124
|
8937 |
+
#: src/processors/hackprotect_scan_ptg.php:592
|
8938 |
+
#: src/processors/hackprotect_scan_ufc.php:115
|
8939 |
+
#: src/processors/hackprotect_scan_wcf.php:98
|
8940 |
+
#: src/processors/user_management.php:202
|
8941 |
+
#: src/processors/user_management.php:234
|
8942 |
msgid "Site URL"
|
8943 |
msgstr ""
|
8944 |
|
8945 |
+
#: src/processors/hackprotect_scan_mal.php:132
|
8946 |
+
#: src/processors/hackprotect_scan_wcf.php:106
|
8947 |
#, php-format
|
8948 |
msgid "%s has already attempted to repair the files."
|
8949 |
msgstr ""
|
8950 |
|
8951 |
+
#: src/processors/hackprotect_scan_mal.php:133
|
8952 |
+
#: src/processors/hackprotect_scan_wcf.php:107
|
8953 |
msgid ""
|
8954 |
"But, you should always check these files to ensure everything is as you "
|
8955 |
"expect."
|
8956 |
msgstr ""
|
8957 |
|
8958 |
+
#: src/processors/hackprotect_scan_mal.php:136
|
8959 |
+
#: src/processors/hackprotect_scan_wcf.php:110
|
8960 |
msgid ""
|
8961 |
"You should review these files and replace them with official versions if "
|
8962 |
"required."
|
8963 |
msgstr ""
|
8964 |
|
8965 |
+
#: src/processors/hackprotect_scan_mal.php:137
|
8966 |
+
#: src/processors/hackprotect_scan_wcf.php:111
|
8967 |
msgid ""
|
8968 |
"Alternatively you can have the plugin attempt to repair/replace these files "
|
8969 |
"automatically."
|
8970 |
msgstr ""
|
8971 |
|
8972 |
+
#: src/processors/hackprotect_scan_mal.php:143
|
8973 |
+
#: src/processors/hackprotect_scan_ufc.php:131
|
8974 |
+
#: src/processors/hackprotect_scan_wcf.php:117
|
8975 |
msgid "We recommend you run the scanner to review your site"
|
8976 |
msgstr ""
|
8977 |
|
8978 |
+
#: src/processors/hackprotect_scan_mal.php:148
|
8979 |
+
#: src/processors/hackprotect_scan_ufc.php:136
|
8980 |
+
#: src/processors/hackprotect_scan_wcf.php:122
|
8981 |
msgid "More Info On This Scanner"
|
8982 |
msgstr ""
|
8983 |
|
8984 |
+
#: src/processors/hackprotect_scan_mal.php:160
|
8985 |
msgid "The following files contain suspected malware:"
|
8986 |
msgstr ""
|
8987 |
|
8988 |
+
#: src/processors/hackprotect_scan_ptg.php:158
|
8989 |
msgid "Really Re-Install Plugin"
|
8990 |
msgstr ""
|
8991 |
|
8992 |
+
#: src/processors/hackprotect_scan_ptg.php:159
|
8993 |
msgid ""
|
8994 |
"WordPress will now download and install the latest available version of this "
|
8995 |
"plugin."
|
8996 |
msgstr ""
|
8997 |
|
8998 |
+
#: src/processors/hackprotect_scan_ptg.php:162
|
8999 |
msgid ""
|
9000 |
"In case of possible failure, it may be better to do this while the plugin is "
|
9001 |
"inactive."
|
9002 |
msgstr ""
|
9003 |
|
9004 |
+
#: src/processors/hackprotect_scan_ptg.php:164
|
9005 |
msgid "Re-install first?"
|
9006 |
msgstr ""
|
9007 |
|
9008 |
+
#: src/processors/hackprotect_scan_ptg.php:165
|
9009 |
msgid "This ensures files for this plugin haven't been corrupted in any way."
|
9010 |
msgstr ""
|
9011 |
|
9012 |
+
#: src/processors/hackprotect_scan_ptg.php:166
|
9013 |
msgid ""
|
9014 |
"You can choose to 'Activate Only' (not recommended), or close this message "
|
9015 |
"to cancel activation."
|
9016 |
msgstr ""
|
9017 |
|
9018 |
+
#: src/processors/hackprotect_scan_ptg.php:169
|
9019 |
#, php-format
|
9020 |
msgid ""
|
9021 |
"For best security practices, %s will download and re-install the latest "
|
9022 |
"available version of this plugin."
|
9023 |
msgstr ""
|
9024 |
|
9025 |
+
#: src/processors/hackprotect_scan_ptg.php:588
|
9026 |
#, php-format
|
9027 |
msgid ""
|
9028 |
"%s has detected at least 1 Plugins/Themes have been modified on your site."
|
9029 |
msgstr ""
|
9030 |
|
9031 |
+
#: src/processors/hackprotect_scan_ptg.php:590
|
9032 |
msgid ""
|
9033 |
"You will receive only 1 email notification about these changes in a 1 week "
|
9034 |
"period."
|
9035 |
msgstr ""
|
9036 |
|
9037 |
+
#: src/processors/hackprotect_scan_ptg.php:594
|
9038 |
msgid "Details of the problem items are below:"
|
9039 |
msgstr ""
|
9040 |
|
9041 |
+
#: src/processors/hackprotect_scan_ptg.php:599
|
9042 |
msgid "Modified Plugins:"
|
9043 |
msgstr ""
|
9044 |
|
9045 |
+
#: src/processors/hackprotect_scan_ptg.php:607
|
9046 |
msgid "Modified Themes:"
|
9047 |
msgstr ""
|
9048 |
|
9049 |
+
#: src/processors/hackprotect_scan_ptg.php:617
|
9050 |
msgid "Plugins/Themes Have Been Altered"
|
9051 |
msgstr ""
|
9052 |
|
9053 |
+
#: src/processors/hackprotect_scan_ufc.php:85
|
9054 |
msgid "Unrecognised WordPress Files Detected"
|
9055 |
msgstr ""
|
9056 |
|
9057 |
+
#: src/processors/hackprotect_scan_ufc.php:113
|
9058 |
#, php-format
|
9059 |
msgid "The %s Unrecognised File Scanner found files which you need to review."
|
9060 |
msgstr ""
|
9061 |
|
9062 |
+
#: src/processors/hackprotect_scan_ufc.php:119
|
9063 |
msgid "Files discovered"
|
9064 |
msgstr ""
|
9065 |
|
9066 |
+
#: src/processors/hackprotect_scan_ufc.php:126
|
9067 |
#, php-format
|
9068 |
msgid "%s has attempted to delete these files based on your current settings."
|
9069 |
msgstr ""
|
9070 |
|
9071 |
+
#: src/processors/hackprotect_scan_wcf.php:71
|
9072 |
msgid "Modified Core WordPress Files Discovered"
|
9073 |
msgstr ""
|
9074 |
|
9075 |
+
#: src/processors/hackprotect_scan_wcf.php:97
|
9076 |
#, php-format
|
9077 |
msgid "The %s Core File Scanner found files with potential problems."
|
9078 |
msgstr ""
|
9079 |
|
9080 |
+
#: src/processors/hackprotect_scan_wcf.php:137
|
9081 |
msgid "The following files have different content:"
|
9082 |
msgstr ""
|
9083 |
|
9084 |
+
#: src/processors/hackprotect_scan_wcf.php:144
|
9085 |
msgid "The following files are missing:"
|
9086 |
msgstr ""
|
9087 |
|
9088 |
+
#: src/processors/hackprotect_scan_wpv.php:164
|
9089 |
msgid "Vulnerable"
|
9090 |
msgstr ""
|
9091 |
|
9092 |
+
#: src/processors/hackprotect_scan_wpv.php:196
|
9093 |
#, php-format
|
9094 |
msgid ""
|
9095 |
"%s has discovered that the currently installed version of the %s plugin has "
|
9096 |
"known security vulnerabilities."
|
9097 |
msgstr ""
|
9098 |
|
9099 |
+
#: src/processors/hackprotect_scan_wpv.php:198
|
9100 |
msgid "Vulnerability Name"
|
9101 |
msgstr ""
|
9102 |
|
9103 |
+
#: src/processors/hackprotect_scan_wpv.php:199
|
9104 |
msgid "Vulnerability Type"
|
9105 |
msgstr ""
|
9106 |
|
9107 |
+
#: src/processors/hackprotect_scan_wpv.php:200
|
9108 |
msgid "Fixed Versions"
|
9109 |
msgstr ""
|
9110 |
|
9111 |
+
#: src/processors/hackprotect_scan_wpv.php:230
|
9112 |
#, php-format
|
9113 |
msgid "%s has detected items with known security vulnerabilities."
|
9114 |
msgstr ""
|
9115 |
|
9116 |
+
#: src/processors/hackprotect_scan_wpv.php:231
|
9117 |
msgid "You should update or remove these items at your earliest convenience."
|
9118 |
msgstr ""
|
9119 |
|
9120 |
+
#: src/processors/hackprotect_scan_wpv.php:250
|
9121 |
#, php-format
|
9122 |
msgid "Vulnerability Title: %s"
|
9123 |
msgstr ""
|
9124 |
|
9125 |
+
#: src/processors/hackprotect_scan_wpv.php:251
|
9126 |
#, php-format
|
9127 |
msgid "Vulnerability Type: %s"
|
9128 |
msgstr ""
|
9129 |
|
9130 |
+
#: src/processors/hackprotect_scan_wpv.php:252
|
9131 |
#, php-format
|
9132 |
msgid "Fixed Version: %s"
|
9133 |
msgstr ""
|
9134 |
|
9135 |
+
#: src/processors/hackprotect_scan_wpv.php:253
|
9136 |
#, php-format
|
9137 |
msgid "Further Information: %s"
|
9138 |
msgstr ""
|
9139 |
|
9140 |
+
#: src/processors/hackprotect_scan_wpv.php:261
|
9141 |
msgid "Plugin(s) Discovered With Known Security Vulnerabilities."
|
9142 |
msgstr ""
|
9143 |
|
9144 |
+
#: src/processors/ips.php:86
|
9145 |
msgid "No custom message provided."
|
9146 |
msgstr ""
|
9147 |
|
9148 |
+
#: src/processors/ips.php:252
|
9149 |
#, php-format
|
9150 |
msgid "You've been blocked by the %s plugin"
|
9151 |
msgstr ""
|
9152 |
|
9153 |
+
#: src/processors/ips.php:259
|
9154 |
#, php-format
|
9155 |
msgid "Time remaining on black list: %s"
|
9156 |
msgstr ""
|
9157 |
|
9158 |
+
#: src/processors/ips.php:260
|
9159 |
#, php-format
|
9160 |
msgid "%s minute"
|
9161 |
msgid_plural "%s minutes"
|
9162 |
msgstr[0] ""
|
9163 |
msgstr[1] ""
|
9164 |
|
9165 |
+
#: src/processors/ips.php:262
|
9166 |
#, php-format
|
9167 |
msgid ""
|
9168 |
"You tripped the security plugin defenses a total of %s times making you a "
|
9169 |
"suspect."
|
9170 |
msgstr ""
|
9171 |
|
9172 |
+
#: src/processors/ips.php:263
|
9173 |
msgid ""
|
9174 |
"If you believe this to be in error, please contact the site owner and quote "
|
9175 |
"your IP address below."
|
9176 |
msgstr ""
|
9177 |
|
9178 |
+
#: src/processors/ips.php:267
|
9179 |
msgid "Auto-Unblock Your IP"
|
9180 |
msgstr ""
|
9181 |
|
9182 |
+
#: src/processors/ips.php:268
|
9183 |
msgid ""
|
9184 |
"You can automatically unblock your IP address by clicking the button below."
|
9185 |
msgstr ""
|
9186 |
|
9187 |
+
#: src/processors/ips.php:269
|
9188 |
msgid "Unblock My IP Address"
|
9189 |
msgstr ""
|
9190 |
|
9191 |
+
#: src/processors/ips.php:281 src/processors/loginprotect_gasp.php:27
|
9192 |
msgid "You MUST enable Javascript to be able to login"
|
9193 |
msgstr ""
|
9194 |
|
9195 |
+
#: src/processors/ips.php:505
|
9196 |
msgid "No Label"
|
9197 |
msgstr ""
|
9198 |
|
9199 |
+
#: src/processors/lockdown.php:93
|
9200 |
#, php-format
|
9201 |
msgid ""
|
9202 |
"The \"author\" query parameter has been blocked by %s to protect against "
|
9203 |
"user login name fishing."
|
9204 |
msgstr ""
|
9205 |
|
9206 |
+
#: src/processors/lockdown.php:121
|
9207 |
#, php-format
|
9208 |
msgid "Anonymous access to the WordPress Rest API has been restricted by %s."
|
9209 |
msgstr ""
|
9610 |
msgid "Use your Yubikey to generate a new code."
|
9611 |
msgstr ""
|
9612 |
|
9613 |
+
#: src/processors/loginprotect_wplogin.php:53
|
9614 |
msgid ""
|
9615 |
"Your login URL is unchanged because the Rename WP Login feature is not "
|
9616 |
"currently supported on WPMS."
|
9617 |
msgstr ""
|
9618 |
|
9619 |
+
#: src/processors/loginprotect_wplogin.php:57
|
9620 |
+
#: src/processors/loginprotect_wplogin.php:61
|
9621 |
#, php-format
|
9622 |
msgid ""
|
9623 |
"Can not use the Rename WP Login feature because you have the \"%s\" plugin "
|
9624 |
"installed and it is active."
|
9625 |
msgstr ""
|
9626 |
|
9627 |
+
#: src/processors/loginprotect_wplogin.php:65
|
9628 |
#, php-format
|
9629 |
msgid ""
|
9630 |
"Can not use the Rename WP Login feature because you have not enabled %s."
|
9631 |
msgstr ""
|
9632 |
|
9633 |
+
#: src/processors/loginprotect_wplogin.php:65
|
9634 |
msgid "Permalinks"
|
9635 |
msgstr ""
|
9636 |
|
9637 |
+
#: src/processors/loginprotect_wplogin.php:69
|
9638 |
#, php-format
|
9639 |
msgid ""
|
9640 |
"Can not use the Rename WP Login feature because you have chosen a path (\"%s"
|
9641 |
"\") that is reserved on your WordPress site."
|
9642 |
msgstr ""
|
9643 |
|
9644 |
+
#: src/processors/loginprotect_wplogin.php:94
|
9645 |
msgid ""
|
9646 |
"Your login URL is unchanged because your current hosting/PHP configuration "
|
9647 |
"cannot parse the necessary information."
|
9648 |
msgstr ""
|
9649 |
|
9650 |
+
#: src/processors/plugin.php:77
|
9651 |
#, php-format
|
9652 |
msgid "%s is provided by %s"
|
9653 |
msgstr ""
|
9654 |
|
9655 |
+
#: src/processors/plugin.php:82
|
9656 |
#, php-format
|
9657 |
msgid "Days Installed: %s"
|
9658 |
msgstr ""
|
9659 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9660 |
#: src/processors/plugin_importexport.php:41
|
9661 |
msgid "Import From File"
|
9662 |
msgstr ""
|
9792 |
msgid "Handshake verification failed."
|
9793 |
msgstr ""
|
9794 |
|
9795 |
+
#: src/processors/sessions.php:94
|
9796 |
msgid "You're already logged-in."
|
9797 |
msgstr ""
|
9798 |
|
9799 |
+
#: src/processors/sessions.php:98
|
9800 |
msgid "Go To Admin"
|
9801 |
msgstr ""
|
9802 |
|
9803 |
+
#: src/processors/user_management.php:124
|
9804 |
+
#: src/processors/usermanagement_suspend.php:111
|
9805 |
msgid "User Status"
|
9806 |
msgstr ""
|
9807 |
|
9808 |
+
#: src/processors/user_management.php:131
|
9809 |
msgid "Not Recorded"
|
9810 |
msgstr ""
|
9811 |
|
9812 |
+
#: src/processors/user_management.php:142
|
9813 |
msgid "Last Login"
|
9814 |
msgstr ""
|
9815 |
|
9816 |
+
#: src/processors/user_management.php:194
|
9817 |
#, php-format
|
9818 |
msgid ""
|
9819 |
"As requested, %s is notifying you of a successful %s login to a WordPress "
|
9820 |
"site that you manage."
|
9821 |
msgstr ""
|
9822 |
|
9823 |
+
#: src/processors/user_management.php:199
|
9824 |
#, php-format
|
9825 |
msgid "Important: %s"
|
9826 |
msgstr ""
|
9827 |
|
9828 |
+
#: src/processors/user_management.php:199
|
9829 |
msgid ""
|
9830 |
"This user may now be subject to additional Two-Factor Authentication before "
|
9831 |
"completing their login."
|
9832 |
msgstr ""
|
9833 |
|
9834 |
+
#: src/processors/user_management.php:201
|
9835 |
msgid "Details for this user are below:"
|
9836 |
msgstr ""
|
9837 |
|
9838 |
+
#: src/processors/user_management.php:207
|
9839 |
+
#: src/processors/user_management.php:241
|
9840 |
msgid "Thanks."
|
9841 |
msgstr ""
|
9842 |
|
9843 |
+
#: src/processors/user_management.php:215
|
9844 |
+
#: src/processors/user_management.php:249
|
9845 |
msgid "Notice"
|
9846 |
msgstr ""
|
9847 |
|
9848 |
+
#: src/processors/user_management.php:215
|
9849 |
#, php-format
|
9850 |
msgid "%s Just Logged Into %s"
|
9851 |
msgstr ""
|
9852 |
|
9853 |
+
#: src/processors/user_management.php:230
|
9854 |
#, php-format
|
9855 |
msgid "%s is notifying you of a successful login to your WordPress account."
|
9856 |
msgstr ""
|
9857 |
|
9858 |
+
#: src/processors/user_management.php:233
|
9859 |
msgid "Details for this login are below:"
|
9860 |
msgstr ""
|
9861 |
|
9862 |
+
#: src/processors/user_management.php:239
|
9863 |
msgid ""
|
9864 |
"If this is unexpected or suspicious, please contact your site administrator "
|
9865 |
"immediately."
|
9866 |
msgstr ""
|
9867 |
|
9868 |
+
#: src/processors/user_management.php:249
|
9869 |
msgid "A login to your WordPress account just occurred"
|
9870 |
msgstr ""
|
9871 |
|
9872 |
+
#: src/processors/usermanagement_passwords.php:98
|
9873 |
#, php-format
|
9874 |
msgid "Your password has expired (after %s days)."
|
9875 |
msgstr ""
|
9876 |
|
9877 |
+
#: src/processors/usermanagement_passwords.php:115
|
9878 |
msgid ""
|
9879 |
"Your password doesn't meet requirements set by your security administrator."
|
9880 |
msgstr ""
|
9881 |
|
9882 |
+
#: src/processors/usermanagement_passwords.php:141
|
9883 |
msgid ""
|
9884 |
"For your security, please use the password section below to update your "
|
9885 |
"password."
|
9886 |
msgstr ""
|
9887 |
|
9888 |
+
#: src/processors/usermanagement_passwords.php:166
|
9889 |
msgid ""
|
9890 |
"Your security administrator has imposed requirements for password quality."
|
9891 |
msgstr ""
|
9892 |
|
9893 |
+
#: src/processors/usermanagement_passwords.php:167
|
9894 |
msgid "Reason"
|
9895 |
msgstr ""
|
9896 |
|
9897 |
+
#: src/processors/usermanagement_passwords.php:232
|
9898 |
#, php-format
|
9899 |
msgid "Password length (%s) too short (min: %s characters)"
|
9900 |
msgstr ""
|
9901 |
|
9902 |
+
#: src/processors/usermanagement_passwords.php:286
|
9903 |
+
#: src/processors/usermanagement_passwords.php:346
|
9904 |
msgid "Please use a different password."
|
9905 |
msgstr ""
|
9906 |
|
9907 |
+
#: src/processors/usermanagement_passwords.php:287
|
9908 |
msgid "This password has already been pwned."
|
9909 |
msgstr ""
|
9910 |
|
9911 |
+
#: src/processors/usermanagement_passwords.php:291
|
9912 |
+
#: src/processors/usermanagement_passwords.php:351
|
9913 |
#, php-format
|
9914 |
msgid "%s times"
|
9915 |
msgstr ""
|
9916 |
|
9917 |
+
#: src/processors/usermanagement_passwords.php:347
|
9918 |
msgid "This password has been pwned."
|
9919 |
msgstr ""
|
9920 |
|
9921 |
+
#: src/processors/usermanagement_sessions.php:218
|
9922 |
msgid "Your session has expired."
|
9923 |
msgstr ""
|
9924 |
|
9925 |
+
#: src/processors/usermanagement_sessions.php:222
|
9926 |
msgid "Your session was idle for too long."
|
9927 |
msgstr ""
|
9928 |
|
9929 |
+
#: src/processors/usermanagement_sessions.php:226
|
9930 |
msgid "Your session was locked to another IP Address."
|
9931 |
msgstr ""
|
9932 |
|
9933 |
+
#: src/processors/usermanagement_sessions.php:231
|
9934 |
#, php-format
|
9935 |
msgid "You do not currently have a %s user session."
|
9936 |
msgstr ""
|
9937 |
|
9938 |
+
#: src/processors/usermanagement_sessions.php:237
|
9939 |
msgid "Your browser appears to have changed for this session."
|
9940 |
msgstr ""
|
9941 |
|
9942 |
+
#: src/processors/usermanagement_sessions.php:242
|
9943 |
msgid "Your session was terminated."
|
9944 |
msgstr ""
|
9945 |
|
9946 |
+
#: src/processors/usermanagement_sessions.php:246
|
9947 |
msgid "Please login again."
|
9948 |
msgstr ""
|
9949 |
|
9950 |
+
#: src/processors/usermanagement_suspend.php:89
|
9951 |
+
#: src/processors/usermanagement_suspend.php:123
|
9952 |
+
#: src/processors/usermanagement_suspend.php:156
|
9953 |
msgid "Suspended"
|
9954 |
msgstr ""
|
9955 |
|
9956 |
+
#: src/processors/usermanagement_suspend.php:152
|
9957 |
msgid "Suspend Account"
|
9958 |
msgstr ""
|
9959 |
|
9960 |
+
#: src/processors/usermanagement_suspend.php:153
|
9961 |
msgid "Check to un/suspend user account"
|
9962 |
msgstr ""
|
9963 |
|
9964 |
+
#: src/processors/usermanagement_suspend.php:154
|
9965 |
msgid "The user can never login while their account is suspended."
|
9966 |
msgstr ""
|
9967 |
|
9968 |
+
#: src/processors/usermanagement_suspend.php:155
|
9969 |
msgid ""
|
9970 |
"Sorry, suspension for this account may only be managed by a security "
|
9971 |
"administrator."
|
10185 |
msgstr ""
|
10186 |
|
10187 |
#: src/wizards/plugin.php:469 src/wizards/plugin.php:502
|
10188 |
+
#: src/wizards/plugin.php:535 src/wizards/plugin.php:571
|
10189 |
+
#: src/wizards/plugin.php:678
|
10190 |
msgid "No changes were made as no option was selected"
|
10191 |
msgstr ""
|
10192 |
|
10193 |
#: src/wizards/plugin.php:482 src/wizards/plugin.php:515
|
10194 |
+
#: src/wizards/plugin.php:550 src/wizards/plugin.php:694
|
10195 |
msgid "Enabled"
|
10196 |
msgstr ""
|
10197 |
|
10198 |
#: src/wizards/plugin.php:486 src/wizards/plugin.php:519
|
10199 |
+
#: src/wizards/plugin.php:554 src/wizards/plugin.php:698
|
10200 |
#, php-format
|
10201 |
msgid "%s setting could not be changed at this time."
|
10202 |
msgstr ""
|
10203 |
|
10204 |
+
#: src/wizards/plugin.php:581 src/wizards/plugin.php:591
|
10205 |
msgid "Preferences have been saved."
|
10206 |
msgstr ""
|
10207 |
|
10208 |
+
#: src/wizards/plugin.php:643
|
10209 |
msgid "Search item added."
|
10210 |
msgstr ""
|
10211 |
|
10212 |
+
#: src/wizards/plugin.php:660
|
10213 |
msgid "All entries were deleted"
|
10214 |
msgstr ""
|
10215 |
|
10216 |
+
#: src/wizards/plugin.php:663
|
10217 |
msgid "Please check the box to confirm deletion."
|
10218 |
msgstr ""
|
10219 |
|
languages/wp-simple-firewall-ja.mo
ADDED
Binary file
|
languages/wp-simple-firewall-nl_NL.mo
CHANGED
Binary file
|
plugin-spec.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"properties": {
|
3 |
-
"version": "8.0
|
4 |
-
"release_timestamp":
|
5 |
-
"build": "201909.
|
6 |
"slug_parent": "icwp",
|
7 |
"slug_plugin": "wpsf",
|
8 |
"human_name": "Shield",
|
1 |
{
|
2 |
"properties": {
|
3 |
+
"version": "8.1.0",
|
4 |
+
"release_timestamp": 1568804000,
|
5 |
+
"build": "201909.1801",
|
6 |
"slug_parent": "icwp",
|
7 |
"slug_plugin": "wpsf",
|
8 |
"human_name": "Shield",
|
readme.txt
CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.5.2
|
|
8 |
Requires PHP: 5.4.0
|
9 |
Recommended PHP: 7.0
|
10 |
Tested up to: 5.2
|
11 |
-
Stable tag: 8.0
|
12 |
|
13 |
Security protection from hackers through smarter automation. Powerful scanners, 2-Factor Auth, limit logins, auto IP blocks & more.
|
14 |
|
@@ -370,17 +370,25 @@ You will always be able to use Shield Security and its free features in-full.
|
|
370 |
|
371 |
[Go Pro for just $1/month](https://icwp.io/aa).
|
372 |
|
373 |
-
= 8.0
|
374 |
-
*Released:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
|
376 |
* **(v.2)** IMPROVED: Password strength metering now better aligns with WordPress library (PHP 5.6+)
|
377 |
* **(v.2)** IMPROVED: Dutch translations have been adjusted.
|
378 |
* **(v.2)** FIXED: Setting 'Month' for IP block duration wasn't being applied.
|
379 |
* **(v.2)** FIXED: Certain admin notices not displayed when they should be.
|
380 |
-
|
381 |
-
= 8.0 - Series =
|
382 |
-
*Released: 27th September, 2019* - [Release Notes](https://icwp.io/fv)
|
383 |
-
|
384 |
* **(v.1)** FIXED: Comment SPAM blocking wasn't working if set to "Detect and Reject".
|
385 |
* **(v.1)** FIXED: Shield Widget/Badge broken in some cases.
|
386 |
* **(v.1)** ADDED: You can force Shield to operate in any [locale, regardless of site locale](https://icwp.io/gistshieldlocale).
|
8 |
Requires PHP: 5.4.0
|
9 |
Recommended PHP: 7.0
|
10 |
Tested up to: 5.2
|
11 |
+
Stable tag: 8.1.0
|
12 |
|
13 |
Security protection from hackers through smarter automation. Powerful scanners, 2-Factor Auth, limit logins, auto IP blocks & more.
|
14 |
|
370 |
|
371 |
[Go Pro for just $1/month](https://icwp.io/aa).
|
372 |
|
373 |
+
= 8.1.0 - Current Release =
|
374 |
+
*Released: 18th September, 2019* - [Release Notes](https://icwp.io/fy)
|
375 |
+
|
376 |
+
* **(v.0)** IMPROVED: Massive improvements to asynchronous scans in performance and reliability.
|
377 |
+
* **(v.0)** ADDED: [**PRO**] Possible to supply multiple email addresses for Administrator login notifications.
|
378 |
+
* **(v.0)** ADDED: New firewall whitelist rule to prevent firewall blocks when activating certain plugins.
|
379 |
+
* **(v.0)** IMPROVED: Prevent errors caused by other plugins not passing correctly-formatted data through WP filters.
|
380 |
+
* **(v.0)** ADDED: Japanese translations (14%).
|
381 |
+
* **(v.0)** IMPROVED: Plugin locale now respects user profile locale setting.
|
382 |
+
* **(v.0)** IMPROVED: Audit Trail filter for specific events.
|
383 |
+
* **(v.0)** IMPROVED: Lots of cleanup of deprecated PHP code following the the v7-v8 upgrade.
|
384 |
+
|
385 |
+
= 8.0 - Series =
|
386 |
+
*Released: 27th August, 2019* - [Release Notes](https://icwp.io/fv)
|
387 |
|
388 |
* **(v.2)** IMPROVED: Password strength metering now better aligns with WordPress library (PHP 5.6+)
|
389 |
* **(v.2)** IMPROVED: Dutch translations have been adjusted.
|
390 |
* **(v.2)** FIXED: Setting 'Month' for IP block duration wasn't being applied.
|
391 |
* **(v.2)** FIXED: Certain admin notices not displayed when they should be.
|
|
|
|
|
|
|
|
|
392 |
* **(v.1)** FIXED: Comment SPAM blocking wasn't working if set to "Detect and Reject".
|
393 |
* **(v.1)** FIXED: Shield Widget/Badge broken in some cases.
|
394 |
* **(v.1)** ADDED: You can force Shield to operate in any [locale, regardless of site locale](https://icwp.io/gistshieldlocale).
|
src/config/feature-firewall.php
CHANGED
@@ -269,6 +269,9 @@
|
|
269 |
"home",
|
270 |
"siteurl"
|
271 |
],
|
|
|
|
|
|
|
272 |
"/wp-admin/post-new.php": [],
|
273 |
"/wp-admin/page-new.php": [],
|
274 |
"/wp-admin/link-add.php": [],
|
269 |
"home",
|
270 |
"siteurl"
|
271 |
],
|
272 |
+
"/wp-admin/plugins.php": [
|
273 |
+
"plugin"
|
274 |
+
],
|
275 |
"/wp-admin/post-new.php": [],
|
276 |
"/wp-admin/page-new.php": [],
|
277 |
"/wp-admin/link-add.php": [],
|
src/config/feature-hack_protect.php
CHANGED
@@ -527,20 +527,6 @@
|
|
527 |
"summary": "Show Re-Install Links For Plugins",
|
528 |
"description": "Show links to re-install plugins and offer re-install when activating plugins."
|
529 |
},
|
530 |
-
{
|
531 |
-
"key": "scans_job",
|
532 |
-
"section": "section_non_ui",
|
533 |
-
"transferable": false,
|
534 |
-
"type": "array",
|
535 |
-
"default": []
|
536 |
-
},
|
537 |
-
{
|
538 |
-
"key": "scan_key",
|
539 |
-
"section": "section_non_ui",
|
540 |
-
"transferable": false,
|
541 |
-
"type": "text",
|
542 |
-
"default": ""
|
543 |
-
},
|
544 |
{
|
545 |
"key": "ptg_last_build_at",
|
546 |
"section": "section_non_ui",
|
@@ -639,6 +625,20 @@
|
|
639 |
"transferable": false,
|
640 |
"type": "array",
|
641 |
"default": []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
}
|
643 |
],
|
644 |
"definitions": {
|
@@ -662,14 +662,20 @@
|
|
662 |
"created_at",
|
663 |
"deleted_at"
|
664 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
665 |
"url_mal_sigs_simple": "https://raw.githubusercontent.com/scr34m/php-malware-scanner/master/definitions/patterns_raw.txt",
|
666 |
"url_mal_sigs_regex": "https://raw.githubusercontent.com/scr34m/php-malware-scanner/master/definitions/patterns_re.txt",
|
667 |
-
"mal_whitelist_hashes": {
|
668 |
-
"Container.php": [
|
669 |
-
"4e187f5c204bd597dd5ea653ee9c04b1413910c7"
|
670 |
-
]
|
671 |
-
},
|
672 |
-
"url_mal_whitelist": "https://onedollarplugin.com/",
|
673 |
"malware_whitelist_paths": [
|
674 |
"wp-content/wflogs/"
|
675 |
],
|
527 |
"summary": "Show Re-Install Links For Plugins",
|
528 |
"description": "Show links to re-install plugins and offer re-install when activating plugins."
|
529 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
530 |
{
|
531 |
"key": "ptg_last_build_at",
|
532 |
"section": "section_non_ui",
|
625 |
"transferable": false,
|
626 |
"type": "array",
|
627 |
"default": []
|
628 |
+
},
|
629 |
+
{
|
630 |
+
"key": "scans_to_build",
|
631 |
+
"section": "section_non_ui",
|
632 |
+
"transferable": false,
|
633 |
+
"type": "array",
|
634 |
+
"default": []
|
635 |
+
},
|
636 |
+
{
|
637 |
+
"key": "is_scan_cron",
|
638 |
+
"section": "section_non_ui",
|
639 |
+
"transferable": false,
|
640 |
+
"type": "boolean",
|
641 |
+
"default": false
|
642 |
}
|
643 |
],
|
644 |
"definitions": {
|
662 |
"created_at",
|
663 |
"deleted_at"
|
664 |
],
|
665 |
+
"table_name_scanqueue": "scanq",
|
666 |
+
"table_columns_scanqueue": [
|
667 |
+
"id",
|
668 |
+
"scan",
|
669 |
+
"items",
|
670 |
+
"results",
|
671 |
+
"meta",
|
672 |
+
"started_at",
|
673 |
+
"finished_at",
|
674 |
+
"created_at",
|
675 |
+
"deleted_at"
|
676 |
+
],
|
677 |
"url_mal_sigs_simple": "https://raw.githubusercontent.com/scr34m/php-malware-scanner/master/definitions/patterns_raw.txt",
|
678 |
"url_mal_sigs_regex": "https://raw.githubusercontent.com/scr34m/php-malware-scanner/master/definitions/patterns_re.txt",
|
|
|
|
|
|
|
|
|
|
|
|
|
679 |
"malware_whitelist_paths": [
|
680 |
"wp-content/wflogs/"
|
681 |
],
|
src/config/feature-user_management.php
CHANGED
@@ -99,7 +99,7 @@
|
|
99 |
"section": "section_admin_login_notification",
|
100 |
"sensitive": true,
|
101 |
"default": "",
|
102 |
-
"type": "
|
103 |
"link_info": "",
|
104 |
"link_blog": "",
|
105 |
"name": "Admin Login Notification Email",
|
99 |
"section": "section_admin_login_notification",
|
100 |
"sensitive": true,
|
101 |
"default": "",
|
102 |
+
"type": "text",
|
103 |
"link_info": "",
|
104 |
"link_blog": "",
|
105 |
"name": "Admin Login Notification Email",
|
src/features/admin_access_restriction.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
@@ -34,14 +35,6 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
34 |
return ( is_array( $aU ) && $this->isPremium() ) ? $aU : [];
|
35 |
}
|
36 |
|
37 |
-
/**
|
38 |
-
* @return bool
|
39 |
-
*/
|
40 |
-
public function hasAccessKey() {
|
41 |
-
$sKey = $this->getAccessKeyHash();
|
42 |
-
return !empty( $sKey ) && strlen( $sKey ) == 32;
|
43 |
-
}
|
44 |
-
|
45 |
/**
|
46 |
* @return bool
|
47 |
*/
|
@@ -59,13 +52,6 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
59 |
return !empty( $sUser ) && in_array( $sUser, $this->getSecurityAdminUsers() );
|
60 |
}
|
61 |
|
62 |
-
/**
|
63 |
-
* @return bool
|
64 |
-
*/
|
65 |
-
public function isAdminAccessAdminUsersEnabled() {
|
66 |
-
return $this->isOpt( 'admin_access_restrict_admin_users', 'Y' );
|
67 |
-
}
|
68 |
-
|
69 |
/**
|
70 |
*/
|
71 |
protected function doExtraSubmitProcessing() {
|
@@ -80,7 +66,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
80 |
'wl_dashboardlogourl',
|
81 |
'wl_login2fa_logourl',
|
82 |
];
|
83 |
-
$oOpts = $this->
|
84 |
foreach ( $aImages as $sKey ) {
|
85 |
if ( !Services::Data()->isValidWebUrl( $this->buildWlImageUrl( $sKey ) ) ) {
|
86 |
$oOpts->resetOptToDefault( $sKey );
|
@@ -236,7 +222,9 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
236 |
* @return bool
|
237 |
*/
|
238 |
public function verifyAccessKey( $sKey ) {
|
239 |
-
|
|
|
|
|
240 |
}
|
241 |
|
242 |
/**
|
@@ -270,7 +258,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
270 |
* @return string
|
271 |
*/
|
272 |
private function buildWlImageUrl( $sKey ) {
|
273 |
-
$oOpts = $this->
|
274 |
|
275 |
$sLogoUrl = $this->getOpt( $sKey );
|
276 |
if ( empty( $sLogoUrl ) ) {
|
@@ -292,7 +280,9 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
292 |
* @return bool
|
293 |
*/
|
294 |
public function isWlEnabled() {
|
295 |
-
|
|
|
|
|
296 |
}
|
297 |
|
298 |
/**
|
@@ -316,9 +306,8 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
316 |
}
|
317 |
|
318 |
$this->setIsMainFeatureEnabled( true )
|
319 |
-
->setOpt( 'admin_access_key', md5( $sKey ) )
|
320 |
-
|
321 |
-
return $this;
|
322 |
}
|
323 |
|
324 |
/**
|
@@ -354,6 +343,9 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
354 |
* @return array
|
355 |
*/
|
356 |
public function addInsightsConfigData( $aAllData ) {
|
|
|
|
|
|
|
357 |
$aThis = [
|
358 |
'strings' => [
|
359 |
'title' => __( 'Security Admin', 'wp-simple-firewall' ),
|
@@ -378,7 +370,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
378 |
'href' => $this->getUrl_DirectLinkToOption( 'admin_access_key' ),
|
379 |
];
|
380 |
|
381 |
-
$bWpOpts = $
|
382 |
$aThis[ 'key_opts' ][ 'wpopts' ] = [
|
383 |
'name' => __( 'Important Options', 'wp-simple-firewall' ),
|
384 |
'enabled' => $bWpOpts,
|
@@ -389,7 +381,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
389 |
'href' => $this->getUrl_DirectLinkToOption( 'admin_access_restrict_options' ),
|
390 |
];
|
391 |
|
392 |
-
$bUsers = $
|
393 |
$aThis[ 'key_opts' ][ 'adminusers' ] = [
|
394 |
'name' => __( 'WP Admins', 'wp-simple-firewall' ),
|
395 |
'enabled' => $bUsers,
|
@@ -448,16 +440,18 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
448 |
* This is the point where you would want to do any options verification
|
449 |
*/
|
450 |
protected function doPrePluginOptionsSave() {
|
|
|
|
|
451 |
|
452 |
-
if ( hash_equals( $
|
453 |
-
$
|
454 |
-
|
455 |
}
|
456 |
|
457 |
// Restricting Activate Plugins also means restricting the rest.
|
458 |
-
$aPluginsRestrictions = $
|
459 |
if ( in_array( 'activate_plugins', $aPluginsRestrictions ) ) {
|
460 |
-
$
|
461 |
'admin_access_restrict_plugins',
|
462 |
array_unique( array_merge( $aPluginsRestrictions, [
|
463 |
'install_plugins',
|
@@ -468,9 +462,9 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
468 |
}
|
469 |
|
470 |
// Restricting Switch (Activate) Themes also means restricting the rest.
|
471 |
-
$aThemesRestrictions = $
|
472 |
if ( in_array( 'switch_themes', $aThemesRestrictions ) && in_array( 'edit_theme_options', $aThemesRestrictions ) ) {
|
473 |
-
$
|
474 |
'admin_access_restrict_themes',
|
475 |
array_unique( array_merge( $aThemesRestrictions, [
|
476 |
'install_themes',
|
@@ -480,9 +474,9 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
480 |
);
|
481 |
}
|
482 |
|
483 |
-
$aPostRestrictions = $
|
484 |
if ( in_array( 'edit', $aPostRestrictions ) ) {
|
485 |
-
$
|
486 |
'admin_access_restrict_posts',
|
487 |
array_unique( array_merge( $aPostRestrictions, [ 'create', 'publish', 'delete' ] ) )
|
488 |
);
|
@@ -492,8 +486,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
492 |
/**
|
493 |
*/
|
494 |
public function preDeactivatePlugin() {
|
495 |
-
|
496 |
-
if ( !$oCon->isPluginAdmin() ) {
|
497 |
Services::WpGeneral()->wpDie(
|
498 |
__( "Sorry, this plugin is protected against unauthorised attempts to disable it.", 'wp-simple-firewall' )
|
499 |
.'<br />'.sprintf( '<a href="%s">%s</a>',
|
@@ -505,36 +498,15 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
505 |
}
|
506 |
|
507 |
/**
|
508 |
-
* @return
|
509 |
-
*/
|
510 |
-
protected function loadAdminNotices() {
|
511 |
-
return new Shield\Modules\SecurityAdmin\AdminNotices();
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* @return Shield\Modules\SecurityAdmin\AjaxHandler
|
516 |
-
*/
|
517 |
-
protected function loadAjaxHandler() {
|
518 |
-
return new Shield\Modules\SecurityAdmin\AjaxHandler;
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* @return Shield\Modules\SecurityAdmin\Options
|
523 |
-
*/
|
524 |
-
protected function loadOptions() {
|
525 |
-
return new Shield\Modules\SecurityAdmin\Options();
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* @return Shield\Modules\SecurityAdmin\Strings
|
530 |
*/
|
531 |
-
protected function
|
532 |
-
return
|
533 |
}
|
534 |
|
535 |
/**
|
536 |
* @return string
|
537 |
-
* @deprecated
|
538 |
*/
|
539 |
protected function getAccessKeyHash() {
|
540 |
return $this->getOpt( 'admin_access_key' );
|
@@ -542,7 +514,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
542 |
|
543 |
/**
|
544 |
* @return bool
|
545 |
-
* @deprecated
|
546 |
*/
|
547 |
public function getAdminAccessArea_Options() {
|
548 |
return $this->isOpt( 'admin_access_restrict_options', 'Y' );
|
@@ -550,7 +522,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
550 |
|
551 |
/**
|
552 |
* @return array
|
553 |
-
* @deprecated
|
554 |
*/
|
555 |
public function getAdminAccessArea_Plugins() {
|
556 |
return $this->getAdminAccessArea( 'plugins' );
|
@@ -558,7 +530,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
558 |
|
559 |
/**
|
560 |
* @return array
|
561 |
-
* @deprecated
|
562 |
*/
|
563 |
public function getAdminAccessArea_Themes() {
|
564 |
return $this->getAdminAccessArea( 'themes' );
|
@@ -566,7 +538,7 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
566 |
|
567 |
/**
|
568 |
* @return array
|
569 |
-
* @deprecated
|
570 |
*/
|
571 |
public function getAdminAccessArea_Posts() {
|
572 |
return $this->getAdminAccessArea( 'posts' );
|
@@ -575,27 +547,18 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
575 |
/**
|
576 |
* @param string $sArea one of plugins, themes
|
577 |
* @return array
|
578 |
-
* @deprecated
|
579 |
*/
|
580 |
public function getAdminAccessArea( $sArea = 'plugins' ) {
|
581 |
$aSettings = $this->getOpt( 'admin_access_restrict_'.$sArea, [] );
|
582 |
return !is_array( $aSettings ) ? [] : $aSettings;
|
583 |
}
|
584 |
|
585 |
-
/**
|
586 |
-
* @return array
|
587 |
-
* @deprecated
|
588 |
-
*/
|
589 |
-
public function getRestrictedOptions() {
|
590 |
-
$aOptions = $this->getDef( 'options_to_restrict' );
|
591 |
-
return is_array( $aOptions ) ? $aOptions : [];
|
592 |
-
}
|
593 |
-
|
594 |
/**
|
595 |
* TODO: Bug where if $sType is defined, it'll be set to 'wp' anyway
|
596 |
* @param string $sType - wp or wpms
|
597 |
* @return array
|
598 |
-
* @deprecated
|
599 |
*/
|
600 |
public function getOptionsToRestrict( $sType = '' ) {
|
601 |
$sType = empty( $sType ) ? ( Services::WpGeneral()->isMultisite() ? 'wpms' : 'wp' ) : 'wp';
|
@@ -604,21 +567,19 @@ class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureH
|
|
604 |
}
|
605 |
|
606 |
/**
|
607 |
-
* @param string $sType - wp or wpms
|
608 |
* @return array
|
609 |
-
* @deprecated
|
610 |
*/
|
611 |
-
public function
|
612 |
-
$
|
613 |
-
$aOptions
|
614 |
-
return ( isset( $aOptions[ $sType.'_pages' ] ) && is_array( $aOptions[ $sType.'_pages' ] ) ) ? $aOptions[ $sType.'_pages' ] : [];
|
615 |
}
|
616 |
|
617 |
/**
|
618 |
* @return bool
|
619 |
-
* @deprecated
|
620 |
*/
|
621 |
-
public function
|
622 |
-
return $this->
|
623 |
}
|
624 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
class ICWP_WPSF_FeatureHandler_AdminAccessRestriction extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
35 |
return ( is_array( $aU ) && $this->isPremium() ) ? $aU : [];
|
36 |
}
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
/**
|
39 |
* @return bool
|
40 |
*/
|
52 |
return !empty( $sUser ) && in_array( $sUser, $this->getSecurityAdminUsers() );
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
*/
|
57 |
protected function doExtraSubmitProcessing() {
|
66 |
'wl_dashboardlogourl',
|
67 |
'wl_login2fa_logourl',
|
68 |
];
|
69 |
+
$oOpts = $this->getOptions();
|
70 |
foreach ( $aImages as $sKey ) {
|
71 |
if ( !Services::Data()->isValidWebUrl( $this->buildWlImageUrl( $sKey ) ) ) {
|
72 |
$oOpts->resetOptToDefault( $sKey );
|
222 |
* @return bool
|
223 |
*/
|
224 |
public function verifyAccessKey( $sKey ) {
|
225 |
+
/** @var SecurityAdmin\Options $oOpts */
|
226 |
+
$oOpts = $this->getOptions();
|
227 |
+
return !empty( $sKey ) && hash_equals( $oOpts->getAccessKeyHash(), md5( $sKey ) );
|
228 |
}
|
229 |
|
230 |
/**
|
258 |
* @return string
|
259 |
*/
|
260 |
private function buildWlImageUrl( $sKey ) {
|
261 |
+
$oOpts = $this->getOptions();
|
262 |
|
263 |
$sLogoUrl = $this->getOpt( $sKey );
|
264 |
if ( empty( $sLogoUrl ) ) {
|
280 |
* @return bool
|
281 |
*/
|
282 |
public function isWlEnabled() {
|
283 |
+
/** @var SecurityAdmin\Options $oOpts */
|
284 |
+
$oOpts = $this->getOptions();
|
285 |
+
return $oOpts->isEnabledWhitelabel() && $this->isPremium();
|
286 |
}
|
287 |
|
288 |
/**
|
306 |
}
|
307 |
|
308 |
$this->setIsMainFeatureEnabled( true )
|
309 |
+
->setOpt( 'admin_access_key', md5( $sKey ) );
|
310 |
+
return $this->saveModOptions();
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
343 |
* @return array
|
344 |
*/
|
345 |
public function addInsightsConfigData( $aAllData ) {
|
346 |
+
/** @var SecurityAdmin\Options $oOpts */
|
347 |
+
$oOpts = $this->getOptions();
|
348 |
+
|
349 |
$aThis = [
|
350 |
'strings' => [
|
351 |
'title' => __( 'Security Admin', 'wp-simple-firewall' ),
|
370 |
'href' => $this->getUrl_DirectLinkToOption( 'admin_access_key' ),
|
371 |
];
|
372 |
|
373 |
+
$bWpOpts = $oOpts->getAdminAccessArea_Options();
|
374 |
$aThis[ 'key_opts' ][ 'wpopts' ] = [
|
375 |
'name' => __( 'Important Options', 'wp-simple-firewall' ),
|
376 |
'enabled' => $bWpOpts,
|
381 |
'href' => $this->getUrl_DirectLinkToOption( 'admin_access_restrict_options' ),
|
382 |
];
|
383 |
|
384 |
+
$bUsers = $oOpts->isSecAdminRestrictUsersEnabled();
|
385 |
$aThis[ 'key_opts' ][ 'adminusers' ] = [
|
386 |
'name' => __( 'WP Admins', 'wp-simple-firewall' ),
|
387 |
'enabled' => $bUsers,
|
440 |
* This is the point where you would want to do any options verification
|
441 |
*/
|
442 |
protected function doPrePluginOptionsSave() {
|
443 |
+
/** @var SecurityAdmin\Options $oOpts */
|
444 |
+
$oOpts = $this->getOptions();
|
445 |
|
446 |
+
if ( hash_equals( $oOpts->getAccessKeyHash(), self::HASH_DELETE ) ) {
|
447 |
+
$oOpts->clearSecurityAdminKey();
|
448 |
+
$this->setSecurityAdminStatusOnOff( false );
|
449 |
}
|
450 |
|
451 |
// Restricting Activate Plugins also means restricting the rest.
|
452 |
+
$aPluginsRestrictions = $oOpts->getAdminAccessArea_Plugins();
|
453 |
if ( in_array( 'activate_plugins', $aPluginsRestrictions ) ) {
|
454 |
+
$oOpts->setOpt(
|
455 |
'admin_access_restrict_plugins',
|
456 |
array_unique( array_merge( $aPluginsRestrictions, [
|
457 |
'install_plugins',
|
462 |
}
|
463 |
|
464 |
// Restricting Switch (Activate) Themes also means restricting the rest.
|
465 |
+
$aThemesRestrictions = $oOpts->getAdminAccessArea_Themes();
|
466 |
if ( in_array( 'switch_themes', $aThemesRestrictions ) && in_array( 'edit_theme_options', $aThemesRestrictions ) ) {
|
467 |
+
$oOpts->setOpt(
|
468 |
'admin_access_restrict_themes',
|
469 |
array_unique( array_merge( $aThemesRestrictions, [
|
470 |
'install_themes',
|
474 |
);
|
475 |
}
|
476 |
|
477 |
+
$aPostRestrictions = $oOpts->getAdminAccessArea_Posts();
|
478 |
if ( in_array( 'edit', $aPostRestrictions ) ) {
|
479 |
+
$oOpts->setOpt(
|
480 |
'admin_access_restrict_posts',
|
481 |
array_unique( array_merge( $aPostRestrictions, [ 'create', 'publish', 'delete' ] ) )
|
482 |
);
|
486 |
/**
|
487 |
*/
|
488 |
public function preDeactivatePlugin() {
|
489 |
+
if ( !$this->getCon()->isPluginAdmin() ) {
|
|
|
490 |
Services::WpGeneral()->wpDie(
|
491 |
__( "Sorry, this plugin is protected against unauthorised attempts to disable it.", 'wp-simple-firewall' )
|
492 |
.'<br />'.sprintf( '<a href="%s">%s</a>',
|
498 |
}
|
499 |
|
500 |
/**
|
501 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
*/
|
503 |
+
protected function getNamespaceBase() {
|
504 |
+
return 'SecurityAdmin';
|
505 |
}
|
506 |
|
507 |
/**
|
508 |
* @return string
|
509 |
+
* @deprecated 8.1
|
510 |
*/
|
511 |
protected function getAccessKeyHash() {
|
512 |
return $this->getOpt( 'admin_access_key' );
|
514 |
|
515 |
/**
|
516 |
* @return bool
|
517 |
+
* @deprecated 8.1
|
518 |
*/
|
519 |
public function getAdminAccessArea_Options() {
|
520 |
return $this->isOpt( 'admin_access_restrict_options', 'Y' );
|
522 |
|
523 |
/**
|
524 |
* @return array
|
525 |
+
* @deprecated 8.1
|
526 |
*/
|
527 |
public function getAdminAccessArea_Plugins() {
|
528 |
return $this->getAdminAccessArea( 'plugins' );
|
530 |
|
531 |
/**
|
532 |
* @return array
|
533 |
+
* @deprecated 8.1
|
534 |
*/
|
535 |
public function getAdminAccessArea_Themes() {
|
536 |
return $this->getAdminAccessArea( 'themes' );
|
538 |
|
539 |
/**
|
540 |
* @return array
|
541 |
+
* @deprecated 8.1
|
542 |
*/
|
543 |
public function getAdminAccessArea_Posts() {
|
544 |
return $this->getAdminAccessArea( 'posts' );
|
547 |
/**
|
548 |
* @param string $sArea one of plugins, themes
|
549 |
* @return array
|
550 |
+
* @deprecated 8.1
|
551 |
*/
|
552 |
public function getAdminAccessArea( $sArea = 'plugins' ) {
|
553 |
$aSettings = $this->getOpt( 'admin_access_restrict_'.$sArea, [] );
|
554 |
return !is_array( $aSettings ) ? [] : $aSettings;
|
555 |
}
|
556 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
/**
|
558 |
* TODO: Bug where if $sType is defined, it'll be set to 'wp' anyway
|
559 |
* @param string $sType - wp or wpms
|
560 |
* @return array
|
561 |
+
* @deprecated 8.1
|
562 |
*/
|
563 |
public function getOptionsToRestrict( $sType = '' ) {
|
564 |
$sType = empty( $sType ) ? ( Services::WpGeneral()->isMultisite() ? 'wpms' : 'wp' ) : 'wp';
|
567 |
}
|
568 |
|
569 |
/**
|
|
|
570 |
* @return array
|
571 |
+
* @deprecated 8.1
|
572 |
*/
|
573 |
+
public function getRestrictedOptions() {
|
574 |
+
$aOptions = $this->getDef( 'options_to_restrict' );
|
575 |
+
return is_array( $aOptions ) ? $aOptions : [];
|
|
|
576 |
}
|
577 |
|
578 |
/**
|
579 |
* @return bool
|
580 |
+
* @deprecated 8.1
|
581 |
*/
|
582 |
+
public function isAdminAccessAdminUsersEnabled() {
|
583 |
+
return $this->isOpt( 'admin_access_restrict_admin_users', 'Y' );
|
584 |
}
|
585 |
}
|
src/features/audit_trail.php
CHANGED
@@ -1,15 +1,19 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
8 |
/**
|
9 |
* @return int
|
|
|
10 |
*/
|
11 |
public function getMaxEntries() {
|
12 |
-
|
|
|
|
|
13 |
}
|
14 |
|
15 |
/**
|
@@ -28,13 +32,6 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
28 |
];
|
29 |
}
|
30 |
|
31 |
-
/**
|
32 |
-
* @return ICWP_WPSF_FeatureHandler_AuditTrail
|
33 |
-
*/
|
34 |
-
public function updateCTLastSnapshotAt() {
|
35 |
-
return $this->setOptAt( 'ct_last_snapshot_at' );
|
36 |
-
}
|
37 |
-
|
38 |
/**
|
39 |
* See plugin controller for the nature of $aData wpPrivacyExport()
|
40 |
*
|
@@ -108,6 +105,9 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
108 |
* @return array
|
109 |
*/
|
110 |
public function addInsightsConfigData( $aAllData ) {
|
|
|
|
|
|
|
111 |
$aThis = [
|
112 |
'strings' => [
|
113 |
'title' => __( 'Activity Audit Log', 'wp-simple-firewall' ),
|
@@ -123,12 +123,12 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
123 |
else {
|
124 |
$aAudit = [];
|
125 |
$aNonAudit = [];
|
126 |
-
$
|
127 |
-
$
|
128 |
-
$
|
129 |
-
$
|
130 |
-
$
|
131 |
-
$
|
132 |
$this->isAuditWp() ? $aAudit[] = 'WP' : $aNonAudit[] = 'WP';
|
133 |
|
134 |
if ( empty( $aNonAudit ) ) {
|
@@ -162,7 +162,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
162 |
$aThis[ 'key_opts' ][ 'length' ] = [
|
163 |
'name' => __( 'Audit Trail', 'wp-simple-firewall' ),
|
164 |
'enabled' => true,
|
165 |
-
'summary' => sprintf( __( 'Maximum Audit Trail entries limited to %s', 'wp-simple-firewall' ), $
|
166 |
'weight' => 0,
|
167 |
'href' => $this->getUrl_DirectLinkToOption( 'audit_trail_max_entries' ),
|
168 |
];
|
@@ -172,13 +172,6 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
172 |
return $aAllData;
|
173 |
}
|
174 |
|
175 |
-
/**
|
176 |
-
* @return Shield\Modules\AuditTrail\AjaxHandler
|
177 |
-
*/
|
178 |
-
protected function loadAjaxHandler() {
|
179 |
-
return new Shield\Modules\AuditTrail\AjaxHandler;
|
180 |
-
}
|
181 |
-
|
182 |
/**
|
183 |
* @return Shield\Databases\AuditTrail\Handler
|
184 |
*/
|
@@ -187,84 +180,15 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
187 |
}
|
188 |
|
189 |
/**
|
190 |
-
* @return
|
191 |
-
*/
|
192 |
-
protected function loadOptions() {
|
193 |
-
return new Shield\Modules\AuditTrail\Options();
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* @return Shield\Modules\AuditTrail\Strings
|
198 |
-
*/
|
199 |
-
protected function loadStrings() {
|
200 |
-
return new Shield\Modules\AuditTrail\Strings();
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* @return bool
|
205 |
-
* @deprecated
|
206 |
-
*/
|
207 |
-
public function isEnabledChangeTracking() {
|
208 |
-
return !$this->isOpt( 'enable_change_tracking', 'disabled' );
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* @return int
|
213 |
-
* @deprecated
|
214 |
-
*/
|
215 |
-
public function getCTSnapshotsPerWeek() {
|
216 |
-
return (int)$this->getOpt( 'ct_snapshots_per_week', 7 );
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* @return int
|
221 |
-
* @deprecated
|
222 |
-
*/
|
223 |
-
public function getCTMaxSnapshots() {
|
224 |
-
return (int)$this->getOpt( 'ct_max_snapshots', 28 );
|
225 |
-
}
|
226 |
-
|
227 |
-
/**
|
228 |
-
* @return int
|
229 |
-
* @deprecated
|
230 |
-
*/
|
231 |
-
public function getCTSnapshotInterval() {
|
232 |
-
return WEEK_IN_SECONDS/$this->getCTSnapshotsPerWeek();
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
* @return int
|
237 |
-
* @deprecated
|
238 |
-
*/
|
239 |
-
public function getCTLastSnapshotAt() {
|
240 |
-
return $this->getOpt( 'ct_last_snapshot_at' );
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* @return bool
|
245 |
-
* @deprecated
|
246 |
-
*/
|
247 |
-
public function isCTSnapshotDue() {
|
248 |
-
return ( Services::Request()->ts() - $this->getCTLastSnapshotAt() > $this->getCTSnapshotInterval() );
|
249 |
-
}
|
250 |
-
|
251 |
-
/**
|
252 |
-
* @return bool
|
253 |
-
* @deprecated
|
254 |
*/
|
255 |
-
|
256 |
-
return
|
257 |
-
|| $this->isAuditPlugins()
|
258 |
-
|| $this->isAuditThemes()
|
259 |
-
|| $this->isAuditPosts()
|
260 |
-
|| $this->isAuditShield()
|
261 |
-
|| $this->isAuditUsers()
|
262 |
-
|| $this->isAuditWp();
|
263 |
}
|
264 |
|
265 |
/**
|
266 |
* @return bool
|
267 |
-
* @deprecated
|
268 |
*/
|
269 |
public function isAuditEmails() {
|
270 |
return $this->isOpt( 'enable_audit_context_emails', 'Y' );
|
@@ -272,7 +196,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
272 |
|
273 |
/**
|
274 |
* @return bool
|
275 |
-
* @deprecated
|
276 |
*/
|
277 |
public function isAuditPlugins() {
|
278 |
return $this->isOpt( 'enable_audit_context_plugins', 'Y' );
|
@@ -280,7 +204,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
280 |
|
281 |
/**
|
282 |
* @return bool
|
283 |
-
* @deprecated
|
284 |
*/
|
285 |
public function isAuditPosts() {
|
286 |
return $this->isOpt( 'enable_audit_context_posts', 'Y' );
|
@@ -288,7 +212,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
288 |
|
289 |
/**
|
290 |
* @return bool
|
291 |
-
* @deprecated
|
292 |
*/
|
293 |
public function isAuditShield() {
|
294 |
return $this->isOpt( 'enable_audit_context_wpsf', 'Y' );
|
@@ -296,7 +220,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
296 |
|
297 |
/**
|
298 |
* @return bool
|
299 |
-
* @deprecated
|
300 |
*/
|
301 |
public function isAuditThemes() {
|
302 |
return $this->isOpt( 'enable_audit_context_themes', 'Y' );
|
@@ -304,7 +228,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
304 |
|
305 |
/**
|
306 |
* @return bool
|
307 |
-
* @deprecated
|
308 |
*/
|
309 |
public function isAuditUsers() {
|
310 |
return $this->isOpt( 'enable_audit_context_users', 'Y' );
|
@@ -312,7 +236,7 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
312 |
|
313 |
/**
|
314 |
* @return bool
|
315 |
-
* @deprecated
|
316 |
*/
|
317 |
public function isAuditWp() {
|
318 |
return $this->isOpt( 'enable_audit_context_wordpress', 'Y' );
|
@@ -320,17 +244,41 @@ class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseW
|
|
320 |
|
321 |
/**
|
322 |
* @return int
|
323 |
-
* @deprecated
|
324 |
*/
|
325 |
-
public function
|
326 |
-
return $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
* @return int
|
331 |
-
* @deprecated
|
332 |
*/
|
333 |
-
public function
|
334 |
-
return
|
335 |
}
|
336 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
class ICWP_WPSF_FeatureHandler_AuditTrail extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
8 |
|
9 |
/**
|
10 |
* @return int
|
11 |
+
* @deprecated 8.1 - TODO: Need to handle isPremium() within Options class
|
12 |
*/
|
13 |
public function getMaxEntries() {
|
14 |
+
/** @var AuditTrail\Options $oOpts */
|
15 |
+
$oOpts = $this->getOptions();
|
16 |
+
return $this->isPremium() ? (int)$oOpts->getOpt( 'audit_trail_max_entries' ) : $oOpts->getDefaultMaxEntries();
|
17 |
}
|
18 |
|
19 |
/**
|
32 |
];
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* See plugin controller for the nature of $aData wpPrivacyExport()
|
37 |
*
|
105 |
* @return array
|
106 |
*/
|
107 |
public function addInsightsConfigData( $aAllData ) {
|
108 |
+
/** @var AuditTrail\Options $oOpts */
|
109 |
+
$oOpts = $this->getOptions();
|
110 |
+
|
111 |
$aThis = [
|
112 |
'strings' => [
|
113 |
'title' => __( 'Activity Audit Log', 'wp-simple-firewall' ),
|
123 |
else {
|
124 |
$aAudit = [];
|
125 |
$aNonAudit = [];
|
126 |
+
$oOpts->isAuditShield() ? $aAudit[] = 'Shield' : $aNonAudit[] = 'Shield';
|
127 |
+
$oOpts->isAuditUsers() ? $aAudit[] = __( 'users', 'wp-simple-firewall' ) : $aNonAudit[] = __( 'users', 'wp-simple-firewall' );
|
128 |
+
$oOpts->isAuditPlugins() ? $aAudit[] = __( 'plugins', 'wp-simple-firewall' ) : $aNonAudit[] = __( 'plugins', 'wp-simple-firewall' );
|
129 |
+
$oOpts->isAuditThemes() ? $aAudit[] = __( 'themes', 'wp-simple-firewall' ) : $aNonAudit[] = __( 'themes', 'wp-simple-firewall' );
|
130 |
+
$oOpts->isAuditPosts() ? $aAudit[] = __( 'posts', 'wp-simple-firewall' ) : $aNonAudit[] = __( 'posts', 'wp-simple-firewall' );
|
131 |
+
$oOpts->isAuditEmails() ? $aAudit[] = __( 'emails', 'wp-simple-firewall' ) : $aNonAudit[] = __( 'emails', 'wp-simple-firewall' );
|
132 |
$this->isAuditWp() ? $aAudit[] = 'WP' : $aNonAudit[] = 'WP';
|
133 |
|
134 |
if ( empty( $aNonAudit ) ) {
|
162 |
$aThis[ 'key_opts' ][ 'length' ] = [
|
163 |
'name' => __( 'Audit Trail', 'wp-simple-firewall' ),
|
164 |
'enabled' => true,
|
165 |
+
'summary' => sprintf( __( 'Maximum Audit Trail entries limited to %s', 'wp-simple-firewall' ), $oOpts->getMaxEntries() ),
|
166 |
'weight' => 0,
|
167 |
'href' => $this->getUrl_DirectLinkToOption( 'audit_trail_max_entries' ),
|
168 |
];
|
172 |
return $aAllData;
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
/**
|
176 |
* @return Shield\Databases\AuditTrail\Handler
|
177 |
*/
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
*/
|
185 |
+
protected function getNamespaceBase() {
|
186 |
+
return 'AuditTrail';
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
|
189 |
/**
|
190 |
* @return bool
|
191 |
+
* @deprecated 8.1
|
192 |
*/
|
193 |
public function isAuditEmails() {
|
194 |
return $this->isOpt( 'enable_audit_context_emails', 'Y' );
|
196 |
|
197 |
/**
|
198 |
* @return bool
|
199 |
+
* @deprecated 8.1
|
200 |
*/
|
201 |
public function isAuditPlugins() {
|
202 |
return $this->isOpt( 'enable_audit_context_plugins', 'Y' );
|
204 |
|
205 |
/**
|
206 |
* @return bool
|
207 |
+
* @deprecated 8.1
|
208 |
*/
|
209 |
public function isAuditPosts() {
|
210 |
return $this->isOpt( 'enable_audit_context_posts', 'Y' );
|
212 |
|
213 |
/**
|
214 |
* @return bool
|
215 |
+
* @deprecated 8.1
|
216 |
*/
|
217 |
public function isAuditShield() {
|
218 |
return $this->isOpt( 'enable_audit_context_wpsf', 'Y' );
|
220 |
|
221 |
/**
|
222 |
* @return bool
|
223 |
+
* @deprecated 8.1
|
224 |
*/
|
225 |
public function isAuditThemes() {
|
226 |
return $this->isOpt( 'enable_audit_context_themes', 'Y' );
|
228 |
|
229 |
/**
|
230 |
* @return bool
|
231 |
+
* @deprecated 8.1
|
232 |
*/
|
233 |
public function isAuditUsers() {
|
234 |
return $this->isOpt( 'enable_audit_context_users', 'Y' );
|
236 |
|
237 |
/**
|
238 |
* @return bool
|
239 |
+
* @deprecated 8.1
|
240 |
*/
|
241 |
public function isAuditWp() {
|
242 |
return $this->isOpt( 'enable_audit_context_wordpress', 'Y' );
|
244 |
|
245 |
/**
|
246 |
* @return int
|
247 |
+
* @deprecated 8.1
|
248 |
*/
|
249 |
+
public function getAutoCleanDays() {
|
250 |
+
return (int)$this->getOpt( 'audit_trail_auto_clean' );
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* @return bool
|
255 |
+
* @deprecated 8.1
|
256 |
+
*/
|
257 |
+
public function isEnabledAuditing() {
|
258 |
+
/** @var AuditTrail\Options $oOpts */
|
259 |
+
$oOpts = $this->getOptions();
|
260 |
+
return $oOpts->isAuditEmails()
|
261 |
+
|| $oOpts->isAuditPlugins()
|
262 |
+
|| $oOpts->isAuditThemes()
|
263 |
+
|| $oOpts->isAuditPosts()
|
264 |
+
|| $oOpts->isAuditShield()
|
265 |
+
|| $oOpts->isAuditUsers()
|
266 |
+
|| $oOpts->isAuditWp();
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* @return bool
|
271 |
+
* @deprecated 8.1
|
272 |
+
*/
|
273 |
+
public function isEnabledChangeTracking() {
|
274 |
+
return !$this->isOpt( 'enable_change_tracking', 'disabled' );
|
275 |
}
|
276 |
|
277 |
/**
|
278 |
* @return int
|
279 |
+
* @deprecated 8.1
|
280 |
*/
|
281 |
+
public function getDefaultMaxEntries() {
|
282 |
+
return $this->getDef( 'audit_trail_default_max_entries' );
|
283 |
}
|
284 |
}
|
src/features/autoupdates.php
CHANGED
@@ -253,23 +253,9 @@ class ICWP_WPSF_FeatureHandler_Autoupdates extends ICWP_WPSF_FeatureHandler_Base
|
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
-
* @return
|
257 |
-
*/
|
258 |
-
protected function loadAjaxHandler() {
|
259 |
-
return new Shield\Modules\Autoupdates\AjaxHandler;
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* @return Shield\Modules\Autoupdates\Options
|
264 |
-
*/
|
265 |
-
protected function loadOptions() {
|
266 |
-
return new Shield\Modules\Autoupdates\Options();
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* @return Shield\Modules\Autoupdates\Strings
|
271 |
*/
|
272 |
-
protected function
|
273 |
-
return
|
274 |
}
|
275 |
}
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
*/
|
258 |
+
protected function getNamespaceBase() {
|
259 |
+
return 'Autoupdates';
|
260 |
}
|
261 |
}
|
src/features/base.php
CHANGED
@@ -7,11 +7,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
7 |
|
8 |
use Shield\Modules\PluginControllerConsumer;
|
9 |
|
10 |
-
/**
|
11 |
-
* @var ICWP_WPSF_OptionsVO
|
12 |
-
*/
|
13 |
-
protected $oOptions;
|
14 |
-
|
15 |
/**
|
16 |
* @var string
|
17 |
*/
|
@@ -47,16 +42,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
47 |
*/
|
48 |
private $oDbh;
|
49 |
|
50 |
-
/**
|
51 |
-
* @var \FernleafSystems\Wordpress\Plugin\Shield\Modules\Base\AjaxHandlerShield
|
52 |
-
*/
|
53 |
-
private $oAjax;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* @var Shield\Modules\Base\AdminNotices
|
57 |
-
*/
|
58 |
-
private $oAdminNotices;
|
59 |
-
|
60 |
/**
|
61 |
* @var Shield\Modules\Base\Strings
|
62 |
*/
|
@@ -109,7 +94,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
109 |
if ( $this->isModuleRequest() ) {
|
110 |
|
111 |
if ( Services::WpGeneral()->isAjax() ) {
|
112 |
-
$this->
|
113 |
}
|
114 |
|
115 |
if ( $oReq->request( 'action' ) == $this->prefix()
|
@@ -143,7 +128,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
143 |
add_action( 'admin_enqueue_scripts', [ $this, 'onWpEnqueueAdminJs' ], 100 );
|
144 |
|
145 |
if ( is_admin() || is_network_admin() ) {
|
146 |
-
$this->
|
147 |
}
|
148 |
|
149 |
// if ( $this->isAdminOptionsPage() ) {
|
@@ -292,7 +277,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
292 |
if ( !is_array( $aAdminNotices ) ) {
|
293 |
$aAdminNotices = [];
|
294 |
}
|
295 |
-
return array_merge( $aAdminNotices, $this->
|
296 |
}
|
297 |
|
298 |
/**
|
@@ -301,7 +286,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
301 |
private function verifyModuleMeetRequirements() {
|
302 |
$bMeetsReqs = true;
|
303 |
|
304 |
-
$aPhpReqs = $this->
|
305 |
if ( !empty( $aPhpReqs ) ) {
|
306 |
|
307 |
if ( !empty( $aPhpReqs[ 'version' ] ) ) {
|
@@ -328,7 +313,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
328 |
if ( $this->isUpgrading() ) {
|
329 |
$this->updateHandler();
|
330 |
}
|
331 |
-
if ( $this->
|
332 |
$this->loadProcessor();
|
333 |
}
|
334 |
if ( !$this->isUpgrading() && $this->isModuleEnabled() && $this->isReadyToExecute() ) {
|
@@ -341,23 +326,31 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
341 |
*/
|
342 |
public function processImportOptions( $aOptions ) {
|
343 |
if ( !empty( $aOptions ) && is_array( $aOptions ) && array_key_exists( $this->getOptionsStorageKey(), $aOptions ) ) {
|
344 |
-
$this->
|
345 |
->setMultipleOptions( $aOptions[ $this->getOptionsStorageKey() ] );
|
346 |
-
$this->
|
347 |
}
|
348 |
}
|
349 |
|
350 |
/**
|
351 |
* Used to effect certain processing that is to do with options etc. but isn't related to processing
|
352 |
* functionality of the plugin.
|
|
|
353 |
*/
|
354 |
protected function isReadyToExecute() {
|
355 |
-
|
356 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
}
|
358 |
|
359 |
protected function doExecuteProcessor() {
|
360 |
-
$this->getProcessor()->
|
361 |
}
|
362 |
|
363 |
/**
|
@@ -394,7 +387,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
394 |
|
395 |
/**
|
396 |
* Override this and adapt per feature
|
397 |
-
* @return
|
398 |
*/
|
399 |
protected function loadProcessor() {
|
400 |
if ( !isset( $this->oProcessor ) ) {
|
@@ -435,21 +428,11 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
435 |
);
|
436 |
}
|
437 |
|
438 |
-
/**
|
439 |
-
* @return \ICWP_WPSF_OptionsVO
|
440 |
-
*/
|
441 |
-
public function getOptionsVo() {
|
442 |
-
if ( !isset( $this->oOptions ) ) {
|
443 |
-
$this->oOptions = $this->getOptions();
|
444 |
-
}
|
445 |
-
return $this->oOptions;
|
446 |
-
}
|
447 |
-
|
448 |
/**
|
449 |
* @return bool
|
450 |
*/
|
451 |
public function isUpgrading() {
|
452 |
-
return $this->getCon()->getIsRebuildOptionsFromFile() || $this->
|
453 |
}
|
454 |
|
455 |
/**
|
@@ -461,7 +444,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
461 |
// cleanup databases randomly just in-case cron doesn't run.
|
462 |
$this->cleanupDatabases();
|
463 |
}
|
464 |
-
$this->
|
465 |
}
|
466 |
}
|
467 |
|
@@ -473,7 +456,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
473 |
}
|
474 |
|
475 |
/**
|
476 |
-
* @return
|
477 |
*/
|
478 |
public function getProcessor() {
|
479 |
return $this->loadProcessor();
|
@@ -496,7 +479,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
496 |
*/
|
497 |
protected function getUrl_DirectLinkToOption( $sOptKey ) {
|
498 |
$sUrl = $this->getUrl_AdminPage();
|
499 |
-
$aDef = $this->
|
500 |
if ( !empty( $aDef[ 'section' ] ) ) {
|
501 |
$sUrl = $this->getUrl_DirectLinkToSection( $aDef[ 'section' ] );
|
502 |
}
|
@@ -509,7 +492,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
509 |
*/
|
510 |
public function getUrl_DirectLinkToSection( $sSection ) {
|
511 |
if ( $sSection == 'primary' ) {
|
512 |
-
$aSec = $this->
|
513 |
$sSection = $aSec[ 'slug' ];
|
514 |
}
|
515 |
return $this->getUrl_AdminPage().'#tab-'.$sSection;
|
@@ -546,9 +529,9 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
546 |
* @return bool
|
547 |
*/
|
548 |
public function isModuleEnabled() {
|
549 |
-
$oOpts = $this->
|
550 |
|
551 |
-
if ( $this->
|
552 |
// Auto enabled modules always run regardless
|
553 |
$bEnabled = true;
|
554 |
}
|
@@ -587,7 +570,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
587 |
* @return string
|
588 |
*/
|
589 |
public function getMainFeatureName() {
|
590 |
-
return __( $this->
|
591 |
}
|
592 |
|
593 |
/**
|
@@ -603,7 +586,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
603 |
*/
|
604 |
public function getSlug() {
|
605 |
if ( !isset( $this->sModSlug ) ) {
|
606 |
-
$this->sModSlug = $this->
|
607 |
}
|
608 |
return $this->sModSlug;
|
609 |
}
|
@@ -614,14 +597,14 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
614 |
*/
|
615 |
public function supplySubMenuItem( $aItems ) {
|
616 |
|
617 |
-
$sTitle = $this->
|
618 |
$sTitle = empty( $sTitle ) ? $this->getMainFeatureName() : __( $sTitle, 'wp-simple-firewall' );
|
619 |
|
620 |
if ( !empty( $sTitle ) ) {
|
621 |
|
622 |
$sHumanName = $this->getCon()->getHumanName();
|
623 |
|
624 |
-
$bMenuHighlighted = $this->
|
625 |
if ( $bMenuHighlighted ) {
|
626 |
$sTitle = sprintf( '<span class="icwp_highlighted">%s</span>', $sTitle );
|
627 |
}
|
@@ -634,7 +617,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
634 |
$this->getIfShowModuleMenuItem()
|
635 |
];
|
636 |
|
637 |
-
$aAdditionalItems = $this->
|
638 |
if ( !empty( $aAdditionalItems ) && is_array( $aAdditionalItems ) ) {
|
639 |
|
640 |
foreach ( $aAdditionalItems as $aMenuItem ) {
|
@@ -693,7 +676,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
693 |
* @return array
|
694 |
*/
|
695 |
protected function buildSummaryData() {
|
696 |
-
$oOptsVo = $this->
|
697 |
$sMenuTitle = $oOptsVo->getFeatureProperty( 'menu_title' );
|
698 |
|
699 |
$aSections = $oOptsVo->getSections();
|
@@ -750,21 +733,21 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
750 |
* @return boolean
|
751 |
*/
|
752 |
public function getIfShowModuleMenuItem() {
|
753 |
-
return (bool)$this->
|
754 |
}
|
755 |
|
756 |
/**
|
757 |
* @return boolean
|
758 |
*/
|
759 |
public function getIfShowModuleLink() {
|
760 |
-
return (bool)$this->
|
761 |
}
|
762 |
|
763 |
/**
|
764 |
* @return boolean
|
765 |
*/
|
766 |
public function getIfUseSessions() {
|
767 |
-
return $this->
|
768 |
}
|
769 |
|
770 |
/**
|
@@ -773,7 +756,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
773 |
* @return mixed|null
|
774 |
*/
|
775 |
public function getDef( $sKey ) {
|
776 |
-
return $this->
|
777 |
}
|
778 |
|
779 |
/**
|
@@ -809,7 +792,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
809 |
* @return mixed
|
810 |
*/
|
811 |
public function getOpt( $sOptionKey, $mDefault = false ) {
|
812 |
-
return $this->
|
813 |
}
|
814 |
|
815 |
/**
|
@@ -819,7 +802,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
819 |
* @return bool
|
820 |
*/
|
821 |
public function isOpt( $sOptionKey, $mValueToTest, $bStrict = false ) {
|
822 |
-
$mOptionValue = $this->
|
823 |
return $bStrict ? $mOptionValue === $mValueToTest : $mOptionValue == $mValueToTest;
|
824 |
}
|
825 |
|
@@ -868,7 +851,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
868 |
* @return $this
|
869 |
*/
|
870 |
protected function setOpt( $sOptionKey, $mValue ) {
|
871 |
-
$this->
|
872 |
return $this;
|
873 |
}
|
874 |
|
@@ -876,7 +859,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
876 |
* @param array $aOptions
|
877 |
*/
|
878 |
public function setOptions( $aOptions ) {
|
879 |
-
$oVO = $this->
|
880 |
foreach ( $aOptions as $sKey => $mValue ) {
|
881 |
$oVO->setOpt( $sKey, $mValue );
|
882 |
}
|
@@ -918,7 +901,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
918 |
return is_array( $aDN ) ? $aDN : [];
|
919 |
}
|
920 |
|
921 |
-
|
922 |
/**
|
923 |
* @return string[]
|
924 |
*/
|
@@ -934,6 +916,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
934 |
public function setDismissedNotices( $aDismissed ) {
|
935 |
return $this->setOpt( 'dismissed_notices', $aDismissed );
|
936 |
}
|
|
|
937 |
/**
|
938 |
* @param string[] $aDismissed
|
939 |
* @return $this
|
@@ -959,24 +942,32 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
959 |
|
960 |
/**
|
961 |
* Saves the options to the WordPress Options store.
|
962 |
-
* It will also update the stored plugin options version.
|
963 |
* @return void
|
|
|
964 |
*/
|
965 |
public function savePluginOptions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
$this->doPrePluginOptionsSave();
|
967 |
if ( apply_filters( $this->prefix( 'force_options_resave' ), false ) ) {
|
968 |
-
$this->
|
969 |
->setNeedSave( true );
|
970 |
}
|
971 |
|
972 |
// we set the flag that options have been updated. (only use this flag if it's a MANUAL options update)
|
973 |
-
$this->bImportExportWhitelistNotify = $this->
|
974 |
$this->store();
|
|
|
975 |
}
|
976 |
|
977 |
private function store() {
|
978 |
add_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
979 |
-
$this->
|
980 |
->doOptionsSave( $this->getCon()->getIsResetPlugin(), $this->isPremium() );
|
981 |
remove_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
982 |
}
|
@@ -986,7 +977,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
986 |
* @return array
|
987 |
*/
|
988 |
public function aggregateOptionsValues( $aAggregatedOptions ) {
|
989 |
-
return array_merge( $aAggregatedOptions, $this->
|
990 |
}
|
991 |
|
992 |
/**
|
@@ -999,7 +990,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
999 |
|
1000 |
$bPremiumEnabled = $this->getCon()->isPremiumExtensionsEnabled();
|
1001 |
|
1002 |
-
$oOptsVo = $this->
|
1003 |
$aOptions = $oOptsVo->getOptionsForPluginUse();
|
1004 |
|
1005 |
foreach ( $aOptions as $nSectionKey => $aSection ) {
|
@@ -1239,7 +1230,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1239 |
*/
|
1240 |
protected function resetPremiumOptions() {
|
1241 |
if ( !$this->isPremium() ) {
|
1242 |
-
$this->
|
1243 |
}
|
1244 |
}
|
1245 |
|
@@ -1304,7 +1295,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1304 |
}
|
1305 |
}
|
1306 |
|
1307 |
-
$this->
|
1308 |
|
1309 |
// only use this flag when the options are being updated with a MANUAL save.
|
1310 |
if ( isset( $this->bImportExportWhitelistNotify ) && $this->bImportExportWhitelistNotify ) {
|
@@ -1437,7 +1428,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1437 |
|
1438 |
return [
|
1439 |
'sPluginName' => $oCon->getHumanName(),
|
1440 |
-
'sTagline' => $this->
|
1441 |
'nonce_field' => wp_nonce_field( $oCon->getPluginPrefix(), '_wpnonce', true, false ), //don't echo!
|
1442 |
'form_action' => 'admin.php?page='.$this->getModSlug(),
|
1443 |
'aPluginLabels' => $oCon->getLabels(),
|
@@ -1459,7 +1450,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1459 |
'mod_slug' => $this->getModSlug( true ),
|
1460 |
'mod_slug_short' => $this->getModSlug( false ),
|
1461 |
'all_options' => $this->buildOptions(),
|
1462 |
-
'hidden_options' => $this->
|
1463 |
],
|
1464 |
'ajax' => [
|
1465 |
'mod_options' => $this->getAjaxActionData( 'mod_options' ),
|
@@ -1640,7 +1631,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1640 |
* @return bool
|
1641 |
*/
|
1642 |
protected function canDisplayOptionsForm() {
|
1643 |
-
return $this->
|
1644 |
}
|
1645 |
|
1646 |
public function onWpEnqueueAdminJs() {
|
@@ -1745,7 +1736,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1745 |
if ( !is_array( $aTransferableOptions ) ) {
|
1746 |
$aTransferableOptions = [];
|
1747 |
}
|
1748 |
-
$aTransferableOptions[ $this->getOptionsStorageKey() ] = $this->
|
1749 |
return $aTransferableOptions;
|
1750 |
}
|
1751 |
|
@@ -1753,8 +1744,8 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1753 |
* @return array
|
1754 |
*/
|
1755 |
public function collectOptionsForTracking() {
|
1756 |
-
$oVO = $this->
|
1757 |
-
$aOptionsData = $this->
|
1758 |
foreach ( $aOptionsData as $sOption => $mValue ) {
|
1759 |
unset( $aOptionsData[ $sOption ] );
|
1760 |
// some cleaning to ensure we don't have disallowed characters
|
@@ -1870,6 +1861,7 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1870 |
* @param string $sOpt
|
1871 |
* @param int $nAt
|
1872 |
* @return $this
|
|
|
1873 |
*/
|
1874 |
protected function setOptAt( $sOpt, $nAt = null ) {
|
1875 |
$nAt = is_null( $nAt ) ? Services::Request()->ts() : max( 0, (int)$nAt );
|
@@ -1916,26 +1908,6 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1916 |
return $this->oDbh;
|
1917 |
}
|
1918 |
|
1919 |
-
/**
|
1920 |
-
* @return Shield\Modules\Base\AdminNotices
|
1921 |
-
*/
|
1922 |
-
private function getAdminNotices() {
|
1923 |
-
if ( !isset( $this->oAdminNotices ) ) {
|
1924 |
-
$this->oAdminNotices = $this->loadAdminNotices()->setMod( $this );
|
1925 |
-
}
|
1926 |
-
return $this->oAdminNotices;
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
/**
|
1930 |
-
* @return Shield\Modules\Base\AjaxHandlerShield
|
1931 |
-
*/
|
1932 |
-
private function getAjax() {
|
1933 |
-
if ( !isset( $this->oAjax ) ) {
|
1934 |
-
$this->oAjax = $this->loadAjaxHandler()->setMod( $this );
|
1935 |
-
}
|
1936 |
-
return $this->oAjax;
|
1937 |
-
}
|
1938 |
-
|
1939 |
/**
|
1940 |
* @return null|Shield\Modules\Base\Strings
|
1941 |
*/
|
@@ -1947,79 +1919,85 @@ abstract class ICWP_WPSF_FeatureHandler_Base extends Shield\Deprecated\Foundatio
|
|
1947 |
}
|
1948 |
|
1949 |
/**
|
1950 |
-
* @return Shield\
|
1951 |
*/
|
1952 |
-
protected function
|
1953 |
-
return
|
1954 |
}
|
1955 |
|
1956 |
/**
|
1957 |
-
* @return
|
1958 |
*/
|
1959 |
-
protected function
|
1960 |
-
|
|
|
|
|
|
|
|
|
1961 |
}
|
1962 |
|
1963 |
/**
|
1964 |
-
* @return
|
1965 |
*/
|
1966 |
protected function loadAjaxHandler() {
|
1967 |
-
|
|
|
|
|
|
|
|
|
|
|
1968 |
}
|
1969 |
|
1970 |
/**
|
1971 |
* @return Shield\Modules\Base\ShieldOptions|mixed
|
1972 |
*/
|
1973 |
protected function loadOptions() {
|
1974 |
-
return
|
1975 |
}
|
1976 |
|
1977 |
/**
|
1978 |
* @return Shield\Modules\Base\Strings|mixed
|
1979 |
*/
|
1980 |
protected function loadStrings() {
|
1981 |
-
return
|
1982 |
}
|
1983 |
|
1984 |
/**
|
1985 |
-
* @
|
1986 |
-
* @
|
1987 |
*/
|
1988 |
-
|
1989 |
-
|
|
|
1990 |
}
|
1991 |
|
1992 |
/**
|
1993 |
-
* @
|
1994 |
-
* @return $this
|
1995 |
-
* @deprecated 7.5
|
1996 |
*/
|
1997 |
-
|
1998 |
-
return
|
1999 |
}
|
2000 |
|
2001 |
/**
|
2002 |
-
*
|
|
|
2003 |
*/
|
2004 |
-
|
2005 |
-
|
2006 |
}
|
2007 |
|
2008 |
/**
|
2009 |
-
*
|
2010 |
-
* @
|
2011 |
-
* @return string
|
2012 |
-
* @deprecated
|
2013 |
*/
|
2014 |
-
public function
|
2015 |
-
return $this->
|
2016 |
}
|
2017 |
|
2018 |
/**
|
2019 |
-
* @
|
2020 |
-
* @deprecated 8
|
2021 |
*/
|
2022 |
-
|
2023 |
-
|
2024 |
}
|
2025 |
}
|
7 |
|
8 |
use Shield\Modules\PluginControllerConsumer;
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* @var string
|
12 |
*/
|
42 |
*/
|
43 |
private $oDbh;
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* @var Shield\Modules\Base\Strings
|
47 |
*/
|
94 |
if ( $this->isModuleRequest() ) {
|
95 |
|
96 |
if ( Services::WpGeneral()->isAjax() ) {
|
97 |
+
$this->loadAjaxHandler();
|
98 |
}
|
99 |
|
100 |
if ( $oReq->request( 'action' ) == $this->prefix()
|
128 |
add_action( 'admin_enqueue_scripts', [ $this, 'onWpEnqueueAdminJs' ], 100 );
|
129 |
|
130 |
if ( is_admin() || is_network_admin() ) {
|
131 |
+
$this->loadAdminNotices();
|
132 |
}
|
133 |
|
134 |
// if ( $this->isAdminOptionsPage() ) {
|
277 |
if ( !is_array( $aAdminNotices ) ) {
|
278 |
$aAdminNotices = [];
|
279 |
}
|
280 |
+
return array_merge( $aAdminNotices, $this->getOptions()->getAdminNotices() );
|
281 |
}
|
282 |
|
283 |
/**
|
286 |
private function verifyModuleMeetRequirements() {
|
287 |
$bMeetsReqs = true;
|
288 |
|
289 |
+
$aPhpReqs = $this->getOptions()->getFeatureRequirement( 'php' );
|
290 |
if ( !empty( $aPhpReqs ) ) {
|
291 |
|
292 |
if ( !empty( $aPhpReqs[ 'version' ] ) ) {
|
313 |
if ( $this->isUpgrading() ) {
|
314 |
$this->updateHandler();
|
315 |
}
|
316 |
+
if ( $this->getOptions()->getFeatureProperty( 'auto_load_processor' ) ) {
|
317 |
$this->loadProcessor();
|
318 |
}
|
319 |
if ( !$this->isUpgrading() && $this->isModuleEnabled() && $this->isReadyToExecute() ) {
|
326 |
*/
|
327 |
public function processImportOptions( $aOptions ) {
|
328 |
if ( !empty( $aOptions ) && is_array( $aOptions ) && array_key_exists( $this->getOptionsStorageKey(), $aOptions ) ) {
|
329 |
+
$this->getOptions()
|
330 |
->setMultipleOptions( $aOptions[ $this->getOptionsStorageKey() ] );
|
331 |
+
$this->saveModOptions();
|
332 |
}
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
* Used to effect certain processing that is to do with options etc. but isn't related to processing
|
337 |
* functionality of the plugin.
|
338 |
+
* @return bool
|
339 |
*/
|
340 |
protected function isReadyToExecute() {
|
341 |
+
try {
|
342 |
+
$oDbH = $this->getDbHandler();
|
343 |
+
$bReady = ( $this->getProcessor() instanceof Shield\Modules\Base\BaseProcessor )
|
344 |
+
&& ( !$oDbH instanceof Shield\Databases\Base\Handler || $oDbH->isReady() );
|
345 |
+
}
|
346 |
+
catch ( \Exception $oE ) {
|
347 |
+
$bReady = false;
|
348 |
+
}
|
349 |
+
return $bReady;
|
350 |
}
|
351 |
|
352 |
protected function doExecuteProcessor() {
|
353 |
+
$this->getProcessor()->execute();
|
354 |
}
|
355 |
|
356 |
/**
|
387 |
|
388 |
/**
|
389 |
* Override this and adapt per feature
|
390 |
+
* @return Shield\Modules\Base\BaseProcessor|mixed
|
391 |
*/
|
392 |
protected function loadProcessor() {
|
393 |
if ( !isset( $this->oProcessor ) ) {
|
428 |
);
|
429 |
}
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
/**
|
432 |
* @return bool
|
433 |
*/
|
434 |
public function isUpgrading() {
|
435 |
+
return $this->getCon()->getIsRebuildOptionsFromFile() || $this->getOptions()->getRebuildFromFile();
|
436 |
}
|
437 |
|
438 |
/**
|
444 |
// cleanup databases randomly just in-case cron doesn't run.
|
445 |
$this->cleanupDatabases();
|
446 |
}
|
447 |
+
$this->saveModOptions();
|
448 |
}
|
449 |
}
|
450 |
|
456 |
}
|
457 |
|
458 |
/**
|
459 |
+
* @return Shield\Modules\Base\BaseProcessor|mixed
|
460 |
*/
|
461 |
public function getProcessor() {
|
462 |
return $this->loadProcessor();
|
479 |
*/
|
480 |
protected function getUrl_DirectLinkToOption( $sOptKey ) {
|
481 |
$sUrl = $this->getUrl_AdminPage();
|
482 |
+
$aDef = $this->getOptions()->getOptDefinition( $sOptKey );
|
483 |
if ( !empty( $aDef[ 'section' ] ) ) {
|
484 |
$sUrl = $this->getUrl_DirectLinkToSection( $aDef[ 'section' ] );
|
485 |
}
|
492 |
*/
|
493 |
public function getUrl_DirectLinkToSection( $sSection ) {
|
494 |
if ( $sSection == 'primary' ) {
|
495 |
+
$aSec = $this->getOptions()->getPrimarySection();
|
496 |
$sSection = $aSec[ 'slug' ];
|
497 |
}
|
498 |
return $this->getUrl_AdminPage().'#tab-'.$sSection;
|
529 |
* @return bool
|
530 |
*/
|
531 |
public function isModuleEnabled() {
|
532 |
+
$oOpts = $this->getOptions();
|
533 |
|
534 |
+
if ( $this->getOptions()->getFeatureProperty( 'auto_enabled' ) === true ) {
|
535 |
// Auto enabled modules always run regardless
|
536 |
$bEnabled = true;
|
537 |
}
|
570 |
* @return string
|
571 |
*/
|
572 |
public function getMainFeatureName() {
|
573 |
+
return __( $this->getOptions()->getFeatureProperty( 'name' ), 'wp-simple-firewall' );
|
574 |
}
|
575 |
|
576 |
/**
|
586 |
*/
|
587 |
public function getSlug() {
|
588 |
if ( !isset( $this->sModSlug ) ) {
|
589 |
+
$this->sModSlug = $this->getOptions()->getFeatureProperty( 'slug' );
|
590 |
}
|
591 |
return $this->sModSlug;
|
592 |
}
|
597 |
*/
|
598 |
public function supplySubMenuItem( $aItems ) {
|
599 |
|
600 |
+
$sTitle = $this->getOptions()->getFeatureProperty( 'menu_title' );
|
601 |
$sTitle = empty( $sTitle ) ? $this->getMainFeatureName() : __( $sTitle, 'wp-simple-firewall' );
|
602 |
|
603 |
if ( !empty( $sTitle ) ) {
|
604 |
|
605 |
$sHumanName = $this->getCon()->getHumanName();
|
606 |
|
607 |
+
$bMenuHighlighted = $this->getOptions()->getFeatureProperty( 'highlight_menu_item' );
|
608 |
if ( $bMenuHighlighted ) {
|
609 |
$sTitle = sprintf( '<span class="icwp_highlighted">%s</span>', $sTitle );
|
610 |
}
|
617 |
$this->getIfShowModuleMenuItem()
|
618 |
];
|
619 |
|
620 |
+
$aAdditionalItems = $this->getOptions()->getAdditionalMenuItems();
|
621 |
if ( !empty( $aAdditionalItems ) && is_array( $aAdditionalItems ) ) {
|
622 |
|
623 |
foreach ( $aAdditionalItems as $aMenuItem ) {
|
676 |
* @return array
|
677 |
*/
|
678 |
protected function buildSummaryData() {
|
679 |
+
$oOptsVo = $this->getOptions();
|
680 |
$sMenuTitle = $oOptsVo->getFeatureProperty( 'menu_title' );
|
681 |
|
682 |
$aSections = $oOptsVo->getSections();
|
733 |
* @return boolean
|
734 |
*/
|
735 |
public function getIfShowModuleMenuItem() {
|
736 |
+
return (bool)$this->getOptions()->getFeatureProperty( 'show_module_menu_item' );
|
737 |
}
|
738 |
|
739 |
/**
|
740 |
* @return boolean
|
741 |
*/
|
742 |
public function getIfShowModuleLink() {
|
743 |
+
return (bool)$this->getOptions()->getFeatureProperty( 'show_module_options' );
|
744 |
}
|
745 |
|
746 |
/**
|
747 |
* @return boolean
|
748 |
*/
|
749 |
public function getIfUseSessions() {
|
750 |
+
return $this->getOptions()->getFeatureProperty( 'use_sessions' );
|
751 |
}
|
752 |
|
753 |
/**
|
756 |
* @return mixed|null
|
757 |
*/
|
758 |
public function getDef( $sKey ) {
|
759 |
+
return $this->getOptions()->getDef( $sKey );
|
760 |
}
|
761 |
|
762 |
/**
|
792 |
* @return mixed
|
793 |
*/
|
794 |
public function getOpt( $sOptionKey, $mDefault = false ) {
|
795 |
+
return $this->getOptions()->getOpt( $sOptionKey, $mDefault );
|
796 |
}
|
797 |
|
798 |
/**
|
802 |
* @return bool
|
803 |
*/
|
804 |
public function isOpt( $sOptionKey, $mValueToTest, $bStrict = false ) {
|
805 |
+
$mOptionValue = $this->getOptions()->getOpt( $sOptionKey );
|
806 |
return $bStrict ? $mOptionValue === $mValueToTest : $mOptionValue == $mValueToTest;
|
807 |
}
|
808 |
|
851 |
* @return $this
|
852 |
*/
|
853 |
protected function setOpt( $sOptionKey, $mValue ) {
|
854 |
+
$this->getOptions()->setOpt( $sOptionKey, $mValue );
|
855 |
return $this;
|
856 |
}
|
857 |
|
859 |
* @param array $aOptions
|
860 |
*/
|
861 |
public function setOptions( $aOptions ) {
|
862 |
+
$oVO = $this->getOptions();
|
863 |
foreach ( $aOptions as $sKey => $mValue ) {
|
864 |
$oVO->setOpt( $sKey, $mValue );
|
865 |
}
|
901 |
return is_array( $aDN ) ? $aDN : [];
|
902 |
}
|
903 |
|
|
|
904 |
/**
|
905 |
* @return string[]
|
906 |
*/
|
916 |
public function setDismissedNotices( $aDismissed ) {
|
917 |
return $this->setOpt( 'dismissed_notices', $aDismissed );
|
918 |
}
|
919 |
+
|
920 |
/**
|
921 |
* @param string[] $aDismissed
|
922 |
* @return $this
|
942 |
|
943 |
/**
|
944 |
* Saves the options to the WordPress Options store.
|
|
|
945 |
* @return void
|
946 |
+
* @deprecated 8.1
|
947 |
*/
|
948 |
public function savePluginOptions() {
|
949 |
+
$this->saveModOptions();
|
950 |
+
}
|
951 |
+
|
952 |
+
/**
|
953 |
+
* @return $this
|
954 |
+
*/
|
955 |
+
public function saveModOptions() {
|
956 |
$this->doPrePluginOptionsSave();
|
957 |
if ( apply_filters( $this->prefix( 'force_options_resave' ), false ) ) {
|
958 |
+
$this->getOptions()
|
959 |
->setNeedSave( true );
|
960 |
}
|
961 |
|
962 |
// we set the flag that options have been updated. (only use this flag if it's a MANUAL options update)
|
963 |
+
$this->bImportExportWhitelistNotify = $this->getOptions()->getNeedSave();
|
964 |
$this->store();
|
965 |
+
return $this;
|
966 |
}
|
967 |
|
968 |
private function store() {
|
969 |
add_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
970 |
+
$this->getOptions()
|
971 |
->doOptionsSave( $this->getCon()->getIsResetPlugin(), $this->isPremium() );
|
972 |
remove_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
973 |
}
|
977 |
* @return array
|
978 |
*/
|
979 |
public function aggregateOptionsValues( $aAggregatedOptions ) {
|
980 |
+
return array_merge( $aAggregatedOptions, $this->getOptions()->getAllOptionsValues() );
|
981 |
}
|
982 |
|
983 |
/**
|
990 |
|
991 |
$bPremiumEnabled = $this->getCon()->isPremiumExtensionsEnabled();
|
992 |
|
993 |
+
$oOptsVo = $this->getOptions();
|
994 |
$aOptions = $oOptsVo->getOptionsForPluginUse();
|
995 |
|
996 |
foreach ( $aOptions as $nSectionKey => $aSection ) {
|
1230 |
*/
|
1231 |
protected function resetPremiumOptions() {
|
1232 |
if ( !$this->isPremium() ) {
|
1233 |
+
$this->getOptions()->resetPremiumOptsToDefault();
|
1234 |
}
|
1235 |
}
|
1236 |
|
1295 |
}
|
1296 |
}
|
1297 |
|
1298 |
+
$this->saveModOptions();
|
1299 |
|
1300 |
// only use this flag when the options are being updated with a MANUAL save.
|
1301 |
if ( isset( $this->bImportExportWhitelistNotify ) && $this->bImportExportWhitelistNotify ) {
|
1428 |
|
1429 |
return [
|
1430 |
'sPluginName' => $oCon->getHumanName(),
|
1431 |
+
'sTagline' => $this->getOptions()->getFeatureTagline(),
|
1432 |
'nonce_field' => wp_nonce_field( $oCon->getPluginPrefix(), '_wpnonce', true, false ), //don't echo!
|
1433 |
'form_action' => 'admin.php?page='.$this->getModSlug(),
|
1434 |
'aPluginLabels' => $oCon->getLabels(),
|
1450 |
'mod_slug' => $this->getModSlug( true ),
|
1451 |
'mod_slug_short' => $this->getModSlug( false ),
|
1452 |
'all_options' => $this->buildOptions(),
|
1453 |
+
'hidden_options' => $this->getOptions()->getHiddenOptions()
|
1454 |
],
|
1455 |
'ajax' => [
|
1456 |
'mod_options' => $this->getAjaxActionData( 'mod_options' ),
|
1631 |
* @return bool
|
1632 |
*/
|
1633 |
protected function canDisplayOptionsForm() {
|
1634 |
+
return $this->getOptions()->isAccessRestricted() ? $this->getCon()->isPluginAdmin() : true;
|
1635 |
}
|
1636 |
|
1637 |
public function onWpEnqueueAdminJs() {
|
1736 |
if ( !is_array( $aTransferableOptions ) ) {
|
1737 |
$aTransferableOptions = [];
|
1738 |
}
|
1739 |
+
$aTransferableOptions[ $this->getOptionsStorageKey() ] = $this->getOptions()->getTransferableOptions();
|
1740 |
return $aTransferableOptions;
|
1741 |
}
|
1742 |
|
1744 |
* @return array
|
1745 |
*/
|
1746 |
public function collectOptionsForTracking() {
|
1747 |
+
$oVO = $this->getOptions();
|
1748 |
+
$aOptionsData = $this->getOptions()->getOptionsMaskSensitive();
|
1749 |
foreach ( $aOptionsData as $sOption => $mValue ) {
|
1750 |
unset( $aOptionsData[ $sOption ] );
|
1751 |
// some cleaning to ensure we don't have disallowed characters
|
1861 |
* @param string $sOpt
|
1862 |
* @param int $nAt
|
1863 |
* @return $this
|
1864 |
+
* @deprecated 8.1 - TODO: Be careful when updating to use `Options` as this is newly-added in 8.1
|
1865 |
*/
|
1866 |
protected function setOptAt( $sOpt, $nAt = null ) {
|
1867 |
$nAt = is_null( $nAt ) ? Services::Request()->ts() : max( 0, (int)$nAt );
|
1908 |
return $this->oDbh;
|
1909 |
}
|
1910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1911 |
/**
|
1912 |
* @return null|Shield\Modules\Base\Strings
|
1913 |
*/
|
1919 |
}
|
1920 |
|
1921 |
/**
|
1922 |
+
* @return Shield\Databases\Base\Handler|mixed|false
|
1923 |
*/
|
1924 |
+
protected function loadDbHandler() {
|
1925 |
+
return false;
|
1926 |
}
|
1927 |
|
1928 |
/**
|
1929 |
+
* @return $this
|
1930 |
*/
|
1931 |
+
protected function loadAdminNotices() {
|
1932 |
+
$oNotices = $this->loadClass( 'AdminNotices' );
|
1933 |
+
if ( $oNotices instanceof Shield\Modules\Base\AdminNotices ) {
|
1934 |
+
$oNotices->setMod( $this )->run();
|
1935 |
+
}
|
1936 |
+
return $this;
|
1937 |
}
|
1938 |
|
1939 |
/**
|
1940 |
+
* @return $this
|
1941 |
*/
|
1942 |
protected function loadAjaxHandler() {
|
1943 |
+
$oAj = $this->loadClass( 'AjaxHandler' );
|
1944 |
+
if ( !$oAj instanceof Shield\Modules\Base\AjaxHandlerBase ) {
|
1945 |
+
$oAj = new Shield\Modules\Base\AjaxHandlerShield();
|
1946 |
+
}
|
1947 |
+
$oAj->setMod( $this );
|
1948 |
+
return $this;
|
1949 |
}
|
1950 |
|
1951 |
/**
|
1952 |
* @return Shield\Modules\Base\ShieldOptions|mixed
|
1953 |
*/
|
1954 |
protected function loadOptions() {
|
1955 |
+
return $this->loadClass( 'Options' );
|
1956 |
}
|
1957 |
|
1958 |
/**
|
1959 |
* @return Shield\Modules\Base\Strings|mixed
|
1960 |
*/
|
1961 |
protected function loadStrings() {
|
1962 |
+
return $this->loadClass( 'Strings' );
|
1963 |
}
|
1964 |
|
1965 |
/**
|
1966 |
+
* @param $sClass
|
1967 |
+
* @return \stdClass|mixed|false
|
1968 |
*/
|
1969 |
+
private function loadClass( $sClass ) {
|
1970 |
+
$sC = $this->getNamespace().$sClass;
|
1971 |
+
return @class_exists( $sC ) ? new $sC() : false;
|
1972 |
}
|
1973 |
|
1974 |
/**
|
1975 |
+
* @return string
|
|
|
|
|
1976 |
*/
|
1977 |
+
private function getNamespace() {
|
1978 |
+
return '\FernleafSystems\Wordpress\Plugin\Shield\Modules\\'.$this->getNamespaceBase().'\\';
|
1979 |
}
|
1980 |
|
1981 |
/**
|
1982 |
+
* This will eventually be not needed
|
1983 |
+
* @return string
|
1984 |
*/
|
1985 |
+
protected function getNamespaceBase() {
|
1986 |
+
return 'Base';
|
1987 |
}
|
1988 |
|
1989 |
/**
|
1990 |
+
* @return \ICWP_WPSF_OptionsVO
|
1991 |
+
* @deprecated 8.1
|
|
|
|
|
1992 |
*/
|
1993 |
+
public function getOptionsVo() {
|
1994 |
+
return $this->getOptions();
|
1995 |
}
|
1996 |
|
1997 |
/**
|
1998 |
+
* @deprecated 8.1
|
|
|
1999 |
*/
|
2000 |
+
private function getAjax() {
|
2001 |
+
$this->loadAjaxHandler();
|
2002 |
}
|
2003 |
}
|
src/features/base_wpsf.php
CHANGED
@@ -5,8 +5,6 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
7 |
|
8 |
-
use Shield\AuditTrail\Auditor;
|
9 |
-
|
10 |
/**
|
11 |
* @var string[]
|
12 |
*/
|
@@ -17,11 +15,6 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
|
17 |
*/
|
18 |
private static $aAuditLogs;
|
19 |
|
20 |
-
/**
|
21 |
-
* @var ICWP_WPSF_Processor_Sessions
|
22 |
-
*/
|
23 |
-
static protected $oSessProcessor;
|
24 |
-
|
25 |
/**
|
26 |
* @var bool
|
27 |
*/
|
@@ -38,10 +31,10 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
|
38 |
private $bVisitorIsWhitelisted;
|
39 |
|
40 |
/**
|
41 |
-
* @return ICWP_WPSF_Processor_Sessions
|
42 |
*/
|
43 |
public function getSessionsProcessor() {
|
44 |
-
/** @var ICWP_WPSF_Processor_Sessions $oP */
|
45 |
$oP = $this->getCon()
|
46 |
->getModule_Sessions()
|
47 |
->getProcessor();
|
@@ -112,7 +105,7 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
|
112 |
'insights_test_cron_last_run_at' => 'test_cron_run',
|
113 |
'insights_last_password_block_at' => 'password_policy_block',
|
114 |
];
|
115 |
-
foreach ( $this->
|
116 |
if ( strpos( $sOpt, 'insights_' ) === 0 && isset( $aMap[ $sOpt ] ) && $this->getOpt( $sOpt ) > 0 ) {
|
117 |
$this->addStatEvent( $aMap[ $sOpt ], [ 'ts' => $this->getOpt( $sOpt ) ] );
|
118 |
$this->setOpt( $sOpt, 0 );
|
@@ -350,7 +343,7 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
|
350 |
* @return bool
|
351 |
*/
|
352 |
protected function isReadyToExecute() {
|
353 |
-
$oOpts = $this->
|
354 |
return ( $oOpts->isModuleRunIfWhitelisted() || !$this->isVisitorWhitelisted() )
|
355 |
&& ( $oOpts->isModuleRunIfVerifiedBot() || !$this->isVerifiedBot() )
|
356 |
&& ( $oOpts->isModuleRunUnderWpCli() || !Services::WpGeneral()->isWpCli() )
|
@@ -450,40 +443,4 @@ class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
|
450 |
public function getIpOffenceCount() {
|
451 |
return isset( self::$nIpOffenceCount ) ? self::$nIpOffenceCount : 0;
|
452 |
}
|
453 |
-
|
454 |
-
/**
|
455 |
-
* @param string $sKey
|
456 |
-
* @return $this
|
457 |
-
* @deprecated 7.5
|
458 |
-
*/
|
459 |
-
public function setOptInsightsAt( $sKey ) {
|
460 |
-
return $this;
|
461 |
-
}
|
462 |
-
|
463 |
-
/**
|
464 |
-
* Used to mark an IP address for immediate block
|
465 |
-
* @return $this
|
466 |
-
* @deprecated
|
467 |
-
*/
|
468 |
-
public function setIpBlocked() {
|
469 |
-
return $this;
|
470 |
-
}
|
471 |
-
|
472 |
-
/**
|
473 |
-
* @return int
|
474 |
-
* @deprecated 7.5
|
475 |
-
*/
|
476 |
-
public function getIpAction() {
|
477 |
-
return $this->getIpOffenceCount();
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Used to mark an IP address for transgression/black-mark
|
482 |
-
* @param int $nIncrementCount
|
483 |
-
* @return $this
|
484 |
-
* @deprecated 7.5
|
485 |
-
*/
|
486 |
-
public function setIpTransgressed( $nIncrementCount = 1 ) {
|
487 |
-
return $this;
|
488 |
-
}
|
489 |
}
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_BaseWpsf extends ICWP_WPSF_FeatureHandler_Base {
|
7 |
|
|
|
|
|
8 |
/**
|
9 |
* @var string[]
|
10 |
*/
|
15 |
*/
|
16 |
private static $aAuditLogs;
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
* @var bool
|
20 |
*/
|
31 |
private $bVisitorIsWhitelisted;
|
32 |
|
33 |
/**
|
34 |
+
* @return \ICWP_WPSF_Processor_Sessions
|
35 |
*/
|
36 |
public function getSessionsProcessor() {
|
37 |
+
/** @var \ICWP_WPSF_Processor_Sessions $oP */
|
38 |
$oP = $this->getCon()
|
39 |
->getModule_Sessions()
|
40 |
->getProcessor();
|
105 |
'insights_test_cron_last_run_at' => 'test_cron_run',
|
106 |
'insights_last_password_block_at' => 'password_policy_block',
|
107 |
];
|
108 |
+
foreach ( $this->getOptions()->getOptionsKeys() as $sOpt ) {
|
109 |
if ( strpos( $sOpt, 'insights_' ) === 0 && isset( $aMap[ $sOpt ] ) && $this->getOpt( $sOpt ) > 0 ) {
|
110 |
$this->addStatEvent( $aMap[ $sOpt ], [ 'ts' => $this->getOpt( $sOpt ) ] );
|
111 |
$this->setOpt( $sOpt, 0 );
|
343 |
* @return bool
|
344 |
*/
|
345 |
protected function isReadyToExecute() {
|
346 |
+
$oOpts = $this->getOptions();
|
347 |
return ( $oOpts->isModuleRunIfWhitelisted() || !$this->isVisitorWhitelisted() )
|
348 |
&& ( $oOpts->isModuleRunIfVerifiedBot() || !$this->isVerifiedBot() )
|
349 |
&& ( $oOpts->isModuleRunUnderWpCli() || !Services::WpGeneral()->isWpCli() )
|
443 |
public function getIpOffenceCount() {
|
444 |
return isset( self::$nIpOffenceCount ) ? self::$nIpOffenceCount : 0;
|
445 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
src/features/comments_filter.php
CHANGED
@@ -5,13 +5,6 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
8 |
-
/**
|
9 |
-
* @return boolean
|
10 |
-
*/
|
11 |
-
public function getIfCheckCommentToken() {
|
12 |
-
return ( $this->getTokenExpireInterval() > 0 || $this->getTokenCooldown() > 0 );
|
13 |
-
}
|
14 |
-
|
15 |
/**
|
16 |
* @return int
|
17 |
*/
|
@@ -84,13 +77,13 @@ class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_B
|
|
84 |
|
85 |
protected function doExtraSubmitProcessing() {
|
86 |
if ( $this->getTokenExpireInterval() != 0 && $this->getTokenCooldown() > $this->getTokenExpireInterval() ) {
|
87 |
-
$this->
|
88 |
-
$this->
|
89 |
}
|
90 |
|
91 |
$aCommentsFilters = $this->getOpt( 'enable_comments_human_spam_filter_items' );
|
92 |
if ( empty( $aCommentsFilters ) || !is_array( $aCommentsFilters ) ) {
|
93 |
-
$this->
|
94 |
}
|
95 |
|
96 |
// clean roles
|
@@ -207,38 +200,13 @@ class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_B
|
|
207 |
}
|
208 |
|
209 |
/**
|
210 |
-
* @return
|
211 |
-
*/
|
212 |
-
protected function loadAdminNotices() {
|
213 |
-
return new Shield\Modules\CommentsFilter\AdminNotices();
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* @return Shield\Databases\Comments\Handler
|
218 |
-
*/
|
219 |
-
protected function loadDbHandler() {
|
220 |
-
return new Shield\Databases\Comments\Handler();
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* @return Shield\Modules\CommentsFilter\Options
|
225 |
-
*/
|
226 |
-
protected function loadOptions() {
|
227 |
-
return new Shield\Modules\CommentsFilter\Options();
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* @return Shield\Modules\CommentsFilter\Strings
|
232 |
*/
|
233 |
-
protected function
|
234 |
-
return
|
235 |
}
|
236 |
|
237 |
protected function updateHandler() {
|
238 |
-
$oDbh = $this->getDbHandler();
|
239 |
-
if ( !empty( $oDbh ) ) {
|
240 |
-
$oDbh->deleteTable();
|
241 |
-
}
|
242 |
$oFs = Services::WpFs();
|
243 |
if ( $oFs->exists( $this->getSpamBlacklistFile() ) ) {
|
244 |
$oFs->deleteFile( $this->getSpamBlacklistFile() );
|
@@ -251,19 +219,4 @@ class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_B
|
|
251 |
public function getSpamBlacklistFile() {
|
252 |
return $this->getCon()->getPluginCachePath( 'spamblacklist.txt' );
|
253 |
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* This is the same as isTrustedCommenter() except with an optimization in the order of the tests
|
257 |
-
* since we already have a User object loaded and testing roles is quicker than querying for approved comments
|
258 |
-
* @param \WP_User $oUser
|
259 |
-
* @return bool
|
260 |
-
* @deprecated
|
261 |
-
*/
|
262 |
-
public function isUserTrusted( $oUser ) {
|
263 |
-
return ( $oUser instanceof \WP_User )
|
264 |
-
&& (
|
265 |
-
count( array_intersect( $this->getTrustedRoles(), array_map( 'strtolower', $oUser->roles ) ) ) > 0
|
266 |
-
|| $this->loadWpComments()->countApproved( $oUser->user_email ) >= $this->getApprovedMinimum()
|
267 |
-
);
|
268 |
-
}
|
269 |
}
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_CommentsFilter extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
* @return int
|
10 |
*/
|
77 |
|
78 |
protected function doExtraSubmitProcessing() {
|
79 |
if ( $this->getTokenExpireInterval() != 0 && $this->getTokenCooldown() > $this->getTokenExpireInterval() ) {
|
80 |
+
$this->getOptions()->resetOptToDefault( 'comments_cooldown_interval' );
|
81 |
+
$this->getOptions()->resetOptToDefault( 'comments_token_expire_interval' );
|
82 |
}
|
83 |
|
84 |
$aCommentsFilters = $this->getOpt( 'enable_comments_human_spam_filter_items' );
|
85 |
if ( empty( $aCommentsFilters ) || !is_array( $aCommentsFilters ) ) {
|
86 |
+
$this->getOptions()->resetOptToDefault( 'enable_comments_human_spam_filter_items' );
|
87 |
}
|
88 |
|
89 |
// clean roles
|
200 |
}
|
201 |
|
202 |
/**
|
203 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
*/
|
205 |
+
protected function getNamespaceBase() {
|
206 |
+
return 'CommentsFilter';
|
207 |
}
|
208 |
|
209 |
protected function updateHandler() {
|
|
|
|
|
|
|
|
|
210 |
$oFs = Services::WpFs();
|
211 |
if ( $oFs->exists( $this->getSpamBlacklistFile() ) ) {
|
212 |
$oFs->deleteFile( $this->getSpamBlacklistFile() );
|
219 |
public function getSpamBlacklistFile() {
|
220 |
return $this->getCon()->getPluginCachePath( 'spamblacklist.txt' );
|
221 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
}
|
src/features/email.php
CHANGED
@@ -4,17 +4,6 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
4 |
|
5 |
class ICWP_WPSF_FeatureHandler_Email extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
6 |
|
7 |
-
/**
|
8 |
-
* @param array $aMessage
|
9 |
-
* @return array
|
10 |
-
*/
|
11 |
-
public function customiseMandrill( $aMessage ) {
|
12 |
-
if ( empty( $aMessage[ 'text' ] ) ) {
|
13 |
-
$aMessage[ 'text' ] = $aMessage[ 'html' ];
|
14 |
-
}
|
15 |
-
return $aMessage;
|
16 |
-
}
|
17 |
-
|
18 |
/**
|
19 |
* This is the point where you would want to do any options verification
|
20 |
*/
|
@@ -27,16 +16,9 @@ class ICWP_WPSF_FeatureHandler_Email extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
-
* @return
|
31 |
-
*/
|
32 |
-
protected function loadOptions() {
|
33 |
-
return new Shield\Modules\Email\Options();
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @return Shield\Modules\Email\Strings
|
38 |
*/
|
39 |
-
protected function
|
40 |
-
return
|
41 |
}
|
42 |
}
|
4 |
|
5 |
class ICWP_WPSF_FeatureHandler_Email extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
/**
|
8 |
* This is the point where you would want to do any options verification
|
9 |
*/
|
16 |
}
|
17 |
|
18 |
/**
|
19 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
*/
|
21 |
+
protected function getNamespaceBase() {
|
22 |
+
return 'Email';
|
23 |
}
|
24 |
}
|
src/features/events.php
CHANGED
@@ -13,23 +13,9 @@ class ICWP_WPSF_FeatureHandler_Events extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
13 |
}
|
14 |
|
15 |
/**
|
16 |
-
* @return
|
17 |
*/
|
18 |
-
protected function
|
19 |
-
return
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @return Shield\Modules\Events\Options
|
24 |
-
*/
|
25 |
-
protected function loadOptions() {
|
26 |
-
return new Shield\Modules\Events\Options();
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @return Shield\Modules\Events\Strings
|
31 |
-
*/
|
32 |
-
protected function loadStrings() {
|
33 |
-
return new Shield\Modules\Events\Strings();
|
34 |
}
|
35 |
}
|
13 |
}
|
14 |
|
15 |
/**
|
16 |
+
* @return string
|
17 |
*/
|
18 |
+
protected function getNamespaceBase() {
|
19 |
+
return 'Events';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
}
|
src/features/firewall.php
CHANGED
@@ -122,16 +122,9 @@ class ICWP_WPSF_FeatureHandler_Firewall extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
-
* @return
|
126 |
-
*/
|
127 |
-
protected function loadOptions() {
|
128 |
-
return new Shield\Modules\Firewall\Options();
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* @return Shield\Modules\Firewall\Strings
|
133 |
*/
|
134 |
-
protected function
|
135 |
-
return
|
136 |
}
|
137 |
}
|
122 |
}
|
123 |
|
124 |
/**
|
125 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
*/
|
127 |
+
protected function getNamespaceBase() {
|
128 |
+
return 'Firewall';
|
129 |
}
|
130 |
}
|
src/features/hack_protect.php
CHANGED
@@ -1,30 +1,51 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
protected function doPostConstruction() {
|
9 |
parent::doPostConstruction();
|
10 |
$this->setCustomCronSchedules();
|
11 |
}
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
*/
|
15 |
protected function updateHandler() {
|
16 |
parent::updateHandler();
|
17 |
$this->setPtgUpdateStoreFormat( true );
|
18 |
// ->setPtgRebuildSelfRequired( true ) // this is permanently required until a better solution is found
|
19 |
-
Services::WpFs()->deleteDir( $this->getScansTempDir() );
|
20 |
}
|
21 |
|
22 |
/**
|
23 |
-
* @return
|
24 |
*/
|
25 |
-
public function
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -33,7 +54,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
33 |
$oReq = Services::Request();
|
34 |
switch ( $oReq->query( 'exec' ) && $this->getCon()->isPluginAdmin() ) {
|
35 |
case 'scan_file_download':
|
36 |
-
/** @var ICWP_WPSF_Processor_HackProtect $oPro */
|
37 |
$oPro = $this->getProcessor();
|
38 |
$oPro->getSubProScanner()->downloadItemFile( $oReq->query( 'rid' ) );
|
39 |
break;
|
@@ -59,7 +80,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
59 |
$this->cleanFileExclusions();
|
60 |
$this->cleanPtgFileExtensions();
|
61 |
|
62 |
-
$oOpts = $this->
|
63 |
if ( $oOpts->isOptChanged( 'ptg_enable' ) || $oOpts->isOptChanged( 'ptg_depth' ) || $oOpts->isOptChanged( 'ptg_extensions' ) ) {
|
64 |
$this->setPtgLastBuildAt( 0 );
|
65 |
/** @var ICWP_WPSF_Processor_HackProtect $oPro */
|
@@ -73,17 +94,12 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
73 |
$this->resetRtBackupFiles();
|
74 |
}
|
75 |
|
76 |
-
/**
|
77 |
-
* @return string[]
|
78 |
-
*/
|
79 |
-
public function getAllScanSlugs() {
|
80 |
-
return $this->getDef( 'all_scan_slugs' );
|
81 |
-
}
|
82 |
-
|
83 |
/**
|
84 |
* @return int[] - key is scan slug
|
85 |
*/
|
86 |
public function getLastScansAt() {
|
|
|
|
|
87 |
/** @var Shield\Databases\Events\Select $oSel */
|
88 |
$oSel = $this->getCon()
|
89 |
->getModule_Events()
|
@@ -92,7 +108,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
92 |
$aEvents = $oSel->getLatestForAllEvents();
|
93 |
|
94 |
$aLatest = [];
|
95 |
-
foreach ( $
|
96 |
$sEvt = $sScan.'_scan_run';
|
97 |
$aLatest[ $sScan ] = isset( $aEvents[ $sEvt ] ) ? $aEvents[ $sEvt ]->created_at : 0;
|
98 |
}
|
@@ -139,18 +155,13 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
139 |
return $this->isPremium() && $this->isOpt( 'email_files_list', 'Y' );
|
140 |
}
|
141 |
|
142 |
-
/**
|
143 |
-
* @return int
|
144 |
-
*/
|
145 |
-
public function getScanFrequency() {
|
146 |
-
return (int)$this->getOpt( 'scan_frequency', 1 );
|
147 |
-
}
|
148 |
-
|
149 |
/**
|
150 |
* @return $this
|
151 |
*/
|
152 |
protected function setCustomCronSchedules() {
|
153 |
-
|
|
|
|
|
154 |
$this->loadWpCronProcessor()
|
155 |
->addNewSchedule(
|
156 |
$this->prefix( sprintf( 'per-day-%s', $nFreq ) ),
|
@@ -468,7 +479,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
468 |
*/
|
469 |
public function isPtgEnabled() {
|
470 |
return $this->isPremium() && $this->isOpt( 'ptg_enable', 'enabled' )
|
471 |
-
&& $this->
|
472 |
&& $this->canPtgWriteToDisk();
|
473 |
}
|
474 |
|
@@ -665,7 +676,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
665 |
private function resetRtBackupFiles() {
|
666 |
$oCon = $this->getCon();
|
667 |
$oFs = Services::WpFs();
|
668 |
-
$oOpts = $this->
|
669 |
foreach ( [ 'htaccess', 'wpconfig' ] as $sFileKey ) {
|
670 |
if ( $oOpts->isOptChanged( 'rt_file_'.$sFileKey ) ) {
|
671 |
$sPath = $this->getRtMapFileKeyToFilePath( $sFileKey );
|
@@ -812,7 +823,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
812 |
* @return array
|
813 |
*/
|
814 |
public function addInsightsNoticeData( $aAllNotices ) {
|
815 |
-
/** @var
|
816 |
$oStrings = $this->getStrings();
|
817 |
$aScanNames = $oStrings->getScanNames();
|
818 |
|
@@ -958,8 +969,10 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
958 |
* @return array
|
959 |
*/
|
960 |
public function addInsightsConfigData( $aAllData ) {
|
961 |
-
/** @var
|
962 |
$oStrings = $this->getStrings();
|
|
|
|
|
963 |
$aScanNames = $oStrings->getScanNames();
|
964 |
|
965 |
$aThis = [
|
@@ -975,7 +988,7 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
975 |
$aThis[ 'key_opts' ][ 'mod' ] = $this->getModDisabledInsight();
|
976 |
}
|
977 |
else {
|
978 |
-
$bGoodFrequency = $
|
979 |
$aThis[ 'key_opts' ][ 'frequency' ] = [
|
980 |
'name' => __( 'Scan Frequency', 'wp-simple-firewall' ),
|
981 |
'enabled' => $bGoodFrequency,
|
@@ -1104,10 +1117,19 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
1104 |
}
|
1105 |
|
1106 |
/**
|
1107 |
-
* @return Shield\
|
1108 |
*/
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
|
1113 |
/**
|
@@ -1118,16 +1140,34 @@ class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_Base
|
|
1118 |
}
|
1119 |
|
1120 |
/**
|
1121 |
-
* @return
|
1122 |
*/
|
1123 |
-
protected function
|
1124 |
-
return
|
1125 |
}
|
1126 |
|
1127 |
/**
|
1128 |
-
* @return
|
|
|
1129 |
*/
|
1130 |
-
|
1131 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1132 |
}
|
1133 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
class ICWP_WPSF_FeatureHandler_HackProtect extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
8 |
|
9 |
+
/**
|
10 |
+
* @var Shield\Databases\ScanQueue\Handler
|
11 |
+
*/
|
12 |
+
private $oDbh_ScanQueue;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var HackGuard\Scan\Queue\Controller
|
16 |
+
*/
|
17 |
+
private $oScanQueueController;
|
18 |
+
|
19 |
protected function doPostConstruction() {
|
20 |
parent::doPostConstruction();
|
21 |
$this->setCustomCronSchedules();
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* A action added to WordPress 'init' hook
|
26 |
+
*/
|
27 |
+
public function onWpInit() {
|
28 |
+
parent::onWpInit();
|
29 |
+
$this->getScanController();
|
30 |
+
}
|
31 |
+
|
32 |
/**
|
33 |
*/
|
34 |
protected function updateHandler() {
|
35 |
parent::updateHandler();
|
36 |
$this->setPtgUpdateStoreFormat( true );
|
37 |
// ->setPtgRebuildSelfRequired( true ) // this is permanently required until a better solution is found
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* @return HackGuard\Scan\Queue\Controller
|
42 |
*/
|
43 |
+
public function getScanController() {
|
44 |
+
if ( !isset( $this->oScanQueueController ) ) {
|
45 |
+
$this->oScanQueueController = ( new HackGuard\Scan\Queue\Controller() )
|
46 |
+
->setMod( $this );
|
47 |
+
}
|
48 |
+
return $this->oScanQueueController;
|
49 |
}
|
50 |
|
51 |
/**
|
54 |
$oReq = Services::Request();
|
55 |
switch ( $oReq->query( 'exec' ) && $this->getCon()->isPluginAdmin() ) {
|
56 |
case 'scan_file_download':
|
57 |
+
/** @var \ICWP_WPSF_Processor_HackProtect $oPro */
|
58 |
$oPro = $this->getProcessor();
|
59 |
$oPro->getSubProScanner()->downloadItemFile( $oReq->query( 'rid' ) );
|
60 |
break;
|
80 |
$this->cleanFileExclusions();
|
81 |
$this->cleanPtgFileExtensions();
|
82 |
|
83 |
+
$oOpts = $this->getOptions();
|
84 |
if ( $oOpts->isOptChanged( 'ptg_enable' ) || $oOpts->isOptChanged( 'ptg_depth' ) || $oOpts->isOptChanged( 'ptg_extensions' ) ) {
|
85 |
$this->setPtgLastBuildAt( 0 );
|
86 |
/** @var ICWP_WPSF_Processor_HackProtect $oPro */
|
94 |
$this->resetRtBackupFiles();
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
/**
|
98 |
* @return int[] - key is scan slug
|
99 |
*/
|
100 |
public function getLastScansAt() {
|
101 |
+
/** @var HackGuard\Options $oOpts */
|
102 |
+
$oOpts = $this->getOptions();
|
103 |
/** @var Shield\Databases\Events\Select $oSel */
|
104 |
$oSel = $this->getCon()
|
105 |
->getModule_Events()
|
108 |
$aEvents = $oSel->getLatestForAllEvents();
|
109 |
|
110 |
$aLatest = [];
|
111 |
+
foreach ( $oOpts->getScanSlugs() as $sScan ) {
|
112 |
$sEvt = $sScan.'_scan_run';
|
113 |
$aLatest[ $sScan ] = isset( $aEvents[ $sEvt ] ) ? $aEvents[ $sEvt ]->created_at : 0;
|
114 |
}
|
155 |
return $this->isPremium() && $this->isOpt( 'email_files_list', 'Y' );
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
/**
|
159 |
* @return $this
|
160 |
*/
|
161 |
protected function setCustomCronSchedules() {
|
162 |
+
/** @var HackGuard\Options $oStrings */
|
163 |
+
$oOpts = $this->getOptions();
|
164 |
+
$nFreq = $oOpts->getScanFrequency();
|
165 |
$this->loadWpCronProcessor()
|
166 |
->addNewSchedule(
|
167 |
$this->prefix( sprintf( 'per-day-%s', $nFreq ) ),
|
479 |
*/
|
480 |
public function isPtgEnabled() {
|
481 |
return $this->isPremium() && $this->isOpt( 'ptg_enable', 'enabled' )
|
482 |
+
&& $this->getOptions()->isOptReqsMet( 'ptg_enable' )
|
483 |
&& $this->canPtgWriteToDisk();
|
484 |
}
|
485 |
|
676 |
private function resetRtBackupFiles() {
|
677 |
$oCon = $this->getCon();
|
678 |
$oFs = Services::WpFs();
|
679 |
+
$oOpts = $this->getOptions();
|
680 |
foreach ( [ 'htaccess', 'wpconfig' ] as $sFileKey ) {
|
681 |
if ( $oOpts->isOptChanged( 'rt_file_'.$sFileKey ) ) {
|
682 |
$sPath = $this->getRtMapFileKeyToFilePath( $sFileKey );
|
823 |
* @return array
|
824 |
*/
|
825 |
public function addInsightsNoticeData( $aAllNotices ) {
|
826 |
+
/** @var HackGuard\Strings $oStrings */
|
827 |
$oStrings = $this->getStrings();
|
828 |
$aScanNames = $oStrings->getScanNames();
|
829 |
|
969 |
* @return array
|
970 |
*/
|
971 |
public function addInsightsConfigData( $aAllData ) {
|
972 |
+
/** @var HackGuard\Strings $oStrings */
|
973 |
$oStrings = $this->getStrings();
|
974 |
+
/** @var HackGuard\Options $oStrings */
|
975 |
+
$oOpts = $this->getOptions();
|
976 |
$aScanNames = $oStrings->getScanNames();
|
977 |
|
978 |
$aThis = [
|
988 |
$aThis[ 'key_opts' ][ 'mod' ] = $this->getModDisabledInsight();
|
989 |
}
|
990 |
else {
|
991 |
+
$bGoodFrequency = $oOpts->getScanFrequency() > 1;
|
992 |
$aThis[ 'key_opts' ][ 'frequency' ] = [
|
993 |
'name' => __( 'Scan Frequency', 'wp-simple-firewall' ),
|
994 |
'enabled' => $bGoodFrequency,
|
1117 |
}
|
1118 |
|
1119 |
/**
|
1120 |
+
* @return Shield\Databases\ScanQueue\Handler
|
1121 |
*/
|
1122 |
+
public function getDbHandler_ScanQueue() {
|
1123 |
+
if ( !isset( $this->oDbh_ScanQueue ) ) {
|
1124 |
+
try {
|
1125 |
+
$this->oDbh_ScanQueue = ( new Shield\Databases\ScanQueue\Handler() )
|
1126 |
+
->setMod( $this )
|
1127 |
+
->tableInit();
|
1128 |
+
}
|
1129 |
+
catch ( \Exception $oE ) {
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
return $this->oDbh_ScanQueue;
|
1133 |
}
|
1134 |
|
1135 |
/**
|
1140 |
}
|
1141 |
|
1142 |
/**
|
1143 |
+
* @return string
|
1144 |
*/
|
1145 |
+
protected function getNamespaceBase() {
|
1146 |
+
return 'HackGuard';
|
1147 |
}
|
1148 |
|
1149 |
/**
|
1150 |
+
* @return int
|
1151 |
+
* @deprecated 8.1
|
1152 |
*/
|
1153 |
+
public function getScanFrequency() {
|
1154 |
+
return (int)$this->getOpt( 'scan_frequency', 1 );
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
/**
|
1158 |
+
* @return string
|
1159 |
+
* @deprecated 8.1
|
1160 |
+
*/
|
1161 |
+
public function getScansTempDir() {
|
1162 |
+
$sDir = $this->getCon()->getPluginCachePath( 'scans' );
|
1163 |
+
return Services::WpFs()->mkdir( $sDir ) ? $sDir : false;
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
/**
|
1167 |
+
* @return string[]
|
1168 |
+
* @deprecated 8.1
|
1169 |
+
*/
|
1170 |
+
public function getAllScanSlugs() {
|
1171 |
+
return $this->getDef( 'all_scan_slugs' );
|
1172 |
}
|
1173 |
}
|
src/features/headers.php
CHANGED
@@ -169,16 +169,9 @@ class ICWP_WPSF_FeatureHandler_Headers extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
-
* @return
|
173 |
-
*/
|
174 |
-
protected function loadOptions() {
|
175 |
-
return new Shield\Modules\Headers\Options();
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* @return Shield\Modules\Headers\Strings
|
180 |
*/
|
181 |
-
protected function
|
182 |
-
return
|
183 |
}
|
184 |
}
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
*/
|
174 |
+
protected function getNamespaceBase() {
|
175 |
+
return 'Headers';
|
176 |
}
|
177 |
}
|
src/features/insights.php
CHANGED
@@ -43,6 +43,11 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
43 |
/** @var Shield\Databases\AuditTrail\Select $oAuditSelect */
|
44 |
$oAuditSelect = $oAuditMod->getDbHandler()->getQuerySelector();
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
$oIpMod = $oCon->getModule_IPs();
|
47 |
|
48 |
/** @var Shield\Databases\Session\Select $oSessionSelect */
|
@@ -77,13 +82,14 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
77 |
'exclude_your_ip' => __( 'Exclude Your Current IP', 'wp-simple-firewall' ),
|
78 |
'exclude_your_ip_tooltip' => __( 'Exclude Your IP From Results', 'wp-simple-firewall' ),
|
79 |
'context' => __( 'Context', 'wp-simple-firewall' ),
|
|
|
80 |
'show_after' => __( 'show results that occurred after', 'wp-simple-firewall' ),
|
81 |
'show_before' => __( 'show results that occurred before', 'wp-simple-firewall' ),
|
82 |
],
|
83 |
'vars' => [
|
84 |
-
'
|
85 |
-
'unique_ips'
|
86 |
-
'unique_users'
|
87 |
],
|
88 |
];
|
89 |
break;
|
@@ -287,7 +293,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
287 |
'license' => __( 'Pro', 'wp-simple-firewall' ),
|
288 |
'traffic' => __( 'Traffic', 'wp-simple-firewall' ),
|
289 |
'notes' => __( 'Notes', 'wp-simple-firewall' ),
|
290 |
-
// 'reports' => __( 'Reports', 'wp-simple-firewall' ),
|
291 |
'importexport' => sprintf( '%s/%s', __( 'Import', 'wp-simple-firewall' ), __( 'Export', 'wp-simple-firewall' ) ),
|
292 |
];
|
293 |
if ( $bIsPro ) {
|
@@ -357,7 +363,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
357 |
|
358 |
if ( $this->isThisModulePage() ) {
|
359 |
|
360 |
-
$
|
361 |
$aStdDepsJs = [ $this->prefix( 'plugin' ) ];
|
362 |
$sNav = Services::Request()->query( 'inav' );
|
363 |
switch ( $sNav ) {
|
@@ -365,12 +371,12 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
365 |
case 'importexport':
|
366 |
|
367 |
$sAsset = 'shield-import';
|
368 |
-
$sUnique = $
|
369 |
wp_register_script(
|
370 |
$sUnique,
|
371 |
-
$
|
372 |
$aStdDepsJs,
|
373 |
-
$
|
374 |
false
|
375 |
);
|
376 |
wp_enqueue_script( $sUnique );
|
@@ -381,12 +387,12 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
381 |
$aDeps = $aStdDepsJs;
|
382 |
$aJsAssets = [ 'chartist.min', 'chartist-plugin-legend', 'charts' ];
|
383 |
foreach ( $aJsAssets as $sAsset ) {
|
384 |
-
$sUnique = $
|
385 |
wp_register_script(
|
386 |
$sUnique,
|
387 |
-
$
|
388 |
$aDeps,
|
389 |
-
$
|
390 |
false
|
391 |
);
|
392 |
wp_enqueue_script( $sUnique );
|
@@ -396,12 +402,12 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
396 |
$aDeps = [];
|
397 |
$aCssAssets = [ 'chartist.min', 'chartist-plugin-legend' ];
|
398 |
foreach ( $aCssAssets as $sAsset ) {
|
399 |
-
$sUnique = $
|
400 |
wp_register_style(
|
401 |
$sUnique,
|
402 |
-
$
|
403 |
$aDeps,
|
404 |
-
$
|
405 |
false
|
406 |
);
|
407 |
wp_enqueue_style( $sUnique );
|
@@ -417,12 +423,12 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
417 |
case 'users':
|
418 |
|
419 |
$sAsset = 'shield-tables';
|
420 |
-
$sUnique = $
|
421 |
wp_register_script(
|
422 |
$sUnique,
|
423 |
-
$
|
424 |
$aStdDepsJs,
|
425 |
-
$
|
426 |
false
|
427 |
);
|
428 |
wp_enqueue_script( $sUnique );
|
@@ -430,12 +436,12 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
430 |
$aStdDepsJs[] = $sUnique;
|
431 |
if ( $sNav == 'scans' ) {
|
432 |
$sAsset = 'shield-scans';
|
433 |
-
$sUnique = $
|
434 |
wp_register_script(
|
435 |
$sUnique,
|
436 |
-
$
|
437 |
array_unique( $aStdDepsJs ),
|
438 |
-
$
|
439 |
false
|
440 |
);
|
441 |
wp_enqueue_script( $sUnique );
|
@@ -447,7 +453,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
447 |
$sUnique, //TODO: use an includes services for CNDJS
|
448 |
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js',
|
449 |
array_unique( $aStdDepsJs ),
|
450 |
-
$
|
451 |
false
|
452 |
);
|
453 |
wp_enqueue_script( $sUnique );
|
@@ -456,7 +462,7 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
456 |
$sUnique,
|
457 |
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.min.css',
|
458 |
[],
|
459 |
-
$
|
460 |
false
|
461 |
);
|
462 |
wp_enqueue_style( $sUnique );
|
@@ -788,11 +794,6 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
788 |
] ),
|
789 |
'tooltip' => __( 'Total SPAM comments blocked.', 'wp-simple-firewall' )
|
790 |
],
|
791 |
-
// 'sessions' => array(
|
792 |
-
// 'title' => _wpsf__( 'Active Sessions' ),
|
793 |
-
// 'val' => $oProUsers->getProcessorSessions()->countActiveSessions(),
|
794 |
-
// 'tooltip' => _wpsf__( 'Currently active user sessions.' )
|
795 |
-
// ),
|
796 |
'transgressions' => [
|
797 |
'title' => __( 'Offenses', 'wp-simple-firewall' ),
|
798 |
'val' => $oSelEvents->clearWheres()->sumEvent( 'ip_offense' ),
|
@@ -873,16 +874,9 @@ class ICWP_WPSF_FeatureHandler_Insights extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
873 |
}
|
874 |
|
875 |
/**
|
876 |
-
* @return
|
877 |
-
*/
|
878 |
-
protected function loadOptions() {
|
879 |
-
return new Shield\Modules\Insights\Options();
|
880 |
-
}
|
881 |
-
|
882 |
-
/**
|
883 |
-
* @return Shield\Modules\Insights\Strings
|
884 |
*/
|
885 |
-
protected function
|
886 |
-
return
|
887 |
}
|
888 |
}
|
43 |
/** @var Shield\Databases\AuditTrail\Select $oAuditSelect */
|
44 |
$oAuditSelect = $oAuditMod->getDbHandler()->getQuerySelector();
|
45 |
|
46 |
+
/** @var Shield\Modules\Events\Strings $oEventStrings */
|
47 |
+
$oEventStrings = $oCon->getModule_Events()->getStrings();
|
48 |
+
$aEventsSelect = array_intersect_key( $oEventStrings->getEventNames(), array_flip( $oAuditSelect->getDistinctEvents() ) );
|
49 |
+
asort( $aEventsSelect );
|
50 |
+
|
51 |
$oIpMod = $oCon->getModule_IPs();
|
52 |
|
53 |
/** @var Shield\Databases\Session\Select $oSessionSelect */
|
82 |
'exclude_your_ip' => __( 'Exclude Your Current IP', 'wp-simple-firewall' ),
|
83 |
'exclude_your_ip_tooltip' => __( 'Exclude Your IP From Results', 'wp-simple-firewall' ),
|
84 |
'context' => __( 'Context', 'wp-simple-firewall' ),
|
85 |
+
'event' => __( 'Event', 'wp-simple-firewall' ),
|
86 |
'show_after' => __( 'show results that occurred after', 'wp-simple-firewall' ),
|
87 |
'show_before' => __( 'show results that occurred before', 'wp-simple-firewall' ),
|
88 |
],
|
89 |
'vars' => [
|
90 |
+
'events_for_select' => $aEventsSelect,
|
91 |
+
'unique_ips' => $oAuditSelect->getDistinctIps(),
|
92 |
+
'unique_users' => $oAuditSelect->getDistinctUsernames(),
|
93 |
],
|
94 |
];
|
95 |
break;
|
293 |
'license' => __( 'Pro', 'wp-simple-firewall' ),
|
294 |
'traffic' => __( 'Traffic', 'wp-simple-firewall' ),
|
295 |
'notes' => __( 'Notes', 'wp-simple-firewall' ),
|
296 |
+
// 'reports' => __( 'Reports', 'wp-simple-firewall' ),
|
297 |
'importexport' => sprintf( '%s/%s', __( 'Import', 'wp-simple-firewall' ), __( 'Export', 'wp-simple-firewall' ) ),
|
298 |
];
|
299 |
if ( $bIsPro ) {
|
363 |
|
364 |
if ( $this->isThisModulePage() ) {
|
365 |
|
366 |
+
$oCon = $this->getCon();
|
367 |
$aStdDepsJs = [ $this->prefix( 'plugin' ) ];
|
368 |
$sNav = Services::Request()->query( 'inav' );
|
369 |
switch ( $sNav ) {
|
371 |
case 'importexport':
|
372 |
|
373 |
$sAsset = 'shield-import';
|
374 |
+
$sUnique = $oCon->prefix( $sAsset );
|
375 |
wp_register_script(
|
376 |
$sUnique,
|
377 |
+
$oCon->getPluginUrl_Js( $sAsset ),
|
378 |
$aStdDepsJs,
|
379 |
+
$oCon->getVersion(),
|
380 |
false
|
381 |
);
|
382 |
wp_enqueue_script( $sUnique );
|
387 |
$aDeps = $aStdDepsJs;
|
388 |
$aJsAssets = [ 'chartist.min', 'chartist-plugin-legend', 'charts' ];
|
389 |
foreach ( $aJsAssets as $sAsset ) {
|
390 |
+
$sUnique = $oCon->prefix( $sAsset );
|
391 |
wp_register_script(
|
392 |
$sUnique,
|
393 |
+
$oCon->getPluginUrl_Js( $sAsset ),
|
394 |
$aDeps,
|
395 |
+
$oCon->getVersion(),
|
396 |
false
|
397 |
);
|
398 |
wp_enqueue_script( $sUnique );
|
402 |
$aDeps = [];
|
403 |
$aCssAssets = [ 'chartist.min', 'chartist-plugin-legend' ];
|
404 |
foreach ( $aCssAssets as $sAsset ) {
|
405 |
+
$sUnique = $oCon->prefix( $sAsset );
|
406 |
wp_register_style(
|
407 |
$sUnique,
|
408 |
+
$oCon->getPluginUrl_Css( $sAsset ),
|
409 |
$aDeps,
|
410 |
+
$oCon->getVersion(),
|
411 |
false
|
412 |
);
|
413 |
wp_enqueue_style( $sUnique );
|
423 |
case 'users':
|
424 |
|
425 |
$sAsset = 'shield-tables';
|
426 |
+
$sUnique = $oCon->prefix( $sAsset );
|
427 |
wp_register_script(
|
428 |
$sUnique,
|
429 |
+
$oCon->getPluginUrl_Js( $sAsset ),
|
430 |
$aStdDepsJs,
|
431 |
+
$oCon->getVersion(),
|
432 |
false
|
433 |
);
|
434 |
wp_enqueue_script( $sUnique );
|
436 |
$aStdDepsJs[] = $sUnique;
|
437 |
if ( $sNav == 'scans' ) {
|
438 |
$sAsset = 'shield-scans';
|
439 |
+
$sUnique = $oCon->prefix( $sAsset );
|
440 |
wp_register_script(
|
441 |
$sUnique,
|
442 |
+
$oCon->getPluginUrl_Js( $sAsset ),
|
443 |
array_unique( $aStdDepsJs ),
|
444 |
+
$oCon->getVersion(),
|
445 |
false
|
446 |
);
|
447 |
wp_enqueue_script( $sUnique );
|
453 |
$sUnique, //TODO: use an includes services for CNDJS
|
454 |
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js',
|
455 |
array_unique( $aStdDepsJs ),
|
456 |
+
$oCon->getVersion(),
|
457 |
false
|
458 |
);
|
459 |
wp_enqueue_script( $sUnique );
|
462 |
$sUnique,
|
463 |
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.min.css',
|
464 |
[],
|
465 |
+
$oCon->getVersion(),
|
466 |
false
|
467 |
);
|
468 |
wp_enqueue_style( $sUnique );
|
794 |
] ),
|
795 |
'tooltip' => __( 'Total SPAM comments blocked.', 'wp-simple-firewall' )
|
796 |
],
|
|
|
|
|
|
|
|
|
|
|
797 |
'transgressions' => [
|
798 |
'title' => __( 'Offenses', 'wp-simple-firewall' ),
|
799 |
'val' => $oSelEvents->clearWheres()->sumEvent( 'ip_offense' ),
|
874 |
}
|
875 |
|
876 |
/**
|
877 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
878 |
*/
|
879 |
+
protected function getNamespaceBase() {
|
880 |
+
return 'Insights';
|
881 |
}
|
882 |
}
|
src/features/ips.php
CHANGED
@@ -17,36 +17,16 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
17 |
return $oIp->isValidIp_PublicRange( $oIp->getRequestIp() ) && parent::isReadyToExecute();
|
18 |
}
|
19 |
|
20 |
-
/**
|
21 |
-
* @return string
|
22 |
-
*/
|
23 |
-
public function getOptTransgressionLimit() {
|
24 |
-
return $this->getOpt( 'transgression_limit' );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @return int
|
29 |
-
*/
|
30 |
-
public function getAutoExpireTime() {
|
31 |
-
$sConstant = strtoupper( $this->getOpt( 'auto_expire' ).'_IN_SECONDS' );
|
32 |
-
return defined( $sConstant ) ? constant( $sConstant ) : ( DAY_IN_SECONDS*30 );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @return bool
|
37 |
-
*/
|
38 |
-
public function isAutoBlackListEnabled() {
|
39 |
-
return ( $this->getOptTransgressionLimit() > 0 );
|
40 |
-
}
|
41 |
-
|
42 |
protected function doExtraSubmitProcessing() {
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
}
|
46 |
|
47 |
-
$nLimit = $
|
48 |
if ( !is_int( $nLimit ) || $nLimit < 0 ) {
|
49 |
-
$
|
50 |
}
|
51 |
}
|
52 |
|
@@ -69,16 +49,6 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
69 |
return is_array( $aIps ) ? $aIps : [];
|
70 |
}
|
71 |
|
72 |
-
/**
|
73 |
-
* @param string $sIp
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function getCanIpRequestAutoUnblock( $sIp ) {
|
77 |
-
$aExistingIps = $this->getAutoUnblockIps();
|
78 |
-
return !array_key_exists( $sIp, $aExistingIps )
|
79 |
-
|| ( Services::Request()->ts() - $aExistingIps[ $sIp ] > DAY_IN_SECONDS );
|
80 |
-
}
|
81 |
-
|
82 |
/**
|
83 |
* @param string $sIp
|
84 |
* @return $this
|
@@ -97,96 +67,6 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
97 |
return $this->setOpt( 'autounblock_ips', $aIps );
|
98 |
}
|
99 |
|
100 |
-
/**
|
101 |
-
* @return bool
|
102 |
-
*/
|
103 |
-
public function isEnabledAutoUserRecover() {
|
104 |
-
return !$this->isOpt( 'user_auto_recover', 'disabled' );
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* @return bool
|
109 |
-
*/
|
110 |
-
public function isEnabledTrack404() {
|
111 |
-
return $this->isSelectOptionEnabled( 'track_404' );
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* @return bool
|
116 |
-
*/
|
117 |
-
public function isEnabledTrackFakeWebCrawler() {
|
118 |
-
return $this->isSelectOptionEnabled( 'track_fakewebcrawler' );
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @return bool
|
123 |
-
*/
|
124 |
-
public function isEnabledTrackLoginInvalid() {
|
125 |
-
return $this->isSelectOptionEnabled( 'track_logininvalid' );
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* @return bool
|
130 |
-
*/
|
131 |
-
public function isEnabledTrackLoginFailed() {
|
132 |
-
return $this->isSelectOptionEnabled( 'track_loginfailed' );
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* @return bool
|
137 |
-
*/
|
138 |
-
public function isEnabledTrackLinkCheese() {
|
139 |
-
return $this->isSelectOptionEnabled( 'track_linkcheese' );
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* @return bool
|
144 |
-
*/
|
145 |
-
public function isEnabledTrackXmlRpc() {
|
146 |
-
return $this->isSelectOptionEnabled( 'track_xmlrpc' );
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* @param string $sOptionKey
|
151 |
-
* @return bool
|
152 |
-
*/
|
153 |
-
public function isTrackOptTransgression( $sOptionKey ) {
|
154 |
-
return strpos( $this->getOpt( $sOptionKey ), 'transgression' ) !== false;
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* @param string $sOptionKey
|
159 |
-
* @return bool
|
160 |
-
*/
|
161 |
-
public function isTrackOptDoubleTransgression( $sOptionKey ) {
|
162 |
-
return $this->isOpt( $sOptionKey, 'transgression-double' );
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* @param string $sOptionKey
|
167 |
-
* @return bool
|
168 |
-
*/
|
169 |
-
public function isTrackOptLogOnly( $sOptionKey ) {
|
170 |
-
return $this->isOpt( $sOptionKey, 'log' );
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* @param string $sOptionKey
|
175 |
-
* @return bool
|
176 |
-
*/
|
177 |
-
public function isTrackOptImmediateBlock( $sOptionKey ) {
|
178 |
-
return $this->isOpt( $sOptionKey, 'block' );
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* @param string $sOptionKey
|
183 |
-
* @return bool
|
184 |
-
*/
|
185 |
-
protected function isSelectOptionEnabled( $sOptionKey ) {
|
186 |
-
$bOptPrem = $this->getOptionsVo()->isOptPremium( $sOptionKey );
|
187 |
-
return ( !$bOptPrem || $this->getCon()->isPremiumActive() ) && !$this->isOpt( $sOptionKey, 'disabled' );
|
188 |
-
}
|
189 |
-
|
190 |
/**
|
191 |
* @param string $sSection
|
192 |
* @return array
|
@@ -194,10 +74,13 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
194 |
protected function getSectionWarnings( $sSection ) {
|
195 |
$aWarnings = [];
|
196 |
|
|
|
|
|
|
|
197 |
switch ( $sSection ) {
|
198 |
|
199 |
case 'section_auto_black_list':
|
200 |
-
if ( !$
|
201 |
$aWarnings[] = sprintf( '%s: %s', __( 'Note', 'wp-simple-firewall' ), __( "IP blocking is turned-off because the offenses limit is set to 0.", 'wp-simple-firewall' ) );
|
202 |
}
|
203 |
break;
|
@@ -205,7 +88,7 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
205 |
case 'section_behaviours':
|
206 |
case 'section_probes':
|
207 |
case 'section_logins':
|
208 |
-
if ( !$
|
209 |
$aWarnings[] = __( "Since the offenses limit is set to 0, these options have no effect.", 'wp-simple-firewall' );
|
210 |
}
|
211 |
|
@@ -306,61 +189,126 @@ class ICWP_WPSF_FeatureHandler_Ips extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
306 |
}
|
307 |
|
308 |
/**
|
309 |
-
* @return Shield\
|
310 |
*/
|
311 |
-
protected function
|
312 |
-
return new Shield\
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
-
* @return
|
317 |
*/
|
318 |
-
protected function
|
319 |
-
return
|
320 |
}
|
321 |
|
322 |
/**
|
323 |
-
* @return
|
|
|
324 |
*/
|
325 |
-
|
326 |
-
return
|
327 |
}
|
328 |
|
329 |
/**
|
330 |
-
* @return
|
|
|
331 |
*/
|
332 |
-
|
333 |
-
return
|
334 |
}
|
335 |
|
336 |
/**
|
337 |
-
* @return
|
|
|
338 |
*/
|
339 |
-
|
340 |
-
return
|
341 |
}
|
342 |
|
343 |
/**
|
344 |
-
* @return
|
345 |
-
* @deprecated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
*/
|
347 |
-
public function
|
348 |
-
return $this->getOpt( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
|
351 |
/**
|
|
|
352 |
* @return bool
|
353 |
-
* @deprecated
|
354 |
*/
|
355 |
-
public function
|
356 |
-
return
|
357 |
}
|
358 |
|
359 |
/**
|
|
|
360 |
* @return bool
|
361 |
-
* @deprecated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
*/
|
363 |
-
public function
|
364 |
-
|
|
|
365 |
}
|
366 |
}
|
17 |
return $oIp->isValidIp_PublicRange( $oIp->getRequestIp() ) && parent::isReadyToExecute();
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
protected function doExtraSubmitProcessing() {
|
21 |
+
/** @var Shield\Modules\IPs\Options $oOpts */
|
22 |
+
$oOpts = $this->getOptions();
|
23 |
+
if ( !defined( strtoupper( $oOpts->getOpt( 'auto_expire' ).'_IN_SECONDS' ) ) ) {
|
24 |
+
$oOpts->resetOptToDefault( 'auto_expire' );
|
25 |
}
|
26 |
|
27 |
+
$nLimit = $oOpts->getOffenseLimit();
|
28 |
if ( !is_int( $nLimit ) || $nLimit < 0 ) {
|
29 |
+
$oOpts->resetOptToDefault( 'transgression_limit' );
|
30 |
}
|
31 |
}
|
32 |
|
49 |
return is_array( $aIps ) ? $aIps : [];
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/**
|
53 |
* @param string $sIp
|
54 |
* @return $this
|
67 |
return $this->setOpt( 'autounblock_ips', $aIps );
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* @param string $sSection
|
72 |
* @return array
|
74 |
protected function getSectionWarnings( $sSection ) {
|
75 |
$aWarnings = [];
|
76 |
|
77 |
+
/** @var Shield\Modules\IPs\Options $oOpts */
|
78 |
+
$oOpts = $this->getOptions();
|
79 |
+
|
80 |
switch ( $sSection ) {
|
81 |
|
82 |
case 'section_auto_black_list':
|
83 |
+
if ( !$oOpts->isEnabledAutoBlackList() ) {
|
84 |
$aWarnings[] = sprintf( '%s: %s', __( 'Note', 'wp-simple-firewall' ), __( "IP blocking is turned-off because the offenses limit is set to 0.", 'wp-simple-firewall' ) );
|
85 |
}
|
86 |
break;
|
88 |
case 'section_behaviours':
|
89 |
case 'section_probes':
|
90 |
case 'section_logins':
|
91 |
+
if ( !$oOpts->isEnabledAutoBlackList() ) {
|
92 |
$aWarnings[] = __( "Since the offenses limit is set to 0, these options have no effect.", 'wp-simple-firewall' );
|
93 |
}
|
94 |
|
189 |
}
|
190 |
|
191 |
/**
|
192 |
+
* @return Shield\Databases\IPs\Handler
|
193 |
*/
|
194 |
+
protected function loadDbHandler() {
|
195 |
+
return new Shield\Databases\IPs\Handler();
|
196 |
}
|
197 |
|
198 |
/**
|
199 |
+
* @return string
|
200 |
*/
|
201 |
+
protected function getNamespaceBase() {
|
202 |
+
return 'IPs';
|
203 |
}
|
204 |
|
205 |
/**
|
206 |
+
* @return string
|
207 |
+
* @deprecated 8.1
|
208 |
*/
|
209 |
+
public function getOptTransgressionLimit() {
|
210 |
+
return $this->getOpt( 'transgression_limit' );
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* @return bool
|
215 |
+
* @deprecated 8.1
|
216 |
*/
|
217 |
+
public function isAutoBlackListEnabled() {
|
218 |
+
return ( $this->getOptTransgressionLimit() > 0 );
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
+
* @return bool
|
223 |
+
* @deprecated 8.1
|
224 |
*/
|
225 |
+
public function isEnabledTrack404() {
|
226 |
+
return $this->isSelectOptionEnabled( 'track_404' );
|
227 |
}
|
228 |
|
229 |
/**
|
230 |
+
* @return bool
|
231 |
+
* @deprecated 8.1
|
232 |
+
*/
|
233 |
+
public function isEnabledTrackFakeWebCrawler() {
|
234 |
+
return $this->isSelectOptionEnabled( 'track_fakewebcrawler' );
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* @return bool
|
239 |
+
* @deprecated 8.1
|
240 |
+
*/
|
241 |
+
public function isEnabledTrackLoginInvalid() {
|
242 |
+
return $this->isSelectOptionEnabled( 'track_logininvalid' );
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* @return bool
|
247 |
+
* @deprecated 8.1
|
248 |
+
*/
|
249 |
+
public function isEnabledTrackLoginFailed() {
|
250 |
+
return $this->isSelectOptionEnabled( 'track_loginfailed' );
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* @return bool
|
255 |
+
* @deprecated 8.1
|
256 |
+
*/
|
257 |
+
public function isEnabledTrackLinkCheese() {
|
258 |
+
return $this->isSelectOptionEnabled( 'track_linkcheese' );
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* @return bool
|
263 |
+
* @deprecated 8.1
|
264 |
+
*/
|
265 |
+
public function isEnabledTrackXmlRpc() {
|
266 |
+
return $this->isSelectOptionEnabled( 'track_xmlrpc' );
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* @param string $sOptionKey
|
271 |
+
* @return bool
|
272 |
+
* @deprecated 8.1
|
273 |
*/
|
274 |
+
public function isTrackOptTransgression( $sOptionKey ) {
|
275 |
+
return strpos( $this->getOpt( $sOptionKey ), 'transgression' ) !== false;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* @param string $sOptionKey
|
280 |
+
* @return bool
|
281 |
+
* @deprecated 8.1
|
282 |
+
*/
|
283 |
+
public function isTrackOptDoubleTransgression( $sOptionKey ) {
|
284 |
+
return $this->isOpt( $sOptionKey, 'transgression-double' );
|
285 |
}
|
286 |
|
287 |
/**
|
288 |
+
* @param string $sOptionKey
|
289 |
* @return bool
|
290 |
+
* @deprecated 8.1
|
291 |
*/
|
292 |
+
public function isTrackOptImmediateBlock( $sOptionKey ) {
|
293 |
+
return $this->isOpt( $sOptionKey, 'block' );
|
294 |
}
|
295 |
|
296 |
/**
|
297 |
+
* @param string $sOptionKey
|
298 |
* @return bool
|
299 |
+
* @deprecated 8.1
|
300 |
+
*/
|
301 |
+
protected function isSelectOptionEnabled( $sOptionKey ) {
|
302 |
+
$bOptPrem = $this->getOptions()->isOptPremium( $sOptionKey );
|
303 |
+
return ( !$bOptPrem || $this->getCon()->isPremiumActive() ) && !$this->isOpt( $sOptionKey, 'disabled' );
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* @return int
|
308 |
+
* @deprecated 8.1
|
309 |
*/
|
310 |
+
public function getAutoExpireTime() {
|
311 |
+
$sConstant = strtoupper( $this->getOpt( 'auto_expire' ).'_IN_SECONDS' );
|
312 |
+
return defined( $sConstant ) ? constant( $sConstant ) : ( DAY_IN_SECONDS*30 );
|
313 |
}
|
314 |
}
|
src/features/license.php
CHANGED
@@ -64,12 +64,13 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
64 |
* @param string $sDeactivatedReason
|
65 |
*/
|
66 |
public function deactivate( $sDeactivatedReason = '' ) {
|
|
|
67 |
if ( $this->isLicenseActive() ) {
|
68 |
-
$
|
69 |
}
|
70 |
|
71 |
if ( !empty( $sDeactivatedReason ) ) {
|
72 |
-
$
|
73 |
}
|
74 |
// force all options to resave i.e. reset premium to defaults.
|
75 |
add_filter( $this->prefix( 'force_options_resave' ), '__return_true' );
|
@@ -92,8 +93,8 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
92 |
$oCurrent = $this->loadLicense();
|
93 |
|
94 |
$this->touchLicenseCheckFileFlag()
|
95 |
-
->setLicenseLastCheckedAt()
|
96 |
-
|
97 |
|
98 |
$oLookupLicense = $this->lookupOfficialLicense();
|
99 |
if ( $oLookupLicense->isValid() ) {
|
@@ -127,8 +128,8 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
127 |
}
|
128 |
|
129 |
$oCurrent->last_request_at = Services::Request()->ts();
|
130 |
-
$this->setLicenseData( $oCurrent )
|
131 |
-
|
132 |
}
|
133 |
|
134 |
return $this;
|
@@ -188,7 +189,7 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
188 |
*/
|
189 |
protected function activateLicense() {
|
190 |
if ( !$this->isLicenseActive() ) {
|
191 |
-
$this->setOptAt( 'license_activated_at'
|
192 |
}
|
193 |
return $this;
|
194 |
}
|
@@ -196,10 +197,16 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
196 |
/**
|
197 |
*/
|
198 |
protected function sendLicenseWarningEmail() {
|
199 |
-
$
|
|
|
|
|
|
|
|
|
200 |
|
201 |
if ( $bCanSend ) {
|
202 |
-
$
|
|
|
|
|
203 |
$aMessage = [
|
204 |
__( 'Attempts to verify Shield Pro license has just failed.', 'wp-simple-firewall' ),
|
205 |
sprintf( __( 'Please check your license on-site: %s', 'wp-simple-firewall' ), $this->getUrl_AdminPage() ),
|
@@ -217,10 +224,16 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
217 |
/**
|
218 |
*/
|
219 |
private function sendLicenseDeactivatedEmail() {
|
220 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
-
if ( ( $nNow - $this->getOpt( 'last_deactivated_email_sent_at' ) ) > DAY_IN_SECONDS ) {
|
223 |
-
$this->setOptAt( 'last_deactivated_email_sent_at' )->savePluginOptions();
|
224 |
$aMessage = [
|
225 |
__( 'All attempts to verify Shield Pro license have failed.', 'wp-simple-firewall' ),
|
226 |
sprintf( __( 'Please check your license on-site: %s', 'wp-simple-firewall' ), $this->getUrl_AdminPage() ),
|
@@ -243,8 +256,8 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
243 |
$sPass = wp_generate_password( 16 );
|
244 |
|
245 |
$this->setKeylessRequestAt()
|
246 |
-
->setKeylessRequestHash( sha1( $sPass.Services::WpGeneral()->getHomeUrl() ) )
|
247 |
-
|
248 |
|
249 |
$oLicense = ( new Utilities\Licenses\Lookup() )
|
250 |
->setRequestParams( [ 'nonce' => $sPass ] )
|
@@ -252,8 +265,8 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
252 |
|
253 |
// clear the handshake data
|
254 |
$this->setKeylessRequestAt( 0 )
|
255 |
-
->setKeylessRequestHash( '' )
|
256 |
-
|
257 |
|
258 |
return $oLicense;
|
259 |
}
|
@@ -407,7 +420,8 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
407 |
* @return $this
|
408 |
*/
|
409 |
protected function setLicenseLastCheckedAt( $nAt = null ) {
|
410 |
-
|
|
|
411 |
}
|
412 |
|
413 |
/**
|
@@ -580,23 +594,9 @@ class ICWP_WPSF_FeatureHandler_License extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
580 |
}
|
581 |
|
582 |
/**
|
583 |
-
* @return
|
584 |
-
*/
|
585 |
-
protected function loadAjaxHandler() {
|
586 |
-
return new Shield\Modules\License\AjaxHandler;
|
587 |
-
}
|
588 |
-
|
589 |
-
/**
|
590 |
-
* @return Shield\Modules\License\Options
|
591 |
-
*/
|
592 |
-
protected function loadOptions() {
|
593 |
-
return new Shield\Modules\License\Options();
|
594 |
-
}
|
595 |
-
|
596 |
-
/**
|
597 |
-
* @return Shield\Modules\License\Strings
|
598 |
*/
|
599 |
-
protected function
|
600 |
-
return
|
601 |
}
|
602 |
}
|
64 |
* @param string $sDeactivatedReason
|
65 |
*/
|
66 |
public function deactivate( $sDeactivatedReason = '' ) {
|
67 |
+
$oOpts = $this->getOptions();
|
68 |
if ( $this->isLicenseActive() ) {
|
69 |
+
$oOpts->setOptAt( 'license_deactivated_at' );
|
70 |
}
|
71 |
|
72 |
if ( !empty( $sDeactivatedReason ) ) {
|
73 |
+
$oOpts->setOpt( 'license_deactivated_reason', $sDeactivatedReason );
|
74 |
}
|
75 |
// force all options to resave i.e. reset premium to defaults.
|
76 |
add_filter( $this->prefix( 'force_options_resave' ), '__return_true' );
|
93 |
$oCurrent = $this->loadLicense();
|
94 |
|
95 |
$this->touchLicenseCheckFileFlag()
|
96 |
+
->setLicenseLastCheckedAt();
|
97 |
+
$this->saveModOptions();
|
98 |
|
99 |
$oLookupLicense = $this->lookupOfficialLicense();
|
100 |
if ( $oLookupLicense->isValid() ) {
|
128 |
}
|
129 |
|
130 |
$oCurrent->last_request_at = Services::Request()->ts();
|
131 |
+
$this->setLicenseData( $oCurrent );
|
132 |
+
$this->saveModOptions();
|
133 |
}
|
134 |
|
135 |
return $this;
|
189 |
*/
|
190 |
protected function activateLicense() {
|
191 |
if ( !$this->isLicenseActive() ) {
|
192 |
+
$this->getOptions()->setOptAt( 'license_activated_at' );
|
193 |
}
|
194 |
return $this;
|
195 |
}
|
197 |
/**
|
198 |
*/
|
199 |
protected function sendLicenseWarningEmail() {
|
200 |
+
$oOpts = $this->getOptions();
|
201 |
+
|
202 |
+
$bCanSend = Services::Request()
|
203 |
+
->carbon()
|
204 |
+
->subDay( 1 )->timestamp > $oOpts->getOpt( 'last_warning_email_sent_at' );
|
205 |
|
206 |
if ( $bCanSend ) {
|
207 |
+
$oOpts->setOptAt( 'last_warning_email_sent_at' );
|
208 |
+
$this->saveModOptions();
|
209 |
+
|
210 |
$aMessage = [
|
211 |
__( 'Attempts to verify Shield Pro license has just failed.', 'wp-simple-firewall' ),
|
212 |
sprintf( __( 'Please check your license on-site: %s', 'wp-simple-firewall' ), $this->getUrl_AdminPage() ),
|
224 |
/**
|
225 |
*/
|
226 |
private function sendLicenseDeactivatedEmail() {
|
227 |
+
$oOpts = $this->getOptions();
|
228 |
+
|
229 |
+
$bCanSend = Services::Request()
|
230 |
+
->carbon()
|
231 |
+
->subDay( 1 )->timestamp > $oOpts->getOpt( 'last_deactivated_email_sent_at' );
|
232 |
+
|
233 |
+
if ( $bCanSend ) {
|
234 |
+
$oOpts->setOptAt( 'last_deactivated_email_sent_at' );
|
235 |
+
$this->saveModOptions();
|
236 |
|
|
|
|
|
237 |
$aMessage = [
|
238 |
__( 'All attempts to verify Shield Pro license have failed.', 'wp-simple-firewall' ),
|
239 |
sprintf( __( 'Please check your license on-site: %s', 'wp-simple-firewall' ), $this->getUrl_AdminPage() ),
|
256 |
$sPass = wp_generate_password( 16 );
|
257 |
|
258 |
$this->setKeylessRequestAt()
|
259 |
+
->setKeylessRequestHash( sha1( $sPass.Services::WpGeneral()->getHomeUrl() ) );
|
260 |
+
$this->saveModOptions();
|
261 |
|
262 |
$oLicense = ( new Utilities\Licenses\Lookup() )
|
263 |
->setRequestParams( [ 'nonce' => $sPass ] )
|
265 |
|
266 |
// clear the handshake data
|
267 |
$this->setKeylessRequestAt( 0 )
|
268 |
+
->setKeylessRequestHash( '' );
|
269 |
+
$this->saveModOptions();
|
270 |
|
271 |
return $oLicense;
|
272 |
}
|
420 |
* @return $this
|
421 |
*/
|
422 |
protected function setLicenseLastCheckedAt( $nAt = null ) {
|
423 |
+
$this->getOptions()->setOptAt( 'license_last_checked_at', $nAt );
|
424 |
+
return $this;
|
425 |
}
|
426 |
|
427 |
/**
|
594 |
}
|
595 |
|
596 |
/**
|
597 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
*/
|
599 |
+
protected function getNamespaceBase() {
|
600 |
+
return 'License';
|
601 |
}
|
602 |
}
|
src/features/lockdown.php
CHANGED
@@ -167,16 +167,9 @@ class ICWP_WPSF_FeatureHandler_Lockdown extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
167 |
}
|
168 |
|
169 |
/**
|
170 |
-
* @return
|
171 |
*/
|
172 |
-
protected function
|
173 |
-
return
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* @return Shield\Modules\Lockdown\Strings
|
178 |
-
*/
|
179 |
-
protected function loadStrings() {
|
180 |
-
return new Shield\Modules\Lockdown\Strings();
|
181 |
}
|
182 |
}
|
167 |
}
|
168 |
|
169 |
/**
|
170 |
+
* @return string
|
171 |
*/
|
172 |
+
protected function getNamespaceBase() {
|
173 |
+
return 'Lockdown';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
}
|
src/features/login_protect.php
CHANGED
@@ -63,8 +63,8 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
|
|
63 |
* @uses wp_redirect()
|
64 |
*/
|
65 |
private function processEmailSendVerify() {
|
66 |
-
$this->setIfCanSendEmail( true )
|
67 |
-
|
68 |
|
69 |
if ( $this->getIfCanSendEmailVerified() ) {
|
70 |
$bSuccess = true;
|
@@ -390,7 +390,7 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
|
|
390 |
*/
|
391 |
public function getBotProtectionLocations() {
|
392 |
$aLocs = $this->getOpt( 'bot_protection_locations' );
|
393 |
-
return is_array( $aLocs ) ? $aLocs : (array)$this->
|
394 |
}
|
395 |
|
396 |
/**
|
@@ -651,30 +651,9 @@ class ICWP_WPSF_FeatureHandler_LoginProtect extends ICWP_WPSF_FeatureHandler_Bas
|
|
651 |
}
|
652 |
|
653 |
/**
|
654 |
-
* @return
|
655 |
-
*/
|
656 |
-
protected function loadAdminNotices() {
|
657 |
-
return new Shield\Modules\LoginGuard\AdminNotices();
|
658 |
-
}
|
659 |
-
|
660 |
-
/**
|
661 |
-
* @return Shield\Modules\LoginGuard\AjaxHandler
|
662 |
-
*/
|
663 |
-
protected function loadAjaxHandler() {
|
664 |
-
return new Shield\Modules\LoginGuard\AjaxHandler;
|
665 |
-
}
|
666 |
-
|
667 |
-
/**
|
668 |
-
* @return Shield\Modules\LoginGuard\Options
|
669 |
-
*/
|
670 |
-
protected function loadOptions() {
|
671 |
-
return new Shield\Modules\LoginGuard\Options();
|
672 |
-
}
|
673 |
-
|
674 |
-
/**
|
675 |
-
* @return Shield\Modules\LoginGuard\Strings
|
676 |
*/
|
677 |
-
protected function
|
678 |
-
return
|
679 |
}
|
680 |
}
|
63 |
* @uses wp_redirect()
|
64 |
*/
|
65 |
private function processEmailSendVerify() {
|
66 |
+
$this->setIfCanSendEmail( true );
|
67 |
+
$this->saveModOptions();
|
68 |
|
69 |
if ( $this->getIfCanSendEmailVerified() ) {
|
70 |
$bSuccess = true;
|
390 |
*/
|
391 |
public function getBotProtectionLocations() {
|
392 |
$aLocs = $this->getOpt( 'bot_protection_locations' );
|
393 |
+
return is_array( $aLocs ) ? $aLocs : (array)$this->getOptions()->getOptDefault( 'bot_protection_locations' );
|
394 |
}
|
395 |
|
396 |
/**
|
651 |
}
|
652 |
|
653 |
/**
|
654 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
*/
|
656 |
+
protected function getNamespaceBase() {
|
657 |
+
return 'LoginGuard';
|
658 |
}
|
659 |
}
|
src/features/plugin.php
CHANGED
@@ -72,15 +72,16 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
72 |
* @return string
|
73 |
*/
|
74 |
public function getMyServerIp() {
|
|
|
75 |
|
76 |
-
$sThisServerIp = $
|
77 |
if ( $this->getLastCheckServerIpAtHasExpired() ) {
|
78 |
$sThisServerIp = Services::IP()->whatIsMyIp();
|
79 |
if ( !empty( $sThisServerIp ) ) {
|
80 |
-
$
|
81 |
}
|
82 |
// we always update so we don't forever check on every single page load
|
83 |
-
$
|
84 |
}
|
85 |
return $sThisServerIp;
|
86 |
}
|
@@ -660,9 +661,8 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
660 |
* @return $this
|
661 |
*/
|
662 |
public function setImportExportMasterImportUrl( $sUrl ) {
|
663 |
-
$this->setOpt( 'importexport_masterurl', $sUrl )
|
664 |
-
|
665 |
-
return $this;
|
666 |
}
|
667 |
|
668 |
/**
|
@@ -849,31 +849,10 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
849 |
}
|
850 |
|
851 |
/**
|
852 |
-
* @return
|
853 |
-
*/
|
854 |
-
protected function loadAdminNotices() {
|
855 |
-
return new Shield\Modules\Plugin\AdminNotices();
|
856 |
-
}
|
857 |
-
|
858 |
-
/**
|
859 |
-
* @return Shield\Modules\Plugin\AjaxHandler
|
860 |
-
*/
|
861 |
-
protected function loadAjaxHandler() {
|
862 |
-
return new Shield\Modules\Plugin\AjaxHandler;
|
863 |
-
}
|
864 |
-
|
865 |
-
/**
|
866 |
-
* @return Shield\Modules\Plugin\Options
|
867 |
-
*/
|
868 |
-
protected function loadOptions() {
|
869 |
-
return new Shield\Modules\Plugin\Options();
|
870 |
-
}
|
871 |
-
|
872 |
-
/**
|
873 |
-
* @return Shield\Modules\Plugin\Strings
|
874 |
*/
|
875 |
-
protected function
|
876 |
-
return
|
877 |
}
|
878 |
|
879 |
/**
|
@@ -882,12 +861,4 @@ class ICWP_WPSF_FeatureHandler_Plugin extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
882 |
public function getSurveyEmail() {
|
883 |
return base64_decode( $this->getDef( 'survey_email' ) );
|
884 |
}
|
885 |
-
|
886 |
-
/**
|
887 |
-
* @return array
|
888 |
-
* @deprecated
|
889 |
-
*/
|
890 |
-
public function supplyGoogleRecaptchaConfig() {
|
891 |
-
return $this->getGoogleRecaptchaConfig();
|
892 |
-
}
|
893 |
}
|
72 |
* @return string
|
73 |
*/
|
74 |
public function getMyServerIp() {
|
75 |
+
$oOpts = $this->getOptions();
|
76 |
|
77 |
+
$sThisServerIp = $oOpts->getOpt( 'this_server_ip', '' );
|
78 |
if ( $this->getLastCheckServerIpAtHasExpired() ) {
|
79 |
$sThisServerIp = Services::IP()->whatIsMyIp();
|
80 |
if ( !empty( $sThisServerIp ) ) {
|
81 |
+
$oOpts->setOpt( 'this_server_ip', $sThisServerIp );
|
82 |
}
|
83 |
// we always update so we don't forever check on every single page load
|
84 |
+
$oOpts->setOptAt( 'this_server_ip_last_check_at' );
|
85 |
}
|
86 |
return $sThisServerIp;
|
87 |
}
|
661 |
* @return $this
|
662 |
*/
|
663 |
public function setImportExportMasterImportUrl( $sUrl ) {
|
664 |
+
$this->setOpt( 'importexport_masterurl', $sUrl ); //saving will clean the URL
|
665 |
+
return $this->saveModOptions();
|
|
|
666 |
}
|
667 |
|
668 |
/**
|
849 |
}
|
850 |
|
851 |
/**
|
852 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
853 |
*/
|
854 |
+
protected function getNamespaceBase() {
|
855 |
+
return 'Plugin';
|
856 |
}
|
857 |
|
858 |
/**
|
861 |
public function getSurveyEmail() {
|
862 |
return base64_decode( $this->getDef( 'survey_email' ) );
|
863 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
864 |
}
|
src/features/sessions.php
CHANGED
@@ -5,17 +5,6 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_Sessions extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
8 |
-
/**
|
9 |
-
* Override this and adapt per feature
|
10 |
-
* @return ICWP_WPSF_Processor_Sessions
|
11 |
-
* @deprecated 7.5
|
12 |
-
*/
|
13 |
-
protected function loadProcessor() {
|
14 |
-
$oP = parent::loadProcessor();
|
15 |
-
self::$oSessProcessor = $oP;
|
16 |
-
return $oP;
|
17 |
-
}
|
18 |
-
|
19 |
/**
|
20 |
* @return bool
|
21 |
*/
|
@@ -37,16 +26,9 @@ class ICWP_WPSF_FeatureHandler_Sessions extends ICWP_WPSF_FeatureHandler_BaseWps
|
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
-
* @return
|
41 |
-
*/
|
42 |
-
protected function loadOptions() {
|
43 |
-
return new Shield\Modules\Sessions\Options();
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @return Shield\Modules\Sessions\Strings
|
48 |
*/
|
49 |
-
protected function
|
50 |
-
return
|
51 |
}
|
52 |
}
|
5 |
|
6 |
class ICWP_WPSF_FeatureHandler_Sessions extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
* @return bool
|
10 |
*/
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
*/
|
31 |
+
protected function getNamespaceBase() {
|
32 |
+
return 'Sessions';
|
33 |
}
|
34 |
}
|
src/features/statistics.php
CHANGED
@@ -110,16 +110,9 @@ class ICWP_WPSF_FeatureHandler_Statistics extends ICWP_WPSF_FeatureHandler_BaseW
|
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
-
* @return
|
114 |
*/
|
115 |
-
protected function
|
116 |
-
return
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* @return Shield\Modules\Statistics\Strings
|
121 |
-
*/
|
122 |
-
protected function loadStrings() {
|
123 |
-
return new Shield\Modules\Statistics\Strings();
|
124 |
}
|
125 |
}
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
+
* @return string
|
114 |
*/
|
115 |
+
protected function getNamespaceBase() {
|
116 |
+
return 'Statistics';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
118 |
}
|
src/features/traffic.php
CHANGED
@@ -21,11 +21,6 @@ class ICWP_WPSF_FeatureHandler_Traffic extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
21 |
* We clean the database after saving.
|
22 |
*/
|
23 |
protected function doExtraSubmitProcessing() {
|
24 |
-
/** @var ICWP_WPSF_Processor_Traffic $oPro */
|
25 |
-
$oPro = $this->getProcessor();
|
26 |
-
$oPro->getProcessorLogger()
|
27 |
-
->cleanupDatabase();
|
28 |
-
|
29 |
$this->setOpt( 'autodisable_at', $this->isAutoDisable() ? Services::Request()->ts() + WEEK_IN_SECONDS : 0 );
|
30 |
|
31 |
$aExcls = $this->getCustomExclusions();
|
@@ -86,13 +81,6 @@ class ICWP_WPSF_FeatureHandler_Traffic extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
86 |
return is_array( $aEx ) ? $aEx : [];
|
87 |
}
|
88 |
|
89 |
-
/**
|
90 |
-
* @return int
|
91 |
-
*/
|
92 |
-
public function getMaxEntries() {
|
93 |
-
return (int)$this->getOpt( 'max_entries' );
|
94 |
-
}
|
95 |
-
|
96 |
/**
|
97 |
* @return int
|
98 |
*/
|
@@ -163,13 +151,6 @@ class ICWP_WPSF_FeatureHandler_Traffic extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
163 |
return $this->isIncluded_LoggedInUser();
|
164 |
}
|
165 |
|
166 |
-
/**
|
167 |
-
* @return Shield\Modules\Traffic\AjaxHandler
|
168 |
-
*/
|
169 |
-
protected function loadAjaxHandler() {
|
170 |
-
return new Shield\Modules\Traffic\AjaxHandler;
|
171 |
-
}
|
172 |
-
|
173 |
/**
|
174 |
* @return Shield\Databases\Traffic\Handler
|
175 |
*/
|
@@ -178,16 +159,17 @@ class ICWP_WPSF_FeatureHandler_Traffic extends ICWP_WPSF_FeatureHandler_BaseWpsf
|
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
-
* @return
|
182 |
*/
|
183 |
-
protected function
|
184 |
-
return
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
-
* @return
|
|
|
189 |
*/
|
190 |
-
|
191 |
-
return
|
192 |
}
|
193 |
}
|
21 |
* We clean the database after saving.
|
22 |
*/
|
23 |
protected function doExtraSubmitProcessing() {
|
|
|
|
|
|
|
|
|
|
|
24 |
$this->setOpt( 'autodisable_at', $this->isAutoDisable() ? Services::Request()->ts() + WEEK_IN_SECONDS : 0 );
|
25 |
|
26 |
$aExcls = $this->getCustomExclusions();
|
81 |
return is_array( $aEx ) ? $aEx : [];
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
/**
|
85 |
* @return int
|
86 |
*/
|
151 |
return $this->isIncluded_LoggedInUser();
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
/**
|
155 |
* @return Shield\Databases\Traffic\Handler
|
156 |
*/
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
+
* @return string
|
163 |
*/
|
164 |
+
protected function getNamespaceBase() {
|
165 |
+
return 'Traffic';
|
166 |
}
|
167 |
|
168 |
/**
|
169 |
+
* @return int
|
170 |
+
* @deprecated 8.1
|
171 |
*/
|
172 |
+
public function getMaxEntries() {
|
173 |
+
return (int)$this->getOpt( 'max_entries' );
|
174 |
}
|
175 |
}
|
src/features/user_management.php
CHANGED
@@ -3,16 +3,34 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_BaseWpsf {
|
7 |
-
|
8 |
-
use Shield\AuditTrail\Auditor;
|
9 |
|
10 |
/**
|
11 |
* Should have no default email. If no email is set, no notification is sent.
|
12 |
-
* @return string
|
13 |
-
*/
|
14 |
-
public function
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
/**
|
@@ -44,9 +62,7 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_B
|
|
44 |
}
|
45 |
|
46 |
protected function doExtraSubmitProcessing() {
|
47 |
-
|
48 |
-
$this->getOptionsVo()->resetOptToDefault( 'enable_admin_login_email_notification' );
|
49 |
-
}
|
50 |
|
51 |
if ( $this->getIdleTimeoutInterval() > $this->getMaxSessionTime() ) {
|
52 |
$this->setOpt( 'session_idle_timeout_interval', $this->getOpt( 'session_timeout_interval' )*24 );
|
@@ -76,18 +92,6 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_B
|
|
76 |
}
|
77 |
}
|
78 |
|
79 |
-
/**
|
80 |
-
* @return bool
|
81 |
-
*/
|
82 |
-
public function isAutoAddSessions() {
|
83 |
-
$nStartedAt = $this->getOpt( 'autoadd_sessions_started_at', 0 );
|
84 |
-
if ( $nStartedAt < 1 ) {
|
85 |
-
$nStartedAt = Services::Request()->ts();
|
86 |
-
$this->setOpt( 'autoadd_sessions_started_at', $nStartedAt );
|
87 |
-
}
|
88 |
-
return ( Services::Request()->ts() - $nStartedAt ) < 20;
|
89 |
-
}
|
90 |
-
|
91 |
/**
|
92 |
* @return bool
|
93 |
*/
|
@@ -95,13 +99,6 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_B
|
|
95 |
return $this->isOpt( 'session_lock_location', 'Y' );
|
96 |
}
|
97 |
|
98 |
-
/**
|
99 |
-
* @return bool
|
100 |
-
*/
|
101 |
-
public function isSendAdminEmailLoginNotification() {
|
102 |
-
return Services::Data()->validEmail( $this->getAdminLoginNotificationEmail() );
|
103 |
-
}
|
104 |
-
|
105 |
/**
|
106 |
* @return bool
|
107 |
*/
|
@@ -157,7 +154,7 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_B
|
|
157 |
*/
|
158 |
public function isPasswordPoliciesEnabled() {
|
159 |
return $this->isOpt( 'enable_password_policies', 'Y' )
|
160 |
-
&& $this->
|
161 |
}
|
162 |
|
163 |
/**
|
@@ -395,23 +392,18 @@ class ICWP_WPSF_FeatureHandler_UserManagement extends ICWP_WPSF_FeatureHandler_B
|
|
395 |
}
|
396 |
|
397 |
/**
|
398 |
-
* @return
|
399 |
-
*/
|
400 |
-
protected function loadAjaxHandler() {
|
401 |
-
return new Shield\Modules\UserManagement\AjaxHandler;
|
402 |
-
}
|
403 |
-
|
404 |
-
/**
|
405 |
-
* @return Shield\Modules\UserManagement\Options
|
406 |
*/
|
407 |
-
protected function
|
408 |
-
return
|
409 |
}
|
410 |
|
411 |
/**
|
412 |
-
*
|
|
|
|
|
413 |
*/
|
414 |
-
|
415 |
-
return
|
416 |
}
|
417 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_FeatureHandler_UserManagement extends \ICWP_WPSF_FeatureHandler_BaseWpsf {
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* Should have no default email. If no email is set, no notification is sent.
|
10 |
+
* @return string[]
|
11 |
+
*/
|
12 |
+
public function getAdminLoginNotificationEmails() {
|
13 |
+
$aEmails = [];
|
14 |
+
|
15 |
+
$sEmails = $this->getOpt( 'enable_admin_login_email_notification', '' );
|
16 |
+
if ( !empty( $sEmails ) ) {
|
17 |
+
$aEmails = array_values( array_filter(
|
18 |
+
array_map(
|
19 |
+
function ( $sEmail ) {
|
20 |
+
return trim( strtolower( $sEmail ) );
|
21 |
+
},
|
22 |
+
explode( ',', $sEmails )
|
23 |
+
),
|
24 |
+
function ( $sEmail ) {
|
25 |
+
return Services::Data()->validEmail( $sEmail );
|
26 |
+
}
|
27 |
+
) );
|
28 |
+
if ( !$this->isPremium() && !empty( $aEmails ) ) {
|
29 |
+
$aEmails = array_slice( $aEmails, 0, 1 );
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
return $aEmails;
|
34 |
}
|
35 |
|
36 |
/**
|
62 |
}
|
63 |
|
64 |
protected function doExtraSubmitProcessing() {
|
65 |
+
$this->setOpt( 'enable_admin_login_email_notification', implode( ', ', $this->getAdminLoginNotificationEmails() ) );
|
|
|
|
|
66 |
|
67 |
if ( $this->getIdleTimeoutInterval() > $this->getMaxSessionTime() ) {
|
68 |
$this->setOpt( 'session_idle_timeout_interval', $this->getOpt( 'session_timeout_interval' )*24 );
|
92 |
}
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
/**
|
96 |
* @return bool
|
97 |
*/
|
99 |
return $this->isOpt( 'session_lock_location', 'Y' );
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* @return bool
|
104 |
*/
|
154 |
*/
|
155 |
public function isPasswordPoliciesEnabled() {
|
156 |
return $this->isOpt( 'enable_password_policies', 'Y' )
|
157 |
+
&& $this->getOptions()->isOptReqsMet( 'enable_password_policies' );
|
158 |
}
|
159 |
|
160 |
/**
|
392 |
}
|
393 |
|
394 |
/**
|
395 |
+
* @return string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
*/
|
397 |
+
protected function getNamespaceBase() {
|
398 |
+
return 'UserManagement';
|
399 |
}
|
400 |
|
401 |
/**
|
402 |
+
* Should have no default email. If no email is set, no notification is sent.
|
403 |
+
* @return string
|
404 |
+
* @deprecated 8.1
|
405 |
*/
|
406 |
+
public function getAdminLoginNotificationEmail() {
|
407 |
+
return $this->getOpt( 'enable_admin_login_email_notification', '' );
|
408 |
}
|
409 |
}
|
src/lib/src/AuditTrail/Auditor.php
CHANGED
@@ -8,20 +8,7 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
8 |
/**
|
9 |
* Trait Auditor
|
10 |
* @package FernleafSystems\Wordpress\Plugin\Shield\AuditTrail
|
11 |
-
* @deprecated
|
12 |
*/
|
13 |
trait Auditor {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @param string $sContext
|
17 |
-
* @param string $sMsg
|
18 |
-
* @param int $nCategory
|
19 |
-
* @param string $sEvent
|
20 |
-
* @param array $aEventData
|
21 |
-
* @return EntryVO
|
22 |
-
* @deprecated 7.5
|
23 |
-
*/
|
24 |
-
public function createNewAudit( $sContext, $sMsg, $nCategory = 1, $sEvent = '', $aEventData = [] ) {
|
25 |
-
return null;
|
26 |
-
}
|
27 |
}
|
8 |
/**
|
9 |
* Trait Auditor
|
10 |
* @package FernleafSystems\Wordpress\Plugin\Shield\AuditTrail
|
11 |
+
* @deprecated 8.1
|
12 |
*/
|
13 |
trait Auditor {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
src/lib/src/Controller/Controller.php
CHANGED
@@ -1934,7 +1934,8 @@ class Controller extends Shield\Deprecated\Foundation {
|
|
1934 |
public function overrideTranslations( $sMoFilePath, $sDomain ) {
|
1935 |
if ( $sDomain == $this->getTextDomain() ) {
|
1936 |
|
1937 |
-
|
|
|
1938 |
|
1939 |
/**
|
1940 |
* Cater for duplicate language translations that don't exist (yet)
|
@@ -2044,6 +2045,11 @@ class Controller extends Shield\Deprecated\Foundation {
|
|
2044 |
$sName = $this->getPluginSpec_Menu( 'title' );
|
2045 |
$sHref = $this->getPluginSpec()[ 'meta' ][ 'privacy_policy_href' ];
|
2046 |
}
|
|
|
|
|
|
|
|
|
|
|
2047 |
$sContent = $this->getRenderer()
|
2048 |
->setTemplate( 'snippets/privacy_policy' )
|
2049 |
->setTemplateEngineTwig()
|
@@ -2051,7 +2057,7 @@ class Controller extends Shield\Deprecated\Foundation {
|
|
2051 |
[
|
2052 |
'name' => $sName,
|
2053 |
'href' => $sHref,
|
2054 |
-
'audit_trail_days' => $
|
2055 |
]
|
2056 |
)
|
2057 |
->render();
|
@@ -2062,19 +2068,6 @@ class Controller extends Shield\Deprecated\Foundation {
|
|
2062 |
return empty( $sContent ) ? '' : wp_kses_post( wpautop( $sContent, false ) );
|
2063 |
}
|
2064 |
|
2065 |
-
/**
|
2066 |
-
* v5.4.1: Nasty looping bug in here where this function was called within the 'user_has_cap' filter
|
2067 |
-
* so we removed the "current_user_can()" or any such sub-call within this function
|
2068 |
-
* @return bool
|
2069 |
-
* @deprecated v6.10.7
|
2070 |
-
*/
|
2071 |
-
public function getHasPermissionToManage() {
|
2072 |
-
if ( apply_filters( $this->prefix( 'bypass_permission_to_manage' ), false ) ) {
|
2073 |
-
return true;
|
2074 |
-
}
|
2075 |
-
return ( $this->isPluginAdmin() && apply_filters( $this->prefix( 'is_plugin_admin' ), true ) );
|
2076 |
-
}
|
2077 |
-
|
2078 |
private function runTests() {
|
2079 |
die();
|
2080 |
( new Shield\Tests\VerifyUniqueEvents() )->setCon( $this )->run();
|
1934 |
public function overrideTranslations( $sMoFilePath, $sDomain ) {
|
1935 |
if ( $sDomain == $this->getTextDomain() ) {
|
1936 |
|
1937 |
+
// use determine_locale() as it also considers the user's profile preference
|
1938 |
+
$sLocale = apply_filters( 'shield_force_locale', determine_locale() );
|
1939 |
|
1940 |
/**
|
1941 |
* Cater for duplicate language translations that don't exist (yet)
|
2045 |
$sName = $this->getPluginSpec_Menu( 'title' );
|
2046 |
$sHref = $this->getPluginSpec()[ 'meta' ][ 'privacy_policy_href' ];
|
2047 |
}
|
2048 |
+
|
2049 |
+
/** @var Shield\Modules\AuditTrail\Options $oOpts */
|
2050 |
+
$oOpts = $this->getModule_AuditTrail()
|
2051 |
+
->getOptions();
|
2052 |
+
|
2053 |
$sContent = $this->getRenderer()
|
2054 |
->setTemplate( 'snippets/privacy_policy' )
|
2055 |
->setTemplateEngineTwig()
|
2057 |
[
|
2058 |
'name' => $sName,
|
2059 |
'href' => $sHref,
|
2060 |
+
'audit_trail_days' => $oOpts->getAutoCleanDays()
|
2061 |
]
|
2062 |
)
|
2063 |
->render();
|
2068 |
return empty( $sContent ) ? '' : wp_kses_post( wpautop( $sContent, false ) );
|
2069 |
}
|
2070 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2071 |
private function runTests() {
|
2072 |
die();
|
2073 |
( new Shield\Tests\VerifyUniqueEvents() )->setCon( $this )->run();
|
src/lib/src/Crons/StandardCron.php
CHANGED
@@ -20,7 +20,7 @@ trait StandardCron {
|
|
20 |
}
|
21 |
catch ( \Exception $oE ) {
|
22 |
}
|
23 |
-
add_action( $this->prefix( 'deactivate_plugin' ), [ $this, 'deleteCron' ] );
|
24 |
}
|
25 |
|
26 |
/**
|
@@ -29,7 +29,9 @@ trait StandardCron {
|
|
29 |
protected function getCronRecurrence() {
|
30 |
$sFreq = $this->getCronFrequency();
|
31 |
$aStdIntervals = array_keys( wp_get_schedules() );
|
32 |
-
return in_array( $sFreq, $aStdIntervals ) ?
|
|
|
|
|
33 |
}
|
34 |
|
35 |
/**
|
20 |
}
|
21 |
catch ( \Exception $oE ) {
|
22 |
}
|
23 |
+
add_action( $this->getCon()->prefix( 'deactivate_plugin' ), [ $this, 'deleteCron' ] );
|
24 |
}
|
25 |
|
26 |
/**
|
29 |
protected function getCronRecurrence() {
|
30 |
$sFreq = $this->getCronFrequency();
|
31 |
$aStdIntervals = array_keys( wp_get_schedules() );
|
32 |
+
return in_array( $sFreq, $aStdIntervals ) ?
|
33 |
+
$sFreq
|
34 |
+
: $this->getCon()->prefix( sprintf( 'per-day-%s', $sFreq ) );
|
35 |
}
|
36 |
|
37 |
/**
|
src/lib/src/Databases/AuditTrail/Select.php
CHANGED
@@ -7,6 +7,13 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
7 |
|
8 |
class Select extends Base\Select {
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* @return string[]
|
12 |
*/
|
@@ -22,12 +29,12 @@ class Select extends Base\Select {
|
|
22 |
}
|
23 |
|
24 |
/**
|
25 |
-
* @param string $
|
26 |
* @return $this
|
27 |
*/
|
28 |
-
public function
|
29 |
-
if ( !empty( $
|
30 |
-
$this->addWhereEquals( '
|
31 |
}
|
32 |
return $this;
|
33 |
}
|
@@ -79,11 +86,13 @@ class Select extends Base\Select {
|
|
79 |
|
80 |
/**
|
81 |
* @param string $sContext
|
82 |
-
* @return
|
|
|
83 |
*/
|
84 |
-
public function
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
88 |
}
|
89 |
}
|
7 |
|
8 |
class Select extends Base\Select {
|
9 |
|
10 |
+
/**
|
11 |
+
* @return string[]
|
12 |
+
*/
|
13 |
+
public function getDistinctEvents() {
|
14 |
+
return $this->getDistinct_FilterAndSort( 'event' );
|
15 |
+
}
|
16 |
+
|
17 |
/**
|
18 |
* @return string[]
|
19 |
*/
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
+
* @param string $sEvent
|
33 |
* @return $this
|
34 |
*/
|
35 |
+
public function filterByEvent( $sEvent ) {
|
36 |
+
if ( !empty( $sEvent ) && strtolower( $sEvent ) != 'all' ) {
|
37 |
+
$this->addWhereEquals( 'event', $sEvent );
|
38 |
}
|
39 |
return $this;
|
40 |
}
|
86 |
|
87 |
/**
|
88 |
* @param string $sContext
|
89 |
+
* @return $this
|
90 |
+
* @deprecated 8.1
|
91 |
*/
|
92 |
+
public function filterByContext( $sContext ) {
|
93 |
+
if ( !empty( $sContext ) && strtolower( $sContext ) != 'all' ) {
|
94 |
+
$this->addWhereEquals( 'context', $sContext );
|
95 |
+
}
|
96 |
+
return $this;
|
97 |
}
|
98 |
}
|
src/lib/src/Databases/Base/EntryVO.php
CHANGED
@@ -7,10 +7,10 @@ use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
|
7 |
/**
|
8 |
* Class BaseEntryVO
|
9 |
*
|
10 |
-
* @property
|
11 |
-
* @property
|
12 |
-
* @property int
|
13 |
-
* @property int
|
14 |
*/
|
15 |
class EntryVO {
|
16 |
|
@@ -95,6 +95,7 @@ class EntryVO {
|
|
95 |
|
96 |
/**
|
97 |
* @return int
|
|
|
98 |
*/
|
99 |
public function getId() {
|
100 |
return (int)$this->id;
|
7 |
/**
|
8 |
* Class BaseEntryVO
|
9 |
*
|
10 |
+
* @property int $id
|
11 |
+
* @property array $meta
|
12 |
+
* @property int $created_at
|
13 |
+
* @property int $deleted_at
|
14 |
*/
|
15 |
class EntryVO {
|
16 |
|
95 |
|
96 |
/**
|
97 |
* @return int
|
98 |
+
* @deprecated
|
99 |
*/
|
100 |
public function getId() {
|
101 |
return (int)$this->id;
|
src/lib/src/Databases/Base/Handler.php
CHANGED
@@ -30,11 +30,6 @@ class Handler {
|
|
30 |
*/
|
31 |
protected $sTable;
|
32 |
|
33 |
-
/**
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
protected $sNamespace;
|
37 |
-
|
38 |
/**
|
39 |
* @var bool
|
40 |
*/
|
30 |
*/
|
31 |
protected $sTable;
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* @var bool
|
35 |
*/
|
src/lib/src/Databases/Base/Select.php
CHANGED
@@ -112,7 +112,7 @@ class Select extends BaseQuery {
|
|
112 |
* @return int
|
113 |
*/
|
114 |
public function count() {
|
115 |
-
return $this->setIsCount( true )->query();
|
116 |
}
|
117 |
|
118 |
/**
|
112 |
* @return int
|
113 |
*/
|
114 |
public function count() {
|
115 |
+
return (int)$this->setIsCount( true )->query();
|
116 |
}
|
117 |
|
118 |
/**
|
src/lib/src/Databases/Base/Update.php
CHANGED
@@ -60,6 +60,9 @@ class Update extends Insert {
|
|
60 |
$bSuccess = false;
|
61 |
|
62 |
if ( $oEntry instanceof EntryVO ) {
|
|
|
|
|
|
|
63 |
$bSuccess = $this->updateById( $oEntry->id, $aUpdateData );
|
64 |
// TODO: run through update data and determine if anything actually needs updating
|
65 |
if ( $bSuccess ) {
|
60 |
$bSuccess = false;
|
61 |
|
62 |
if ( $oEntry instanceof EntryVO ) {
|
63 |
+
if ( empty( $aUpdateData ) ) {
|
64 |
+
$aUpdateData = $oEntry->getRawDataAsArray();
|
65 |
+
}
|
66 |
$bSuccess = $this->updateById( $oEntry->id, $aUpdateData );
|
67 |
// TODO: run through update data and determine if anything actually needs updating
|
68 |
if ( $bSuccess ) {
|
src/lib/src/Databases/ScanQueue/Common.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Trait Filters
|
7 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue
|
8 |
+
*/
|
9 |
+
trait Common {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @param string $sScan
|
13 |
+
* @return $this
|
14 |
+
*/
|
15 |
+
public function filterByScan( $sScan ) {
|
16 |
+
if ( !empty( $sScan ) ) {
|
17 |
+
$this->addWhereEquals( 'scan', $sScan );
|
18 |
+
}
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @return $this
|
24 |
+
*/
|
25 |
+
public function filterByNotFinished() {
|
26 |
+
return $this->addWhereEquals( 'finished_at', 0 );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @return $this
|
31 |
+
*/
|
32 |
+
public function filterByNotStarted() {
|
33 |
+
return $this->addWhereEquals( 'started_at', 0 );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @return $this
|
38 |
+
*/
|
39 |
+
public function filterByFinished() {
|
40 |
+
return $this->addWhereNewerThan( 0, 'finished_at' );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @return $this
|
45 |
+
*/
|
46 |
+
public function filterByStarted() {
|
47 |
+
return $this->addWhereNewerThan( 0, 'started_at' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @param string $sScan
|
52 |
+
* @return bool
|
53 |
+
*/
|
54 |
+
public function forScan( $sScan ) {
|
55 |
+
$this->reset();
|
56 |
+
return $this->filterByScan( $sScan )
|
57 |
+
->query();
|
58 |
+
}
|
59 |
+
}
|
src/lib/src/Databases/ScanQueue/Delete.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
|
7 |
+
class Delete extends Base\Delete {
|
8 |
+
|
9 |
+
use Common;
|
10 |
+
}
|
src/lib/src/Databases/ScanQueue/EntryVO.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class EntryVO
|
9 |
+
* @property string $scan
|
10 |
+
* @property array $items
|
11 |
+
* @property array $results
|
12 |
+
* @property int $started_at
|
13 |
+
* @property int $finished_at
|
14 |
+
*/
|
15 |
+
class EntryVO extends Base\EntryVO {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param string $sProperty
|
19 |
+
* @return mixed
|
20 |
+
*/
|
21 |
+
public function __get( $sProperty ) {
|
22 |
+
|
23 |
+
$mVal = parent::__get( $sProperty );
|
24 |
+
|
25 |
+
switch ( $sProperty ) {
|
26 |
+
|
27 |
+
case 'items':
|
28 |
+
case 'results':
|
29 |
+
if ( is_string( $mVal ) && !empty( $mVal ) ) {
|
30 |
+
$mVal = base64_decode( $mVal );
|
31 |
+
if ( !empty( $mVal ) ) {
|
32 |
+
$mVal = @json_decode( $mVal, true );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( !is_array( $mVal ) ) {
|
37 |
+
$mVal = [];
|
38 |
+
}
|
39 |
+
break;
|
40 |
+
|
41 |
+
default:
|
42 |
+
break;
|
43 |
+
}
|
44 |
+
return $mVal;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @param string $sProperty
|
49 |
+
* @param mixed $mValue
|
50 |
+
* @return $this
|
51 |
+
*/
|
52 |
+
public function __set( $sProperty, $mValue ) {
|
53 |
+
|
54 |
+
switch ( $sProperty ) {
|
55 |
+
|
56 |
+
case 'items':
|
57 |
+
case 'results':
|
58 |
+
if ( !is_array( $mValue ) ) {
|
59 |
+
$mValue = [];
|
60 |
+
}
|
61 |
+
$mValue = base64_encode( json_encode( $mValue ) );
|
62 |
+
break;
|
63 |
+
|
64 |
+
default:
|
65 |
+
break;
|
66 |
+
}
|
67 |
+
|
68 |
+
return parent::__set( $sProperty, $mValue );
|
69 |
+
}
|
70 |
+
}
|
src/lib/src/Databases/ScanQueue/Handler.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Options;
|
7 |
+
|
8 |
+
class Handler extends Base\Handler {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @return string[]
|
12 |
+
*/
|
13 |
+
protected function getDefaultColumnsDefinition() {
|
14 |
+
/** @var Options $oOpts */
|
15 |
+
$oOpts = $this->getMod()->getOptions();
|
16 |
+
return $oOpts->getDbColumns_ScanQueue();
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
protected function getDefaultTableName() {
|
23 |
+
/** @var Options $oOpts */
|
24 |
+
$oOpts = $this->getMod()->getOptions();
|
25 |
+
return $oOpts->getDbTable_ScanQueue();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
protected function getDefaultCreateTableSql() {
|
32 |
+
return "CREATE TABLE %s (
|
33 |
+
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
34 |
+
scan varchar(3) NOT NULL DEFAULT 0 COMMENT 'Scan Slug',
|
35 |
+
items text COMMENT 'Array of scan items',
|
36 |
+
results text COMMENT 'Array of results',
|
37 |
+
meta text COMMENT 'Meta Data',
|
38 |
+
started_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Started',
|
39 |
+
finished_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Finished',
|
40 |
+
created_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Created',
|
41 |
+
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Soft Deleted',
|
42 |
+
PRIMARY KEY (id)
|
43 |
+
) %s;";
|
44 |
+
}
|
45 |
+
}
|
src/lib/src/Databases/ScanQueue/Insert.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
|
7 |
+
class Insert extends Base\Insert {
|
8 |
+
|
9 |
+
}
|
src/lib/src/Databases/ScanQueue/Select.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
|
7 |
+
class Select extends Base\Select {
|
8 |
+
|
9 |
+
use Common;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @return string|null
|
13 |
+
*/
|
14 |
+
public function getCurrentScan() {
|
15 |
+
return $this->reset()
|
16 |
+
->setResultsAsVo( true )
|
17 |
+
->setColumnsToSelect( [ 'scan' ] )
|
18 |
+
->filterByStarted()
|
19 |
+
->filterByNotFinished()
|
20 |
+
->queryVar();
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @return string[]
|
25 |
+
*/
|
26 |
+
public function getInitiatedScans() {
|
27 |
+
return $this->getDistinctForColumn( 'scan' );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @return array[]
|
32 |
+
*/
|
33 |
+
public function getUnfinishedScans() {
|
34 |
+
$aResults = $this->reset()
|
35 |
+
->setResultsAsVo( true )
|
36 |
+
->setColumnsToSelect( [ 'scan' ] )
|
37 |
+
->filterByNotFinished()
|
38 |
+
->query();
|
39 |
+
$aScans = [];
|
40 |
+
/** @var EntryVO $oEntry */
|
41 |
+
foreach ( $aResults as $oEntry ) {
|
42 |
+
$aScans[ $oEntry->scan ] = 1;
|
43 |
+
}
|
44 |
+
return array_keys( $aScans );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @param string $sScan
|
49 |
+
* @return int
|
50 |
+
*/
|
51 |
+
public function countForScan( $sScan ) {
|
52 |
+
return $this->reset()
|
53 |
+
->filterByScan( $sScan )
|
54 |
+
->count();
|
55 |
+
}
|
56 |
+
}
|
src/lib/src/Databases/ScanQueue/Update.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base;
|
6 |
+
use FernleafSystems\Wordpress\Services\Services;
|
7 |
+
|
8 |
+
class Update extends Base\Update {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @param EntryVO $oEntry
|
12 |
+
* @return bool
|
13 |
+
*/
|
14 |
+
public function setFinished( $oEntry ) {
|
15 |
+
return $this->updateEntry( $oEntry, [ 'finished_at' => Services::Request()->ts() ] );
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @param EntryVO $oEntry
|
20 |
+
* @return bool
|
21 |
+
*/
|
22 |
+
public function setStarted( $oEntry ) {
|
23 |
+
return $this->updateEntry( $oEntry, [ 'started_at' => Services::Request()->ts() ] );
|
24 |
+
}
|
25 |
+
}
|
src/lib/src/Databases/Tally/Update.php
CHANGED
@@ -14,14 +14,4 @@ class Update extends Base\Update {
|
|
14 |
public function incrementTally( $oStat, $nAdditional ) {
|
15 |
return $this->updateEntry( $oStat, [ 'tally' => $oStat->tally + $nAdditional, ] );
|
16 |
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @param EntryVO $oStat
|
20 |
-
* @param array $aUpdateData
|
21 |
-
* @return bool
|
22 |
-
* @deprecated
|
23 |
-
*/
|
24 |
-
public function updateStat( $oStat, $aUpdateData = [] ) {
|
25 |
-
return parent::updateEntry( $oStat, $aUpdateData );
|
26 |
-
}
|
27 |
}
|
14 |
public function incrementTally( $oStat, $nAdditional ) {
|
15 |
return $this->updateEntry( $oStat, [ 'tally' => $oStat->tally + $nAdditional, ] );
|
16 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
src/lib/src/Databases/Traffic/Handler.php
CHANGED
@@ -8,12 +8,10 @@ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Traffic\Options;
|
|
8 |
class Handler extends Base\Handler {
|
9 |
|
10 |
public function autoCleanDb() {
|
11 |
-
/** @var \ICWP_WPSF_FeatureHandler_Traffic $oMod */
|
12 |
-
$oMod = $this->getMod();
|
13 |
/** @var Options $oOpts */
|
14 |
$oOpts = $this->getMod()->getOptions();
|
15 |
$this->cleanDb( $oOpts->getAutoCleanDays() );
|
16 |
-
$this->trimDb( $
|
17 |
}
|
18 |
|
19 |
/**
|
8 |
class Handler extends Base\Handler {
|
9 |
|
10 |
public function autoCleanDb() {
|
|
|
|
|
11 |
/** @var Options $oOpts */
|
12 |
$oOpts = $this->getMod()->getOptions();
|
13 |
$this->cleanDb( $oOpts->getAutoCleanDays() );
|
14 |
+
$this->trimDb( $oOpts->getMaxEntries() );
|
15 |
}
|
16 |
|
17 |
/**
|
src/lib/src/Modules/AuditTrail/Options.php
CHANGED
@@ -49,6 +49,13 @@ class Options extends Base\ShieldOptions {
|
|
49 |
return $this->getDef( 'audit_trail_default_max_entries' );
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
/**
|
53 |
* @return bool
|
54 |
*/
|
@@ -152,4 +159,11 @@ class Options extends Base\ShieldOptions {
|
|
152 |
public function isAuditWp() {
|
153 |
return $this->isOpt( 'enable_audit_context_wordpress', 'Y' );
|
154 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
}
|
49 |
return $this->getDef( 'audit_trail_default_max_entries' );
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* @return int
|
54 |
+
*/
|
55 |
+
public function getMaxEntries() {
|
56 |
+
return $this->isPremium() ? (int)$this->getOpt( 'audit_trail_max_entries' ) : $this->getDefaultMaxEntries();
|
57 |
+
}
|
58 |
+
|
59 |
/**
|
60 |
* @return bool
|
61 |
*/
|
159 |
public function isAuditWp() {
|
160 |
return $this->isOpt( 'enable_audit_context_wordpress', 'Y' );
|
161 |
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* @return $this
|
165 |
+
*/
|
166 |
+
public function updateCTLastSnapshotAt() {
|
167 |
+
return $this->setOptAt( 'ct_last_snapshot_at' );
|
168 |
+
}
|
169 |
}
|
src/lib/src/Modules/AuditTrail/Strings.php
CHANGED
@@ -178,6 +178,8 @@ class Strings extends Base\Strings {
|
|
178 |
/** @var \ICWP_WPSF_FeatureHandler_AuditTrail $oMod */
|
179 |
$oMod = $this->getMod();
|
180 |
$oCon = $this->getCon();
|
|
|
|
|
181 |
$sModName = $oMod->getMainFeatureName();
|
182 |
|
183 |
switch ( $sOptKey ) {
|
@@ -192,7 +194,7 @@ class Strings extends Base\Strings {
|
|
192 |
$sName = __( 'Max Trail Length', 'wp-simple-firewall' );
|
193 |
$sSummary = __( 'Maximum Audit Trail Length To Keep', 'wp-simple-firewall' );
|
194 |
$sDescription = __( 'Automatically remove any audit trail entries when this limit is exceeded.', 'wp-simple-firewall' )
|
195 |
-
.'<br/>'.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $
|
196 |
break;
|
197 |
|
198 |
case 'audit_trail_auto_clean' :
|
178 |
/** @var \ICWP_WPSF_FeatureHandler_AuditTrail $oMod */
|
179 |
$oMod = $this->getMod();
|
180 |
$oCon = $this->getCon();
|
181 |
+
/** @var Options $oOpts */
|
182 |
+
$oOpts = $oMod->getOptions();
|
183 |
$sModName = $oMod->getMainFeatureName();
|
184 |
|
185 |
switch ( $sOptKey ) {
|
194 |
$sName = __( 'Max Trail Length', 'wp-simple-firewall' );
|
195 |
$sSummary = __( 'Maximum Audit Trail Length To Keep', 'wp-simple-firewall' );
|
196 |
$sDescription = __( 'Automatically remove any audit trail entries when this limit is exceeded.', 'wp-simple-firewall' )
|
197 |
+
.'<br/>'.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $oOpts->getDefaultMaxEntries() );
|
198 |
break;
|
199 |
|
200 |
case 'audit_trail_auto_clean' :
|
src/lib/src/Modules/Base/AdminNotices.php
CHANGED
@@ -138,7 +138,7 @@ class AdminNotices {
|
|
138 |
else if ( $oNtc->plugin_admin == 'no' && $oCon->isPluginAdmin() ) {
|
139 |
$oNtc->non_display_reason = 'is_plugin_admin';
|
140 |
}
|
141 |
-
else if ( $oNtc->min_install_days > 0 && $oNtc->min_install_days
|
142 |
$oNtc->non_display_reason = 'min_install_days';
|
143 |
}
|
144 |
else if ( static::$nCount > 0 && $oNtc->type !== 'error' ) {
|
138 |
else if ( $oNtc->plugin_admin == 'no' && $oCon->isPluginAdmin() ) {
|
139 |
$oNtc->non_display_reason = 'is_plugin_admin';
|
140 |
}
|
141 |
+
else if ( $oNtc->min_install_days > 0 && $oNtc->min_install_days > $oOpts->getInstallationDays() ) {
|
142 |
$oNtc->non_display_reason = 'min_install_days';
|
143 |
}
|
144 |
else if ( static::$nCount > 0 && $oNtc->type !== 'error' ) {
|
src/lib/src/Modules/Base/BaseModCon.php
CHANGED
@@ -11,11 +11,6 @@ class BaseModCon extends Deprecated\Foundation {
|
|
11 |
|
12 |
use Modules\PluginControllerConsumer;
|
13 |
|
14 |
-
/**
|
15 |
-
* @var Options
|
16 |
-
*/
|
17 |
-
protected $oOptions;
|
18 |
-
|
19 |
/**
|
20 |
* @var string
|
21 |
*/
|
@@ -51,16 +46,6 @@ class BaseModCon extends Deprecated\Foundation {
|
|
51 |
*/
|
52 |
private $oDbh;
|
53 |
|
54 |
-
/**
|
55 |
-
* @var AjaxHandlerShield
|
56 |
-
*/
|
57 |
-
private $oAjax;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @var Shield\Modules\Base\AdminNotices
|
61 |
-
*/
|
62 |
-
private $oAdminNotices;
|
63 |
-
|
64 |
/**
|
65 |
* @var Shield\Modules\Base\Strings
|
66 |
*/
|
@@ -113,7 +98,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
113 |
if ( $this->isModuleRequest() ) {
|
114 |
|
115 |
if ( Services::WpGeneral()->isAjax() ) {
|
116 |
-
$this->
|
117 |
}
|
118 |
|
119 |
if ( $oReq->request( 'action' ) == $this->prefix()
|
@@ -147,7 +132,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
147 |
add_action( 'admin_enqueue_scripts', [ $this, 'onWpEnqueueAdminJs' ], 100 );
|
148 |
|
149 |
if ( is_admin() || is_network_admin() ) {
|
150 |
-
$this->
|
151 |
}
|
152 |
|
153 |
// if ( $this->isAdminOptionsPage() ) {
|
@@ -296,7 +281,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
296 |
if ( !is_array( $aAdminNotices ) ) {
|
297 |
$aAdminNotices = [];
|
298 |
}
|
299 |
-
return array_merge( $aAdminNotices, $this->
|
300 |
}
|
301 |
|
302 |
/**
|
@@ -305,7 +290,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
305 |
private function verifyModuleMeetRequirements() {
|
306 |
$bMeetsReqs = true;
|
307 |
|
308 |
-
$aPhpReqs = $this->
|
309 |
if ( !empty( $aPhpReqs ) ) {
|
310 |
|
311 |
if ( !empty( $aPhpReqs[ 'version' ] ) ) {
|
@@ -332,7 +317,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
332 |
if ( $this->isUpgrading() ) {
|
333 |
$this->updateHandler();
|
334 |
}
|
335 |
-
if ( $this->
|
336 |
$this->loadProcessor();
|
337 |
}
|
338 |
if ( !$this->isUpgrading() && $this->isModuleEnabled() && $this->isReadyToExecute() ) {
|
@@ -345,7 +330,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
345 |
*/
|
346 |
public function processImportOptions( $aOptions ) {
|
347 |
if ( !empty( $aOptions ) && is_array( $aOptions ) && array_key_exists( $this->getOptionsStorageKey(), $aOptions ) ) {
|
348 |
-
$this->
|
349 |
->setMultipleOptions( $aOptions[ $this->getOptionsStorageKey() ] );
|
350 |
$this->savePluginOptions();
|
351 |
}
|
@@ -354,14 +339,22 @@ class BaseModCon extends Deprecated\Foundation {
|
|
354 |
/**
|
355 |
* Used to effect certain processing that is to do with options etc. but isn't related to processing
|
356 |
* functionality of the plugin.
|
|
|
357 |
*/
|
358 |
protected function isReadyToExecute() {
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
}
|
362 |
|
363 |
protected function doExecuteProcessor() {
|
364 |
-
$this->getProcessor()->
|
365 |
}
|
366 |
|
367 |
/**
|
@@ -398,7 +391,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
398 |
|
399 |
/**
|
400 |
* Override this and adapt per feature
|
401 |
-
* @return
|
402 |
*/
|
403 |
protected function loadProcessor() {
|
404 |
if ( !isset( $this->oProcessor ) ) {
|
@@ -441,19 +434,17 @@ class BaseModCon extends Deprecated\Foundation {
|
|
441 |
|
442 |
/**
|
443 |
* @return \ICWP_WPSF_OptionsVO
|
|
|
444 |
*/
|
445 |
public function getOptionsVo() {
|
446 |
-
|
447 |
-
$this->oOptions = $this->getOptions();
|
448 |
-
}
|
449 |
-
return $this->oOptions;
|
450 |
}
|
451 |
|
452 |
/**
|
453 |
* @return bool
|
454 |
*/
|
455 |
public function isUpgrading() {
|
456 |
-
return $this->getCon()->getIsRebuildOptionsFromFile() || $this->
|
457 |
}
|
458 |
|
459 |
/**
|
@@ -477,7 +468,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
477 |
}
|
478 |
|
479 |
/**
|
480 |
-
* @return
|
481 |
*/
|
482 |
public function getProcessor() {
|
483 |
return $this->loadProcessor();
|
@@ -500,7 +491,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
500 |
*/
|
501 |
protected function getUrl_DirectLinkToOption( $sOptKey ) {
|
502 |
$sUrl = $this->getUrl_AdminPage();
|
503 |
-
$aDef = $this->
|
504 |
if ( !empty( $aDef[ 'section' ] ) ) {
|
505 |
$sUrl = $this->getUrl_DirectLinkToSection( $aDef[ 'section' ] );
|
506 |
}
|
@@ -513,7 +504,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
513 |
*/
|
514 |
public function getUrl_DirectLinkToSection( $sSection ) {
|
515 |
if ( $sSection == 'primary' ) {
|
516 |
-
$aSec = $this->
|
517 |
$sSection = $aSec[ 'slug' ];
|
518 |
}
|
519 |
return $this->getUrl_AdminPage().'#tab-'.$sSection;
|
@@ -550,9 +541,9 @@ class BaseModCon extends Deprecated\Foundation {
|
|
550 |
* @return bool
|
551 |
*/
|
552 |
public function isModuleEnabled() {
|
553 |
-
$oOpts = $this->
|
554 |
|
555 |
-
if ( $this->
|
556 |
// Auto enabled modules always run regardless
|
557 |
$bEnabled = true;
|
558 |
}
|
@@ -591,7 +582,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
591 |
* @return string
|
592 |
*/
|
593 |
public function getMainFeatureName() {
|
594 |
-
return __( $this->
|
595 |
}
|
596 |
|
597 |
/**
|
@@ -607,7 +598,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
607 |
*/
|
608 |
public function getSlug() {
|
609 |
if ( !isset( $this->sModSlug ) ) {
|
610 |
-
$this->sModSlug = $this->
|
611 |
}
|
612 |
return $this->sModSlug;
|
613 |
}
|
@@ -618,14 +609,14 @@ class BaseModCon extends Deprecated\Foundation {
|
|
618 |
*/
|
619 |
public function supplySubMenuItem( $aItems ) {
|
620 |
|
621 |
-
$sTitle = $this->
|
622 |
$sTitle = empty( $sTitle ) ? $this->getMainFeatureName() : __( $sTitle, 'wp-simple-firewall' );
|
623 |
|
624 |
if ( !empty( $sTitle ) ) {
|
625 |
|
626 |
$sHumanName = $this->getCon()->getHumanName();
|
627 |
|
628 |
-
$bMenuHighlighted = $this->
|
629 |
if ( $bMenuHighlighted ) {
|
630 |
$sTitle = sprintf( '<span class="icwp_highlighted">%s</span>', $sTitle );
|
631 |
}
|
@@ -638,7 +629,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
638 |
$this->getIfShowModuleMenuItem()
|
639 |
];
|
640 |
|
641 |
-
$aAdditionalItems = $this->
|
642 |
if ( !empty( $aAdditionalItems ) && is_array( $aAdditionalItems ) ) {
|
643 |
|
644 |
foreach ( $aAdditionalItems as $aMenuItem ) {
|
@@ -697,7 +688,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
697 |
* @return array
|
698 |
*/
|
699 |
protected function buildSummaryData() {
|
700 |
-
$oOptsVo = $this->
|
701 |
$sMenuTitle = $oOptsVo->getFeatureProperty( 'menu_title' );
|
702 |
|
703 |
$aSections = $oOptsVo->getSections();
|
@@ -754,21 +745,21 @@ class BaseModCon extends Deprecated\Foundation {
|
|
754 |
* @return boolean
|
755 |
*/
|
756 |
public function getIfShowModuleMenuItem() {
|
757 |
-
return (bool)$this->
|
758 |
}
|
759 |
|
760 |
/**
|
761 |
* @return boolean
|
762 |
*/
|
763 |
public function getIfShowModuleLink() {
|
764 |
-
return (bool)$this->
|
765 |
}
|
766 |
|
767 |
/**
|
768 |
* @return boolean
|
769 |
*/
|
770 |
public function getIfUseSessions() {
|
771 |
-
return $this->
|
772 |
}
|
773 |
|
774 |
/**
|
@@ -777,7 +768,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
777 |
* @return mixed|null
|
778 |
*/
|
779 |
public function getDef( $sKey ) {
|
780 |
-
return $this->
|
781 |
}
|
782 |
|
783 |
/**
|
@@ -813,7 +804,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
813 |
* @return mixed
|
814 |
*/
|
815 |
public function getOpt( $sOptionKey, $mDefault = false ) {
|
816 |
-
return $this->
|
817 |
}
|
818 |
|
819 |
/**
|
@@ -823,7 +814,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
823 |
* @return bool
|
824 |
*/
|
825 |
public function isOpt( $sOptionKey, $mValueToTest, $bStrict = false ) {
|
826 |
-
$mOptionValue = $this->
|
827 |
return $bStrict ? $mOptionValue === $mValueToTest : $mOptionValue == $mValueToTest;
|
828 |
}
|
829 |
|
@@ -872,7 +863,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
872 |
* @return $this
|
873 |
*/
|
874 |
protected function setOpt( $sOptionKey, $mValue ) {
|
875 |
-
$this->
|
876 |
return $this;
|
877 |
}
|
878 |
|
@@ -880,7 +871,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
880 |
* @param array $aOptions
|
881 |
*/
|
882 |
public function setOptions( $aOptions ) {
|
883 |
-
$oVO = $this->
|
884 |
foreach ( $aOptions as $sKey => $mValue ) {
|
885 |
$oVO->setOpt( $sKey, $mValue );
|
886 |
}
|
@@ -922,7 +913,6 @@ class BaseModCon extends Deprecated\Foundation {
|
|
922 |
return is_array( $aDN ) ? $aDN : [];
|
923 |
}
|
924 |
|
925 |
-
|
926 |
/**
|
927 |
* @return string[]
|
928 |
*/
|
@@ -938,6 +928,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
938 |
public function setDismissedNotices( $aDismissed ) {
|
939 |
return $this->setOpt( 'dismissed_notices', $aDismissed );
|
940 |
}
|
|
|
941 |
/**
|
942 |
* @param string[] $aDismissed
|
943 |
* @return $this
|
@@ -969,18 +960,18 @@ class BaseModCon extends Deprecated\Foundation {
|
|
969 |
public function savePluginOptions() {
|
970 |
$this->doPrePluginOptionsSave();
|
971 |
if ( apply_filters( $this->prefix( 'force_options_resave' ), false ) ) {
|
972 |
-
$this->
|
973 |
->setNeedSave( true );
|
974 |
}
|
975 |
|
976 |
// we set the flag that options have been updated. (only use this flag if it's a MANUAL options update)
|
977 |
-
$this->bImportExportWhitelistNotify = $this->
|
978 |
$this->store();
|
979 |
}
|
980 |
|
981 |
private function store() {
|
982 |
add_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
983 |
-
$this->
|
984 |
->doOptionsSave( $this->getCon()->getIsResetPlugin(), $this->isPremium() );
|
985 |
remove_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
986 |
}
|
@@ -990,7 +981,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
990 |
* @return array
|
991 |
*/
|
992 |
public function aggregateOptionsValues( $aAggregatedOptions ) {
|
993 |
-
return array_merge( $aAggregatedOptions, $this->
|
994 |
}
|
995 |
|
996 |
/**
|
@@ -1003,7 +994,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1003 |
|
1004 |
$bPremiumEnabled = $this->getCon()->isPremiumExtensionsEnabled();
|
1005 |
|
1006 |
-
$oOptsVo = $this->
|
1007 |
$aOptions = $oOptsVo->getOptionsForPluginUse();
|
1008 |
|
1009 |
foreach ( $aOptions as $nSectionKey => $aSection ) {
|
@@ -1243,7 +1234,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1243 |
*/
|
1244 |
protected function resetPremiumOptions() {
|
1245 |
if ( !$this->isPremium() ) {
|
1246 |
-
$this->
|
1247 |
}
|
1248 |
}
|
1249 |
|
@@ -1441,7 +1432,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1441 |
|
1442 |
return [
|
1443 |
'sPluginName' => $oCon->getHumanName(),
|
1444 |
-
'sTagline' => $this->
|
1445 |
'nonce_field' => wp_nonce_field( $oCon->getPluginPrefix(), '_wpnonce', true, false ), //don't echo!
|
1446 |
'form_action' => 'admin.php?page='.$this->getModSlug(),
|
1447 |
'aPluginLabels' => $oCon->getLabels(),
|
@@ -1463,7 +1454,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1463 |
'mod_slug' => $this->getModSlug( true ),
|
1464 |
'mod_slug_short' => $this->getModSlug( false ),
|
1465 |
'all_options' => $this->buildOptions(),
|
1466 |
-
'hidden_options' => $this->
|
1467 |
],
|
1468 |
'ajax' => [
|
1469 |
'mod_options' => $this->getAjaxActionData( 'mod_options' ),
|
@@ -1644,7 +1635,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1644 |
* @return bool
|
1645 |
*/
|
1646 |
protected function canDisplayOptionsForm() {
|
1647 |
-
return $this->
|
1648 |
}
|
1649 |
|
1650 |
public function onWpEnqueueAdminJs() {
|
@@ -1749,7 +1740,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1749 |
if ( !is_array( $aTransferableOptions ) ) {
|
1750 |
$aTransferableOptions = [];
|
1751 |
}
|
1752 |
-
$aTransferableOptions[ $this->getOptionsStorageKey() ] = $this->
|
1753 |
return $aTransferableOptions;
|
1754 |
}
|
1755 |
|
@@ -1757,8 +1748,8 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1757 |
* @return array
|
1758 |
*/
|
1759 |
public function collectOptionsForTracking() {
|
1760 |
-
$oVO = $this->
|
1761 |
-
$aOptionsData = $this->
|
1762 |
foreach ( $aOptionsData as $sOption => $mValue ) {
|
1763 |
unset( $aOptionsData[ $sOption ] );
|
1764 |
// some cleaning to ensure we don't have disallowed characters
|
@@ -1886,12 +1877,7 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1886 |
public function getOptions() {
|
1887 |
if ( !isset( $this->oOpts ) ) {
|
1888 |
|
1889 |
-
|
1890 |
-
$oOpts = $this->loadOptions()->setMod( $this );;
|
1891 |
-
}
|
1892 |
-
else {
|
1893 |
-
$oOpts = new \ICWP_WPSF_OptionsVO();
|
1894 |
-
}
|
1895 |
|
1896 |
$oCon = $this->getCon();
|
1897 |
$this->oOpts = $oOpts->setPathToConfig( $oCon->getPath_ConfigFile( $this->getSlug() ) )
|
@@ -1921,23 +1907,16 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1921 |
}
|
1922 |
|
1923 |
/**
|
1924 |
-
* @return
|
1925 |
*/
|
1926 |
-
private function
|
1927 |
-
|
1928 |
-
$
|
1929 |
}
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
/**
|
1934 |
-
* @return Shield\Modules\Base\AjaxHandlerShield
|
1935 |
-
*/
|
1936 |
-
private function getAjax() {
|
1937 |
-
if ( !isset( $this->oAjax ) ) {
|
1938 |
-
$this->oAjax = $this->loadAjaxHandler()->setMod( $this );
|
1939 |
}
|
1940 |
-
return $
|
1941 |
}
|
1942 |
|
1943 |
/**
|
@@ -1950,13 +1929,6 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1950 |
return $this->oStrings;
|
1951 |
}
|
1952 |
|
1953 |
-
/**
|
1954 |
-
* @return Shield\Modules\Base\AdminNotices
|
1955 |
-
*/
|
1956 |
-
protected function loadAdminNotices() {
|
1957 |
-
return new Shield\Modules\Base\AdminNotices();
|
1958 |
-
}
|
1959 |
-
|
1960 |
/**
|
1961 |
* @return Shield\Databases\Base\Handler|mixed|false
|
1962 |
*/
|
@@ -1965,65 +1937,49 @@ class BaseModCon extends Deprecated\Foundation {
|
|
1965 |
}
|
1966 |
|
1967 |
/**
|
1968 |
-
* @return
|
1969 |
-
*/
|
1970 |
-
protected function loadAjaxHandler() {
|
1971 |
-
return new Shield\Modules\Base\AjaxHandlerShield;
|
1972 |
-
}
|
1973 |
-
|
1974 |
-
/**
|
1975 |
-
* @return Shield\Modules\Base\ShieldOptions|mixed
|
1976 |
-
*/
|
1977 |
-
protected function loadOptions() {
|
1978 |
-
return new Shield\Modules\Base\ShieldOptions;
|
1979 |
-
}
|
1980 |
-
|
1981 |
-
/**
|
1982 |
-
* @return Shield\Modules\Base\Strings|mixed
|
1983 |
-
*/
|
1984 |
-
protected function loadStrings() {
|
1985 |
-
return new Shield\Modules\Base\Strings();
|
1986 |
-
}
|
1987 |
-
|
1988 |
-
/**
|
1989 |
-
* @return array
|
1990 |
-
* @deprecated 7.5
|
1991 |
*/
|
1992 |
-
|
1993 |
-
|
|
|
|
|
|
|
|
|
1994 |
}
|
1995 |
|
1996 |
/**
|
1997 |
-
*
|
1998 |
* @return $this
|
1999 |
-
* @deprecated 7.5
|
2000 |
*/
|
2001 |
-
|
|
|
|
|
|
|
|
|
|
|
2002 |
return $this;
|
2003 |
}
|
2004 |
|
2005 |
/**
|
2006 |
-
* @
|
2007 |
*/
|
2008 |
-
|
2009 |
-
$this->
|
2010 |
}
|
2011 |
|
2012 |
/**
|
2013 |
-
*
|
2014 |
-
* @param $sKey
|
2015 |
-
* @return string
|
2016 |
-
* @deprecated
|
2017 |
*/
|
2018 |
-
|
2019 |
-
return $this->
|
2020 |
}
|
2021 |
|
2022 |
/**
|
2023 |
-
* @
|
2024 |
-
* @
|
2025 |
*/
|
2026 |
-
|
2027 |
-
|
|
|
2028 |
}
|
2029 |
}
|
11 |
|
12 |
use Modules\PluginControllerConsumer;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
46 |
*/
|
47 |
private $oDbh;
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* @var Shield\Modules\Base\Strings
|
51 |
*/
|
98 |
if ( $this->isModuleRequest() ) {
|
99 |
|
100 |
if ( Services::WpGeneral()->isAjax() ) {
|
101 |
+
$this->loadAjaxHandler();
|
102 |
}
|
103 |
|
104 |
if ( $oReq->request( 'action' ) == $this->prefix()
|
132 |
add_action( 'admin_enqueue_scripts', [ $this, 'onWpEnqueueAdminJs' ], 100 );
|
133 |
|
134 |
if ( is_admin() || is_network_admin() ) {
|
135 |
+
$this->loadAdminNotices();
|
136 |
}
|
137 |
|
138 |
// if ( $this->isAdminOptionsPage() ) {
|
281 |
if ( !is_array( $aAdminNotices ) ) {
|
282 |
$aAdminNotices = [];
|
283 |
}
|
284 |
+
return array_merge( $aAdminNotices, $this->getOptions()->getAdminNotices() );
|
285 |
}
|
286 |
|
287 |
/**
|
290 |
private function verifyModuleMeetRequirements() {
|
291 |
$bMeetsReqs = true;
|
292 |
|
293 |
+
$aPhpReqs = $this->getOptions()->getFeatureRequirement( 'php' );
|
294 |
if ( !empty( $aPhpReqs ) ) {
|
295 |
|
296 |
if ( !empty( $aPhpReqs[ 'version' ] ) ) {
|
317 |
if ( $this->isUpgrading() ) {
|
318 |
$this->updateHandler();
|
319 |
}
|
320 |
+
if ( $this->getOptions()->getFeatureProperty( 'auto_load_processor' ) ) {
|
321 |
$this->loadProcessor();
|
322 |
}
|
323 |
if ( !$this->isUpgrading() && $this->isModuleEnabled() && $this->isReadyToExecute() ) {
|
330 |
*/
|
331 |
public function processImportOptions( $aOptions ) {
|
332 |
if ( !empty( $aOptions ) && is_array( $aOptions ) && array_key_exists( $this->getOptionsStorageKey(), $aOptions ) ) {
|
333 |
+
$this->getOptions()
|
334 |
->setMultipleOptions( $aOptions[ $this->getOptionsStorageKey() ] );
|
335 |
$this->savePluginOptions();
|
336 |
}
|
339 |
/**
|
340 |
* Used to effect certain processing that is to do with options etc. but isn't related to processing
|
341 |
* functionality of the plugin.
|
342 |
+
* @return bool
|
343 |
*/
|
344 |
protected function isReadyToExecute() {
|
345 |
+
try {
|
346 |
+
$oDbH = $this->getDbHandler();
|
347 |
+
$bReady = ( $this->getProcessor() instanceof Shield\Modules\Base\BaseProcessor )
|
348 |
+
&& ( !$oDbH instanceof Shield\Databases\Base\Handler || $oDbH->isReady() );
|
349 |
+
}
|
350 |
+
catch ( \Exception $oE ) {
|
351 |
+
$bReady = false;
|
352 |
+
}
|
353 |
+
return $bReady;
|
354 |
}
|
355 |
|
356 |
protected function doExecuteProcessor() {
|
357 |
+
$this->getProcessor()->execute();
|
358 |
}
|
359 |
|
360 |
/**
|
391 |
|
392 |
/**
|
393 |
* Override this and adapt per feature
|
394 |
+
* @return BaseProcessor|mixed
|
395 |
*/
|
396 |
protected function loadProcessor() {
|
397 |
if ( !isset( $this->oProcessor ) ) {
|
434 |
|
435 |
/**
|
436 |
* @return \ICWP_WPSF_OptionsVO
|
437 |
+
* @deprecated 8.1
|
438 |
*/
|
439 |
public function getOptionsVo() {
|
440 |
+
return $this->getOptions();
|
|
|
|
|
|
|
441 |
}
|
442 |
|
443 |
/**
|
444 |
* @return bool
|
445 |
*/
|
446 |
public function isUpgrading() {
|
447 |
+
return $this->getCon()->getIsRebuildOptionsFromFile() || $this->getOptions()->getRebuildFromFile();
|
448 |
}
|
449 |
|
450 |
/**
|
468 |
}
|
469 |
|
470 |
/**
|
471 |
+
* @return BaseProcessor|mixed
|
472 |
*/
|
473 |
public function getProcessor() {
|
474 |
return $this->loadProcessor();
|
491 |
*/
|
492 |
protected function getUrl_DirectLinkToOption( $sOptKey ) {
|
493 |
$sUrl = $this->getUrl_AdminPage();
|
494 |
+
$aDef = $this->getOptions()->getOptDefinition( $sOptKey );
|
495 |
if ( !empty( $aDef[ 'section' ] ) ) {
|
496 |
$sUrl = $this->getUrl_DirectLinkToSection( $aDef[ 'section' ] );
|
497 |
}
|
504 |
*/
|
505 |
public function getUrl_DirectLinkToSection( $sSection ) {
|
506 |
if ( $sSection == 'primary' ) {
|
507 |
+
$aSec = $this->getOptions()->getPrimarySection();
|
508 |
$sSection = $aSec[ 'slug' ];
|
509 |
}
|
510 |
return $this->getUrl_AdminPage().'#tab-'.$sSection;
|
541 |
* @return bool
|
542 |
*/
|
543 |
public function isModuleEnabled() {
|
544 |
+
$oOpts = $this->getOptions();
|
545 |
|
546 |
+
if ( $this->getOptions()->getFeatureProperty( 'auto_enabled' ) === true ) {
|
547 |
// Auto enabled modules always run regardless
|
548 |
$bEnabled = true;
|
549 |
}
|
582 |
* @return string
|
583 |
*/
|
584 |
public function getMainFeatureName() {
|
585 |
+
return __( $this->getOptions()->getFeatureProperty( 'name' ), 'wp-simple-firewall' );
|
586 |
}
|
587 |
|
588 |
/**
|
598 |
*/
|
599 |
public function getSlug() {
|
600 |
if ( !isset( $this->sModSlug ) ) {
|
601 |
+
$this->sModSlug = $this->getOptions()->getFeatureProperty( 'slug' );
|
602 |
}
|
603 |
return $this->sModSlug;
|
604 |
}
|
609 |
*/
|
610 |
public function supplySubMenuItem( $aItems ) {
|
611 |
|
612 |
+
$sTitle = $this->getOptions()->getFeatureProperty( 'menu_title' );
|
613 |
$sTitle = empty( $sTitle ) ? $this->getMainFeatureName() : __( $sTitle, 'wp-simple-firewall' );
|
614 |
|
615 |
if ( !empty( $sTitle ) ) {
|
616 |
|
617 |
$sHumanName = $this->getCon()->getHumanName();
|
618 |
|
619 |
+
$bMenuHighlighted = $this->getOptions()->getFeatureProperty( 'highlight_menu_item' );
|
620 |
if ( $bMenuHighlighted ) {
|
621 |
$sTitle = sprintf( '<span class="icwp_highlighted">%s</span>', $sTitle );
|
622 |
}
|
629 |
$this->getIfShowModuleMenuItem()
|
630 |
];
|
631 |
|
632 |
+
$aAdditionalItems = $this->getOptions()->getAdditionalMenuItems();
|
633 |
if ( !empty( $aAdditionalItems ) && is_array( $aAdditionalItems ) ) {
|
634 |
|
635 |
foreach ( $aAdditionalItems as $aMenuItem ) {
|
688 |
* @return array
|
689 |
*/
|
690 |
protected function buildSummaryData() {
|
691 |
+
$oOptsVo = $this->getOptions();
|
692 |
$sMenuTitle = $oOptsVo->getFeatureProperty( 'menu_title' );
|
693 |
|
694 |
$aSections = $oOptsVo->getSections();
|
745 |
* @return boolean
|
746 |
*/
|
747 |
public function getIfShowModuleMenuItem() {
|
748 |
+
return (bool)$this->getOptions()->getFeatureProperty( 'show_module_menu_item' );
|
749 |
}
|
750 |
|
751 |
/**
|
752 |
* @return boolean
|
753 |
*/
|
754 |
public function getIfShowModuleLink() {
|
755 |
+
return (bool)$this->getOptions()->getFeatureProperty( 'show_module_options' );
|
756 |
}
|
757 |
|
758 |
/**
|
759 |
* @return boolean
|
760 |
*/
|
761 |
public function getIfUseSessions() {
|
762 |
+
return $this->getOptions()->getFeatureProperty( 'use_sessions' );
|
763 |
}
|
764 |
|
765 |
/**
|
768 |
* @return mixed|null
|
769 |
*/
|
770 |
public function getDef( $sKey ) {
|
771 |
+
return $this->getOptions()->getFeatureDefinition( $sKey );
|
772 |
}
|
773 |
|
774 |
/**
|
804 |
* @return mixed
|
805 |
*/
|
806 |
public function getOpt( $sOptionKey, $mDefault = false ) {
|
807 |
+
return $this->getOptions()->getOpt( $sOptionKey, $mDefault );
|
808 |
}
|
809 |
|
810 |
/**
|
814 |
* @return bool
|
815 |
*/
|
816 |
public function isOpt( $sOptionKey, $mValueToTest, $bStrict = false ) {
|
817 |
+
$mOptionValue = $this->getOptions()->getOpt( $sOptionKey );
|
818 |
return $bStrict ? $mOptionValue === $mValueToTest : $mOptionValue == $mValueToTest;
|
819 |
}
|
820 |
|
863 |
* @return $this
|
864 |
*/
|
865 |
protected function setOpt( $sOptionKey, $mValue ) {
|
866 |
+
$this->getOptions()->setOpt( $sOptionKey, $mValue );
|
867 |
return $this;
|
868 |
}
|
869 |
|
871 |
* @param array $aOptions
|
872 |
*/
|
873 |
public function setOptions( $aOptions ) {
|
874 |
+
$oVO = $this->getOptions();
|
875 |
foreach ( $aOptions as $sKey => $mValue ) {
|
876 |
$oVO->setOpt( $sKey, $mValue );
|
877 |
}
|
913 |
return is_array( $aDN ) ? $aDN : [];
|
914 |
}
|
915 |
|
|
|
916 |
/**
|
917 |
* @return string[]
|
918 |
*/
|
928 |
public function setDismissedNotices( $aDismissed ) {
|
929 |
return $this->setOpt( 'dismissed_notices', $aDismissed );
|
930 |
}
|
931 |
+
|
932 |
/**
|
933 |
* @param string[] $aDismissed
|
934 |
* @return $this
|
960 |
public function savePluginOptions() {
|
961 |
$this->doPrePluginOptionsSave();
|
962 |
if ( apply_filters( $this->prefix( 'force_options_resave' ), false ) ) {
|
963 |
+
$this->getOptions()
|
964 |
->setNeedSave( true );
|
965 |
}
|
966 |
|
967 |
// we set the flag that options have been updated. (only use this flag if it's a MANUAL options update)
|
968 |
+
$this->bImportExportWhitelistNotify = $this->getOptions()->getNeedSave();
|
969 |
$this->store();
|
970 |
}
|
971 |
|
972 |
private function store() {
|
973 |
add_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
974 |
+
$this->getOptions()
|
975 |
->doOptionsSave( $this->getCon()->getIsResetPlugin(), $this->isPremium() );
|
976 |
remove_filter( $this->prefix( 'bypass_is_plugin_admin' ), '__return_true', 1000 );
|
977 |
}
|
981 |
* @return array
|
982 |
*/
|
983 |
public function aggregateOptionsValues( $aAggregatedOptions ) {
|
984 |
+
return array_merge( $aAggregatedOptions, $this->getOptions()->getAllOptionsValues() );
|
985 |
}
|
986 |
|
987 |
/**
|
994 |
|
995 |
$bPremiumEnabled = $this->getCon()->isPremiumExtensionsEnabled();
|
996 |
|
997 |
+
$oOptsVo = $this->getOptions();
|
998 |
$aOptions = $oOptsVo->getOptionsForPluginUse();
|
999 |
|
1000 |
foreach ( $aOptions as $nSectionKey => $aSection ) {
|
1234 |
*/
|
1235 |
protected function resetPremiumOptions() {
|
1236 |
if ( !$this->isPremium() ) {
|
1237 |
+
$this->getOptions()->resetPremiumOptsToDefault();
|
1238 |
}
|
1239 |
}
|
1240 |
|
1432 |
|
1433 |
return [
|
1434 |
'sPluginName' => $oCon->getHumanName(),
|
1435 |
+
'sTagline' => $this->getOptions()->getFeatureTagline(),
|
1436 |
'nonce_field' => wp_nonce_field( $oCon->getPluginPrefix(), '_wpnonce', true, false ), //don't echo!
|
1437 |
'form_action' => 'admin.php?page='.$this->getModSlug(),
|
1438 |
'aPluginLabels' => $oCon->getLabels(),
|
1454 |
'mod_slug' => $this->getModSlug( true ),
|
1455 |
'mod_slug_short' => $this->getModSlug( false ),
|
1456 |
'all_options' => $this->buildOptions(),
|
1457 |
+
'hidden_options' => $this->getOptions()->getHiddenOptions()
|
1458 |
],
|
1459 |
'ajax' => [
|
1460 |
'mod_options' => $this->getAjaxActionData( 'mod_options' ),
|
1635 |
* @return bool
|
1636 |
*/
|
1637 |
protected function canDisplayOptionsForm() {
|
1638 |
+
return $this->getOptions()->isAccessRestricted() ? $this->getCon()->isPluginAdmin() : true;
|
1639 |
}
|
1640 |
|
1641 |
public function onWpEnqueueAdminJs() {
|
1740 |
if ( !is_array( $aTransferableOptions ) ) {
|
1741 |
$aTransferableOptions = [];
|
1742 |
}
|
1743 |
+
$aTransferableOptions[ $this->getOptionsStorageKey() ] = $this->getOptions()->getTransferableOptions();
|
1744 |
return $aTransferableOptions;
|
1745 |
}
|
1746 |
|
1748 |
* @return array
|
1749 |
*/
|
1750 |
public function collectOptionsForTracking() {
|
1751 |
+
$oVO = $this->getOptions();
|
1752 |
+
$aOptionsData = $this->getOptions()->getOptionsMaskSensitive();
|
1753 |
foreach ( $aOptionsData as $sOption => $mValue ) {
|
1754 |
unset( $aOptionsData[ $sOption ] );
|
1755 |
// some cleaning to ensure we don't have disallowed characters
|
1877 |
public function getOptions() {
|
1878 |
if ( !isset( $this->oOpts ) ) {
|
1879 |
|
1880 |
+
$oOpts = $this->loadOptions()->setMod( $this );;
|
|
|
|
|
|
|
|
|
|
|
1881 |
|
1882 |
$oCon = $this->getCon();
|
1883 |
$this->oOpts = $oOpts->setPathToConfig( $oCon->getPath_ConfigFile( $this->getSlug() ) )
|
1907 |
}
|
1908 |
|
1909 |
/**
|
1910 |
+
* @return string
|
1911 |
*/
|
1912 |
+
private function getNamespace() {
|
1913 |
+
try {
|
1914 |
+
$sNS = ( new \ReflectionClass( $this ) )->getNamespaceName();
|
1915 |
}
|
1916 |
+
catch ( \Exception $oE ) {
|
1917 |
+
$sNS = __NAMESPACE__;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1918 |
}
|
1919 |
+
return rtrim( $sNS, '\\' ).'\\';
|
1920 |
}
|
1921 |
|
1922 |
/**
|
1929 |
return $this->oStrings;
|
1930 |
}
|
1931 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1932 |
/**
|
1933 |
* @return Shield\Databases\Base\Handler|mixed|false
|
1934 |
*/
|
1937 |
}
|
1938 |
|
1939 |
/**
|
1940 |
+
* @return $this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1941 |
*/
|
1942 |
+
private function loadAdminNotices() {
|
1943 |
+
$oNotices = $this->loadClass( 'AdminNotices' );
|
1944 |
+
if ( $oNotices instanceof Shield\Modules\Base\AdminNotices ) {
|
1945 |
+
$oNotices->setMod( $this )->run();
|
1946 |
+
}
|
1947 |
+
return $this;
|
1948 |
}
|
1949 |
|
1950 |
/**
|
1951 |
+
* All modules have an AJAX handler
|
1952 |
* @return $this
|
|
|
1953 |
*/
|
1954 |
+
private function loadAjaxHandler() {
|
1955 |
+
$oAj = $this->loadClass( 'AjaxHandler' );
|
1956 |
+
if ( !$oAj instanceof Shield\Modules\Base\AjaxHandlerBase ) {
|
1957 |
+
$oAj = new Shield\Modules\Base\AjaxHandlerShield(); // TODO: Provide a better fallback
|
1958 |
+
}
|
1959 |
+
$oAj->setMod( $this );
|
1960 |
return $this;
|
1961 |
}
|
1962 |
|
1963 |
/**
|
1964 |
+
* @return Shield\Modules\Base\ShieldOptions|mixed
|
1965 |
*/
|
1966 |
+
protected function loadOptions() {
|
1967 |
+
return $this->loadClass( 'Options' );
|
1968 |
}
|
1969 |
|
1970 |
/**
|
1971 |
+
* @return Shield\Modules\Base\Strings|mixed
|
|
|
|
|
|
|
1972 |
*/
|
1973 |
+
protected function loadStrings() {
|
1974 |
+
return $this->loadClass( 'Strings' );
|
1975 |
}
|
1976 |
|
1977 |
/**
|
1978 |
+
* @param $sClass
|
1979 |
+
* @return \stdClass|mixed|false
|
1980 |
*/
|
1981 |
+
private function loadClass( $sClass ) {
|
1982 |
+
$sC = $this->getNamespace().$sClass;
|
1983 |
+
return @class_exists( $sC ) ? new $sC() : false;
|
1984 |
}
|
1985 |
}
|
src/lib/src/Modules/Base/BaseProcessor.php
CHANGED
@@ -20,6 +20,11 @@ class BaseProcessor extends Deprecated\Foundation {
|
|
20 |
*/
|
21 |
private $bLoginCaptured;
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* @param BaseModCon $oMod
|
25 |
*/
|
@@ -51,6 +56,7 @@ class BaseProcessor extends Deprecated\Foundation {
|
|
51 |
add_action( 'wp_enqueue_scripts', [ $this, 'onWpEnqueueJs' ] );
|
52 |
}
|
53 |
|
|
|
54 |
$this->init();
|
55 |
}
|
56 |
|
@@ -64,7 +70,7 @@ class BaseProcessor extends Deprecated\Foundation {
|
|
64 |
}
|
65 |
|
66 |
/**
|
67 |
-
* @param string
|
68 |
* @param \WP_User $oUser
|
69 |
*/
|
70 |
public function onWpLogin( $sUsername, $oUser ) {
|
@@ -105,47 +111,6 @@ class BaseProcessor extends Deprecated\Foundation {
|
|
105 |
return $this;
|
106 |
}
|
107 |
|
108 |
-
/**
|
109 |
-
* @return int
|
110 |
-
*/
|
111 |
-
protected function getPromoNoticesCount() {
|
112 |
-
return self::$nPromoNoticesCount;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* @return $this
|
117 |
-
*/
|
118 |
-
protected function incrementPromoNoticesCount() {
|
119 |
-
self::$nPromoNoticesCount++;
|
120 |
-
return $this;
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* @param array $aAttrs
|
125 |
-
* @return bool
|
126 |
-
*/
|
127 |
-
protected function getIfDisplayAdminNotice( $aAttrs ) {
|
128 |
-
$bDisplay = true;
|
129 |
-
$oCon = $this->getCon();
|
130 |
-
$oWpNotices = $this->loadWpNotices();
|
131 |
-
|
132 |
-
if ( $aAttrs[ 'valid_admin' ] && !( $oCon->isValidAdminArea() && $oCon->isPluginAdmin() ) ) {
|
133 |
-
$bDisplay = false;
|
134 |
-
}
|
135 |
-
else if ( $aAttrs[ 'plugin_page_only' ] && !$this->getCon()->isModulePage() ) {
|
136 |
-
$bDisplay = false;
|
137 |
-
}
|
138 |
-
else if ( $aAttrs[ 'schedule' ] == 'once'
|
139 |
-
&& ( !Services::WpUsers()->canSaveMeta() || $oWpNotices->isDismissed( $aAttrs[ 'id' ] ) ) ) {
|
140 |
-
$bDisplay = false;
|
141 |
-
}
|
142 |
-
else if ( $aAttrs[ 'type' ] == 'promo' && Services::WpGeneral()->isMobile() ) {
|
143 |
-
$bDisplay = false;
|
144 |
-
}
|
145 |
-
|
146 |
-
return $bDisplay;
|
147 |
-
}
|
148 |
-
|
149 |
public function onModuleShutdown() {
|
150 |
}
|
151 |
|
@@ -162,39 +127,20 @@ class BaseProcessor extends Deprecated\Foundation {
|
|
162 |
}
|
163 |
|
164 |
/**
|
165 |
-
*
|
166 |
*/
|
167 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
168 |
}
|
169 |
|
170 |
/**
|
171 |
-
*
|
172 |
-
* @throws \Exception
|
173 |
*/
|
174 |
-
|
175 |
-
$aAttrs = $aNoticeData[ 'notice_attributes' ];
|
176 |
-
$bIsPromo = isset( $aAttrs[ 'type' ] ) && $aAttrs[ 'type' ] == 'promo';
|
177 |
-
if ( $bIsPromo && $this->getPromoNoticesCount() > 0 ) {
|
178 |
-
return;
|
179 |
-
}
|
180 |
-
|
181 |
-
$bCantDismiss = isset( $aNoticeData[ 'notice_attributes' ][ 'can_dismiss' ] )
|
182 |
-
&& !$aNoticeData[ 'notice_attributes' ][ 'can_dismiss' ];
|
183 |
-
|
184 |
-
$oNotices = $this->loadWpNotices();
|
185 |
-
if ( $bCantDismiss || !$oNotices->isDismissed( $aAttrs[ 'id' ] ) ) {
|
186 |
-
|
187 |
-
$sRenderedNotice = $this->getMod()->renderAdminNotice( $aNoticeData );
|
188 |
-
if ( !empty( $sRenderedNotice ) ) {
|
189 |
-
$oNotices->addAdminNotice(
|
190 |
-
$sRenderedNotice,
|
191 |
-
$aNoticeData[ 'notice_attributes' ][ 'notice_id' ]
|
192 |
-
);
|
193 |
-
if ( $bIsPromo ) {
|
194 |
-
$this->incrementPromoNoticesCount();
|
195 |
-
}
|
196 |
-
}
|
197 |
-
}
|
198 |
}
|
199 |
|
200 |
/**
|
20 |
*/
|
21 |
private $bLoginCaptured;
|
22 |
|
23 |
+
/**
|
24 |
+
* @var bool
|
25 |
+
*/
|
26 |
+
private $bHasExecuted;
|
27 |
+
|
28 |
/**
|
29 |
* @param BaseModCon $oMod
|
30 |
*/
|
56 |
add_action( 'wp_enqueue_scripts', [ $this, 'onWpEnqueueJs' ] );
|
57 |
}
|
58 |
|
59 |
+
$this->bHasExecuted = false;
|
60 |
$this->init();
|
61 |
}
|
62 |
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
+
* @param string $sUsername
|
74 |
* @param \WP_User $oUser
|
75 |
*/
|
76 |
public function onWpLogin( $sUsername, $oUser ) {
|
111 |
return $this;
|
112 |
}
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
public function onModuleShutdown() {
|
115 |
}
|
116 |
|
127 |
}
|
128 |
|
129 |
/**
|
130 |
+
* @return $this
|
131 |
*/
|
132 |
+
public function execute() {
|
133 |
+
if ( !$this->bHasExecuted ) {
|
134 |
+
$this->run();
|
135 |
+
$this->bHasExecuted;
|
136 |
+
}
|
137 |
+
return $this;
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
+
* Override to set what this processor does when it's "run"
|
|
|
142 |
*/
|
143 |
+
public function run() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
|
146 |
/**
|
src/lib/src/Modules/Base/Options.php
CHANGED
@@ -689,7 +689,7 @@ class Options {
|
|
689 |
|
690 |
/**
|
691 |
* @param string $sOptionKey
|
692 |
-
* @return
|
693 |
*/
|
694 |
public function resetOptToDefault( $sOptionKey ) {
|
695 |
return $this->setOpt( $sOptionKey, $this->getOptDefault( $sOptionKey ) );
|
@@ -754,11 +754,11 @@ class Options {
|
|
754 |
/**
|
755 |
* @param string $sOptKey
|
756 |
* @param mixed $mNewValue
|
757 |
-
* @return
|
758 |
*/
|
759 |
public function setOpt( $sOptKey, $mNewValue ) {
|
760 |
|
761 |
-
//
|
762 |
$aOptionsValues = $this->getAllOptionsValues();
|
763 |
$mCurrent = isset( $aOptionsValues[ $sOptKey ] ) ? $aOptionsValues[ $sOptKey ] : null;
|
764 |
|
@@ -781,15 +781,38 @@ class Options {
|
|
781 |
return $this->resetOptToDefault( $sOptKey );
|
782 |
}
|
783 |
}
|
784 |
-
$this->setOldOptValue( $sOptKey, $mCurrent )
|
785 |
-
|
786 |
}
|
787 |
|
788 |
if ( $bIsResetting ) {
|
789 |
unset( $this->aOld[ $sOptKey ] );
|
790 |
}
|
791 |
|
792 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
}
|
794 |
|
795 |
/**
|
@@ -1007,7 +1030,7 @@ class Options {
|
|
1007 |
/**
|
1008 |
* @param string
|
1009 |
* @return mixed|null
|
1010 |
-
* @deprecated
|
1011 |
*/
|
1012 |
public function getFeatureDefinition( $sDefinition ) {
|
1013 |
return $this->getDef( $sDefinition );
|
689 |
|
690 |
/**
|
691 |
* @param string $sOptionKey
|
692 |
+
* @return $this
|
693 |
*/
|
694 |
public function resetOptToDefault( $sOptionKey ) {
|
695 |
return $this->setOpt( $sOptionKey, $this->getOptDefault( $sOptionKey ) );
|
754 |
/**
|
755 |
* @param string $sOptKey
|
756 |
* @param mixed $mNewValue
|
757 |
+
* @return $this
|
758 |
*/
|
759 |
public function setOpt( $sOptKey, $mNewValue ) {
|
760 |
|
761 |
+
// NOTE: can't use getOpt() for current value since we'll create an infinite loop
|
762 |
$aOptionsValues = $this->getAllOptionsValues();
|
763 |
$mCurrent = isset( $aOptionsValues[ $sOptKey ] ) ? $aOptionsValues[ $sOptKey ] : null;
|
764 |
|
781 |
return $this->resetOptToDefault( $sOptKey );
|
782 |
}
|
783 |
}
|
784 |
+
$this->setOldOptValue( $sOptKey, $mCurrent )
|
785 |
+
->setOptValue( $sOptKey, $mNewValue );
|
786 |
}
|
787 |
|
788 |
if ( $bIsResetting ) {
|
789 |
unset( $this->aOld[ $sOptKey ] );
|
790 |
}
|
791 |
|
792 |
+
return $this;
|
793 |
+
}
|
794 |
+
|
795 |
+
/**
|
796 |
+
* @param string $sOpt
|
797 |
+
* @param int $nAt
|
798 |
+
* @return $this
|
799 |
+
*/
|
800 |
+
public function setOptAt( $sOpt, $nAt = null ) {
|
801 |
+
$nAt = is_null( $nAt ) ? Services::Request()->ts() : max( 0, (int)$nAt );
|
802 |
+
return $this->setOpt( $sOpt, $nAt );
|
803 |
+
}
|
804 |
+
|
805 |
+
/**
|
806 |
+
* Use this to directly set the option value without the risk of any recursion.
|
807 |
+
* @param string $sOptKey
|
808 |
+
* @param mixed $mValue
|
809 |
+
* @return $this
|
810 |
+
*/
|
811 |
+
private function setOptValue( $sOptKey, $mValue ) {
|
812 |
+
$aValues = $this->getAllOptionsValues();
|
813 |
+
$aValues[ $sOptKey ] = $mValue;
|
814 |
+
$this->aOptionsValues = $aValues;
|
815 |
+
return $this;
|
816 |
}
|
817 |
|
818 |
/**
|
1030 |
/**
|
1031 |
* @param string
|
1032 |
* @return mixed|null
|
1033 |
+
* @deprecated 8.1
|
1034 |
*/
|
1035 |
public function getFeatureDefinition( $sDefinition ) {
|
1036 |
return $this->getDef( $sDefinition );
|
src/lib/src/Modules/Base/ShieldOptions.php
CHANGED
@@ -19,6 +19,13 @@ class ShieldOptions extends Options {
|
|
19 |
return (int)round( ( Services::Request()->ts() - $nTimeInstalled )/DAY_IN_SECONDS );
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* @return bool
|
24 |
*/
|
19 |
return (int)round( ( Services::Request()->ts() - $nTimeInstalled )/DAY_IN_SECONDS );
|
20 |
}
|
21 |
|
22 |
+
/**
|
23 |
+
* @return bool
|
24 |
+
*/
|
25 |
+
public function isPremium() {
|
26 |
+
return $this->getCon()->isPremiumActive();
|
27 |
+
}
|
28 |
+
|
29 |
/**
|
30 |
* @return bool
|
31 |
*/
|
src/lib/src/Modules/BaseShield/ShieldProcessor.php
CHANGED
@@ -3,7 +3,166 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
|
|
|
6 |
|
7 |
class ShieldProcessor extends Base\BaseProcessor {
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
}
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
|
6 |
+
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
class ShieldProcessor extends Base\BaseProcessor {
|
9 |
|
10 |
+
const RECAPTCHA_JS_HANDLE = 'icwp-google-recaptcha';
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @var bool
|
14 |
+
*/
|
15 |
+
private static $bRecaptchaEnqueue = false;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var bool
|
19 |
+
*/
|
20 |
+
private $bLogRequest;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Resets the object values to be re-used anew
|
24 |
+
*/
|
25 |
+
public function init() {
|
26 |
+
parent::init();
|
27 |
+
$oFO = $this->getMod();
|
28 |
+
add_filter( $oFO->prefix( 'collect_tracking_data' ), [ $this, 'tracking_DataCollect' ] );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @param \WP_User $oUser
|
33 |
+
* @return bool
|
34 |
+
*/
|
35 |
+
protected function isUserSubjectToLoginIntent( $oUser = null ) {
|
36 |
+
$bIsSubject = false;
|
37 |
+
|
38 |
+
if ( !$oUser instanceof \WP_User ) {
|
39 |
+
$oUser = Services::WpUsers()->getCurrentWpUser();
|
40 |
+
}
|
41 |
+
if ( $oUser instanceof \WP_User ) {
|
42 |
+
$bIsSubject = apply_filters( $this->getCon()->prefix( 'user_subject_to_login_intent' ), false, $oUser );
|
43 |
+
}
|
44 |
+
|
45 |
+
return $bIsSubject;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @return bool
|
50 |
+
*/
|
51 |
+
protected function getRecaptchaTheme() {
|
52 |
+
/** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oFO */
|
53 |
+
$oFO = $this->getMod();
|
54 |
+
return $this->isRecaptchaInvisible() ? 'light' : $oFO->getGoogleRecaptchaStyle();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
protected function getIfLogRequest() {
|
61 |
+
return isset( $this->bLogRequest ) ? (bool)$this->bLogRequest : !Services::WpGeneral()->isCron();
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @param bool $bLog
|
66 |
+
* @return $this
|
67 |
+
*/
|
68 |
+
protected function setIfLogRequest( $bLog ) {
|
69 |
+
$this->bLogRequest = $bLog;
|
70 |
+
return $this;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
protected function isRecaptchaInvisible() {
|
77 |
+
/** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oFO */
|
78 |
+
$oFO = $this->getMod();
|
79 |
+
return ( $oFO->getGoogleRecaptchaStyle() == 'invisible' );
|
80 |
+
}
|
81 |
+
|
82 |
+
public function registerGoogleRecaptchaJs() {
|
83 |
+
$sJsUri = add_query_arg(
|
84 |
+
[
|
85 |
+
'hl' => $this->getGoogleRecaptchaLocale(),
|
86 |
+
'onload' => 'onLoadIcwpRecaptchaCallback',
|
87 |
+
'render' => 'explicit',
|
88 |
+
],
|
89 |
+
'https://www.google.com/recaptcha/api.js'
|
90 |
+
);
|
91 |
+
wp_register_script( self::RECAPTCHA_JS_HANDLE, $sJsUri, [], false, true );
|
92 |
+
wp_enqueue_script( self::RECAPTCHA_JS_HANDLE );
|
93 |
+
|
94 |
+
// This also gives us the chance to remove recaptcha before it's printed, if it isn't needed
|
95 |
+
add_action( 'wp_footer', [ $this, 'maybeDequeueRecaptcha' ], -100 );
|
96 |
+
add_action( 'login_footer', [ $this, 'maybeDequeueRecaptcha' ], -100 );
|
97 |
+
|
98 |
+
Services::Includes()
|
99 |
+
->addIncludeAttribute( self::RECAPTCHA_JS_HANDLE, 'async', 'async' )
|
100 |
+
->addIncludeAttribute( self::RECAPTCHA_JS_HANDLE, 'defer', 'defer' );
|
101 |
+
/**
|
102 |
+
* Change to recaptcha implementation now means
|
103 |
+
* 1 - the form will not submit unless the recaptcha has been executed (either invisible or manual)
|
104 |
+
*/
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Filter used to collect plugin data for tracking. Fired from the plugin processor only if the option is enabled
|
109 |
+
* - it is not enabled by default.
|
110 |
+
* Note that in this case we "mask" options that have been identified as "sensitive" - i.e. could contain
|
111 |
+
* identifiable data.
|
112 |
+
*
|
113 |
+
* @param $aData
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public function tracking_DataCollect( $aData ) {
|
117 |
+
if ( !is_array( $aData ) ) {
|
118 |
+
$aData = [];
|
119 |
+
}
|
120 |
+
$oFO = $this->getMod();
|
121 |
+
$aData[ $oFO->getSlug() ] = [ 'options' => $oFO->collectOptionsForTracking() ];
|
122 |
+
return $aData;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* If recaptcha is required, it prints the necessary snippet and does not remove the enqueue
|
127 |
+
*
|
128 |
+
* @throws \Exception
|
129 |
+
*/
|
130 |
+
public function maybeDequeueRecaptcha() {
|
131 |
+
|
132 |
+
if ( $this->isRecaptchaEnqueue() ) {
|
133 |
+
/** @var \ICWP_WPSF_FeatureHandler_BaseWpsf $oMod */
|
134 |
+
$oMod = $this->getMod();
|
135 |
+
echo $oMod->renderTemplate(
|
136 |
+
'snippets/google_recaptcha_js',
|
137 |
+
[
|
138 |
+
'sitekey' => $oMod->getGoogleRecaptchaSiteKey(),
|
139 |
+
'size' => $this->isRecaptchaInvisible() ? 'invisible' : '',
|
140 |
+
'theme' => $this->getRecaptchaTheme(),
|
141 |
+
'invis' => $this->isRecaptchaInvisible(),
|
142 |
+
]
|
143 |
+
|
144 |
+
);
|
145 |
+
}
|
146 |
+
else {
|
147 |
+
wp_dequeue_script( self::RECAPTCHA_JS_HANDLE );
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @return bool
|
153 |
+
*/
|
154 |
+
public function isRecaptchaEnqueue() {
|
155 |
+
return self::$bRecaptchaEnqueue;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Note we don't provide a 'false' option here as if it's set to be needed somewhere,
|
160 |
+
* it shouldn't be unset anywhere else.
|
161 |
+
*
|
162 |
+
* @return $this
|
163 |
+
*/
|
164 |
+
public function setRecaptchaToEnqueue() {
|
165 |
+
self::$bRecaptchaEnqueue = true;
|
166 |
+
return $this;
|
167 |
+
}
|
168 |
}
|
src/lib/src/Modules/Events/Strings.php
CHANGED
@@ -6,8 +6,21 @@ use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
|
|
6 |
|
7 |
class Strings extends Base\Strings {
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
'test_cron_run' => __( 'Test Cron Run', 'wp-simple-firewall' ),
|
12 |
'import_notify_sent' => __( 'Import Notify Sent', 'wp-simple-firewall' ),
|
13 |
'import_notify_received' => __( 'Import Notify Received', 'wp-simple-firewall' ),
|
@@ -245,5 +258,15 @@ class Strings extends Base\Strings {
|
|
245 |
'lic_fail_email' => __( 'License Failure Email', 'wp-simple-firewall' ),
|
246 |
'lic_fail_deactivate' => __( 'License Deactivated', 'wp-simple-firewall' ),
|
247 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
}
|
249 |
}
|
6 |
|
7 |
class Strings extends Base\Strings {
|
8 |
|
9 |
+
/**
|
10 |
+
* @param string $sKey
|
11 |
+
* @return string
|
12 |
+
*/
|
13 |
+
public function getEventName( $sKey ) {
|
14 |
+
$aE = $this->getEventNames();
|
15 |
+
return empty( $aE[ $sKey ] ) ? '' : $aE[ $sKey ];
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @param bool $bAuto
|
20 |
+
* @return string[]
|
21 |
+
*/
|
22 |
+
public function getEventNames( $bAuto = true ) {
|
23 |
+
$aNames = [
|
24 |
'test_cron_run' => __( 'Test Cron Run', 'wp-simple-firewall' ),
|
25 |
'import_notify_sent' => __( 'Import Notify Sent', 'wp-simple-firewall' ),
|
26 |
'import_notify_received' => __( 'Import Notify Received', 'wp-simple-firewall' ),
|
258 |
'lic_fail_email' => __( 'License Failure Email', 'wp-simple-firewall' ),
|
259 |
'lic_fail_deactivate' => __( 'License Deactivated', 'wp-simple-firewall' ),
|
260 |
];
|
261 |
+
|
262 |
+
if ( $bAuto ) {
|
263 |
+
foreach ( $aNames as $sKey => $sName ) {
|
264 |
+
if ( empty( $sName ) ) {
|
265 |
+
$aNames[ $sKey ] = ucwords( str_replace( '_', ' ', $sKey ) );
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
return $aNames;
|
271 |
}
|
272 |
}
|
src/lib/src/Modules/HackGuard/AjaxHandler.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
@@ -57,7 +58,8 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
57 |
private function ajaxExec_BuildTableScan() {
|
58 |
$oMod = $this->getMod();
|
59 |
|
60 |
-
|
|
|
61 |
|
62 |
case 'apc':
|
63 |
$oTableBuilder = new Shield\Tables\Build\ScanApc();
|
@@ -94,6 +96,7 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
94 |
$sHtml = $oTableBuilder
|
95 |
->setMod( $oMod )
|
96 |
->setDbHandler( $oMod->getDbHandler() )
|
|
|
97 |
->buildTable();
|
98 |
}
|
99 |
|
@@ -135,19 +138,21 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
135 |
* @return array
|
136 |
*/
|
137 |
private function ajaxExec_ScanItemAction( $sAction ) {
|
|
|
138 |
$oMod = $this->getMod();
|
|
|
139 |
$oReq = Services::Request();
|
140 |
|
141 |
$bSuccess = false;
|
142 |
|
143 |
$sItemId = $oReq->post( 'rid' );
|
144 |
$aItemIds = $oReq->post( 'ids' );
|
145 |
-
$
|
146 |
|
147 |
/** @var \ICWP_WPSF_Processor_HackProtect $oP */
|
148 |
$oP = $oMod->getProcessor();
|
149 |
$oScanner = $oP->getSubProScanner();
|
150 |
-
$oTablePro = $oScanner->getScannerFromSlug( $
|
151 |
|
152 |
if ( empty( $oTablePro ) ) {
|
153 |
$sMessage = __( 'Unsupported scanner', 'wp-simple-firewall' );
|
@@ -179,7 +184,7 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
179 |
|
180 |
// We don't rescan for ignores.
|
181 |
if ( !in_array( $sAction, [ 'ignore' ] ) ) {
|
182 |
-
$
|
183 |
$sMessage .= ' '.__( 'Rescanning', 'wp-simple-firewall' ).' ...';
|
184 |
}
|
185 |
else {
|
@@ -208,14 +213,15 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
208 |
$oP = $oMod->getProcessor();
|
209 |
/** @var Strings $oStrings */
|
210 |
$oStrings = $oMod->getStrings();
|
211 |
-
$
|
212 |
-
|
213 |
-
$
|
214 |
-
|
215 |
-
$
|
216 |
-
$
|
|
|
217 |
if ( $bHasCurrent ) {
|
218 |
-
$sCurrentScan = $oStrings->getScanName( $
|
219 |
}
|
220 |
else {
|
221 |
$sCurrentScan = __( 'No scan running.', 'wp-simple-firewall' );
|
@@ -223,7 +229,7 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
223 |
|
224 |
return [
|
225 |
'success' => true,
|
226 |
-
'running' => $
|
227 |
'vars' => [
|
228 |
'progress_html' => $oMod->renderTemplate(
|
229 |
'/wpadmin_pages/insights/scans/modal_progress_snippet.twig',
|
@@ -231,8 +237,8 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
231 |
'current_scan' => __( 'Current Scan', 'wp-simple-firewall' ),
|
232 |
'scan' => $sCurrentScan,
|
233 |
'remaining_scans' => sprintf( __( '%s of %s scans remaining.', 'wp-simple-firewall' ),
|
234 |
-
count( $
|
235 |
-
'progress' => 100*$
|
236 |
'patience_1' => __( 'Please be patient.', 'wp-simple-firewall' ),
|
237 |
'patience_2' => __( 'Some scans can take quite a while to complete.', 'wp-simple-firewall' ),
|
238 |
'completed' => __( 'Scans completed.', 'wp-simple-firewall' ).' '.__( 'Reloading page', 'wp-simple-firewall' ).'...'
|
@@ -247,6 +253,7 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
247 |
* @return array
|
248 |
*/
|
249 |
private function ajaxExec_StartScans() {
|
|
|
250 |
$oMod = $this->getMod();
|
251 |
$bSuccess = false;
|
252 |
$bPageReload = false;
|
@@ -256,6 +263,8 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
256 |
/** @var \ICWP_WPSF_Processor_HackProtect $oP */
|
257 |
$oP = $oMod->getProcessor();
|
258 |
$oScanner = $oP->getSubProScanner();
|
|
|
|
|
259 |
if ( !empty( $aFormParams ) ) {
|
260 |
$aSelectedScans = array_keys( $aFormParams );
|
261 |
|
@@ -263,14 +272,14 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
263 |
$aUiTrack[ 'selected_scans' ] = $aSelectedScans;
|
264 |
$oMod->setUiTrack( $aUiTrack );
|
265 |
|
266 |
-
$
|
267 |
foreach ( $aSelectedScans as $sScanSlug ) {
|
268 |
|
269 |
$oTablePro = $oScanner->getScannerFromSlug( $sScanSlug );
|
270 |
|
271 |
if ( !empty( $oTablePro ) && $oTablePro->isAvailable() ) {
|
272 |
$bAsync = true;
|
273 |
-
$
|
274 |
|
275 |
if ( isset( $aFormParams[ 'opt_clear_ignore' ] ) ) {
|
276 |
$oTablePro->resetIgnoreStatus();
|
@@ -284,12 +293,14 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
284 |
$sMessage = $bAsync ?
|
285 |
__( 'Scans started.', 'wp-simple-firewall' ).' '.__( 'Please wait, as this will take a few moments.', 'wp-simple-firewall' )
|
286 |
: __( 'Scans completed.', 'wp-simple-firewall' ).' '.__( 'Reloading page', 'wp-simple-firewall' );
|
|
|
287 |
}
|
288 |
}
|
289 |
-
$
|
290 |
}
|
291 |
|
292 |
-
$bScansRunning = $
|
|
|
293 |
return [
|
294 |
'success' => $bSuccess,
|
295 |
'scans_running' => $bScansRunning,
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
9 |
class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
58 |
private function ajaxExec_BuildTableScan() {
|
59 |
$oMod = $this->getMod();
|
60 |
|
61 |
+
$sScanSlug = Services::Request()->post( 'fScan' );
|
62 |
+
switch ( $sScanSlug ) {
|
63 |
|
64 |
case 'apc':
|
65 |
$oTableBuilder = new Shield\Tables\Build\ScanApc();
|
96 |
$sHtml = $oTableBuilder
|
97 |
->setMod( $oMod )
|
98 |
->setDbHandler( $oMod->getDbHandler() )
|
99 |
+
->setScanActionVO( ( new Scan\ScanActionFromSlug() )->getAction( $sScanSlug ) )
|
100 |
->buildTable();
|
101 |
}
|
102 |
|
138 |
* @return array
|
139 |
*/
|
140 |
private function ajaxExec_ScanItemAction( $sAction ) {
|
141 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
142 |
$oMod = $this->getMod();
|
143 |
+
$oScanCon = $oMod->getScanController();
|
144 |
$oReq = Services::Request();
|
145 |
|
146 |
$bSuccess = false;
|
147 |
|
148 |
$sItemId = $oReq->post( 'rid' );
|
149 |
$aItemIds = $oReq->post( 'ids' );
|
150 |
+
$sScanSlug = $oReq->post( 'fScan' );
|
151 |
|
152 |
/** @var \ICWP_WPSF_Processor_HackProtect $oP */
|
153 |
$oP = $oMod->getProcessor();
|
154 |
$oScanner = $oP->getSubProScanner();
|
155 |
+
$oTablePro = $oScanner->getScannerFromSlug( $sScanSlug );
|
156 |
|
157 |
if ( empty( $oTablePro ) ) {
|
158 |
$sMessage = __( 'Unsupported scanner', 'wp-simple-firewall' );
|
184 |
|
185 |
// We don't rescan for ignores.
|
186 |
if ( !in_array( $sAction, [ 'ignore' ] ) ) {
|
187 |
+
$oScanCon->startScans( [ $sScanSlug ] );
|
188 |
$sMessage .= ' '.__( 'Rescanning', 'wp-simple-firewall' ).' ...';
|
189 |
}
|
190 |
else {
|
213 |
$oP = $oMod->getProcessor();
|
214 |
/** @var Strings $oStrings */
|
215 |
$oStrings = $oMod->getStrings();
|
216 |
+
$oDbH = $oMod->getDbHandler_ScanQueue();
|
217 |
+
/** @var Shield\Databases\ScanQueue\Select $oSel */
|
218 |
+
$oSel = $oDbH->getQuerySelector();
|
219 |
+
|
220 |
+
$oQueCon = $oMod->getScanController();
|
221 |
+
$sCurrent = $oSel->getCurrentScan();
|
222 |
+
$bHasCurrent = !empty( $sCurrent );
|
223 |
if ( $bHasCurrent ) {
|
224 |
+
$sCurrentScan = $oStrings->getScanName( $sCurrent );
|
225 |
}
|
226 |
else {
|
227 |
$sCurrentScan = __( 'No scan running.', 'wp-simple-firewall' );
|
229 |
|
230 |
return [
|
231 |
'success' => true,
|
232 |
+
'running' => $oQueCon->getScansRunningStates(),
|
233 |
'vars' => [
|
234 |
'progress_html' => $oMod->renderTemplate(
|
235 |
'/wpadmin_pages/insights/scans/modal_progress_snippet.twig',
|
237 |
'current_scan' => __( 'Current Scan', 'wp-simple-firewall' ),
|
238 |
'scan' => $sCurrentScan,
|
239 |
'remaining_scans' => sprintf( __( '%s of %s scans remaining.', 'wp-simple-firewall' ),
|
240 |
+
count( $oSel->getUnfinishedScans() ), count( $oSel->getInitiatedScans() ) ),
|
241 |
+
'progress' => 100*$oQueCon->getScanJobProgress(),
|
242 |
'patience_1' => __( 'Please be patient.', 'wp-simple-firewall' ),
|
243 |
'patience_2' => __( 'Some scans can take quite a while to complete.', 'wp-simple-firewall' ),
|
244 |
'completed' => __( 'Scans completed.', 'wp-simple-firewall' ).' '.__( 'Reloading page', 'wp-simple-firewall' ).'...'
|
253 |
* @return array
|
254 |
*/
|
255 |
private function ajaxExec_StartScans() {
|
256 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
257 |
$oMod = $this->getMod();
|
258 |
$bSuccess = false;
|
259 |
$bPageReload = false;
|
263 |
/** @var \ICWP_WPSF_Processor_HackProtect $oP */
|
264 |
$oP = $oMod->getProcessor();
|
265 |
$oScanner = $oP->getSubProScanner();
|
266 |
+
$oScanCon = $oMod->getScanController();
|
267 |
+
|
268 |
if ( !empty( $aFormParams ) ) {
|
269 |
$aSelectedScans = array_keys( $aFormParams );
|
270 |
|
272 |
$aUiTrack[ 'selected_scans' ] = $aSelectedScans;
|
273 |
$oMod->setUiTrack( $aUiTrack );
|
274 |
|
275 |
+
$aScansToStart = [];
|
276 |
foreach ( $aSelectedScans as $sScanSlug ) {
|
277 |
|
278 |
$oTablePro = $oScanner->getScannerFromSlug( $sScanSlug );
|
279 |
|
280 |
if ( !empty( $oTablePro ) && $oTablePro->isAvailable() ) {
|
281 |
$bAsync = true;
|
282 |
+
$aScansToStart[] = $sScanSlug;
|
283 |
|
284 |
if ( isset( $aFormParams[ 'opt_clear_ignore' ] ) ) {
|
285 |
$oTablePro->resetIgnoreStatus();
|
293 |
$sMessage = $bAsync ?
|
294 |
__( 'Scans started.', 'wp-simple-firewall' ).' '.__( 'Please wait, as this will take a few moments.', 'wp-simple-firewall' )
|
295 |
: __( 'Scans completed.', 'wp-simple-firewall' ).' '.__( 'Reloading page', 'wp-simple-firewall' );
|
296 |
+
|
297 |
}
|
298 |
}
|
299 |
+
$oScanCon->startScans( $aScansToStart );
|
300 |
}
|
301 |
|
302 |
+
$bScansRunning = $oScanCon->hasRunningScans();
|
303 |
+
|
304 |
return [
|
305 |
'success' => $bSuccess,
|
306 |
'scans_running' => $bScansRunning,
|
src/lib/src/Modules/HackGuard/Options.php
CHANGED
@@ -14,6 +14,13 @@ class Options extends Base\ShieldOptions {
|
|
14 |
return $this->getDef( 'table_columns_scanner' );
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* @return string
|
19 |
*/
|
@@ -21,6 +28,13 @@ class Options extends Base\ShieldOptions {
|
|
21 |
return $this->getCon()->prefixOption( $this->getDef( 'table_name_scanner' ) );
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* We do some WP Content dir replacement as there may be custom wp-content dir defines
|
26 |
* @return string[]
|
@@ -59,14 +73,6 @@ class Options extends Base\ShieldOptions {
|
|
59 |
return $this->getMalSignatures( 'malsigs_regex.txt', $this->getDef( 'url_mal_sigs_regex' ) );
|
60 |
}
|
61 |
|
62 |
-
/**
|
63 |
-
* @return string[]
|
64 |
-
*/
|
65 |
-
public function getMalWhitelistHashes() {
|
66 |
-
$aH = $this->getDef( 'mal_whitelist_hashes' );
|
67 |
-
return is_array( $aH ) ? $aH : [];
|
68 |
-
}
|
69 |
-
|
70 |
/**
|
71 |
* @param string $sFilename
|
72 |
* @param string $sUrl
|
@@ -117,6 +123,52 @@ class Options extends Base\ShieldOptions {
|
|
117 |
return $this->getCon()->getPluginCachePath( 'ptguard/' );
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* @return array
|
122 |
*/
|
@@ -206,14 +258,17 @@ class Options extends Base\ShieldOptions {
|
|
206 |
}
|
207 |
|
208 |
/**
|
209 |
-
* @return
|
210 |
*/
|
211 |
-
public function
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
218 |
}
|
219 |
}
|
14 |
return $this->getDef( 'table_columns_scanner' );
|
15 |
}
|
16 |
|
17 |
+
/**
|
18 |
+
* @return string[]
|
19 |
+
*/
|
20 |
+
public function getDbColumns_ScanQueue() {
|
21 |
+
return $this->getDef( 'table_columns_scanqueue' );
|
22 |
+
}
|
23 |
+
|
24 |
/**
|
25 |
* @return string
|
26 |
*/
|
28 |
return $this->getCon()->prefixOption( $this->getDef( 'table_name_scanner' ) );
|
29 |
}
|
30 |
|
31 |
+
/**
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function getDbTable_ScanQueue() {
|
35 |
+
return $this->getCon()->prefixOption( $this->getDef( 'table_name_scanqueue' ) );
|
36 |
+
}
|
37 |
+
|
38 |
/**
|
39 |
* We do some WP Content dir replacement as there may be custom wp-content dir defines
|
40 |
* @return string[]
|
73 |
return $this->getMalSignatures( 'malsigs_regex.txt', $this->getDef( 'url_mal_sigs_regex' ) );
|
74 |
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
/**
|
77 |
* @param string $sFilename
|
78 |
* @param string $sUrl
|
123 |
return $this->getCon()->getPluginCachePath( 'ptguard/' );
|
124 |
}
|
125 |
|
126 |
+
/**
|
127 |
+
* @return int
|
128 |
+
*/
|
129 |
+
public function getScanFrequency() {
|
130 |
+
return (int)$this->getOpt( 'scan_frequency', 1 );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @return string[]
|
135 |
+
*/
|
136 |
+
public function getScanSlugs() {
|
137 |
+
return $this->getDef( 'all_scan_slugs' );
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @param string $sScan
|
142 |
+
* @param bool $bAdd
|
143 |
+
* @return Options
|
144 |
+
*/
|
145 |
+
public function addRemoveScanToBuild( $sScan, $bAdd = true ) {
|
146 |
+
$aS = $this->getScansToBuild();
|
147 |
+
if ( $bAdd ) {
|
148 |
+
$aS[ $sScan ] = $sScan;
|
149 |
+
}
|
150 |
+
else if ( isset( $aS[ $sScan ] ) ) {
|
151 |
+
unset( $aS[ $sScan ] );
|
152 |
+
}
|
153 |
+
return $this->setScansToBuild( $aS );
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* @return array
|
158 |
+
*/
|
159 |
+
public function getScansToBuild() {
|
160 |
+
$aS = $this->getOpt( 'scans_to_build' );
|
161 |
+
return is_array( $aS ) ? $aS : [];
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* @param array $aScans
|
166 |
+
* @return Options
|
167 |
+
*/
|
168 |
+
public function setScansToBuild( $aScans ) {
|
169 |
+
return $this->setOpt( 'scans_to_build', array_intersect( $aScans, $this->getScanSlugs() ) );
|
170 |
+
}
|
171 |
+
|
172 |
/**
|
173 |
* @return array
|
174 |
*/
|
258 |
}
|
259 |
|
260 |
/**
|
261 |
+
* @return bool
|
262 |
*/
|
263 |
+
public function isScanCron() {
|
264 |
+
return (bool)$this->getOpt( 'is_scan_cron' );
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* @param bool $bIsScanCron
|
269 |
+
* @return $this
|
270 |
+
*/
|
271 |
+
public function setIsScanCron( $bIsScanCron ) {
|
272 |
+
return $this->setOpt( 'is_scan_cron', $bIsScanCron );
|
273 |
}
|
274 |
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilder.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue\Build;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
7 |
+
use FernleafSystems\Wordpress\Services\Utilities;
|
8 |
+
|
9 |
+
class QueueBuilder extends Utilities\BackgroundProcessing\BackgroundProcess {
|
10 |
+
|
11 |
+
use Shield\Modules\ModConsumer,
|
12 |
+
HackGuard\Scan\Queue\QueueProcessorConsumer;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get batch
|
16 |
+
*
|
17 |
+
* @return \stdClass Return the first batch from the queue
|
18 |
+
*/
|
19 |
+
protected function get_batch() {
|
20 |
+
/** @var HackGuard\Options $oOpts */
|
21 |
+
$oOpts = $this->getMod()->getOptions();
|
22 |
+
$aScans = $oOpts->getScansToBuild();
|
23 |
+
$sScan = key( $aScans );
|
24 |
+
|
25 |
+
$oBatch = new \stdClass();
|
26 |
+
$oBatch->key = $sScan;
|
27 |
+
$oBatch->data = [ $sScan ];
|
28 |
+
return $oBatch;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Dispatch
|
33 |
+
*
|
34 |
+
* @access public
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function dispatch() {
|
38 |
+
// ensure any scheduled scans have been saved before remote post
|
39 |
+
$this->save();
|
40 |
+
// Perform remote post.
|
41 |
+
return parent::dispatch();
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Task
|
46 |
+
*
|
47 |
+
* Override this method to perform any actions required on each
|
48 |
+
* queue item. Return the modified item for further processing
|
49 |
+
* in the next pass through. Or, return false to remove the
|
50 |
+
* item from the queue.
|
51 |
+
*
|
52 |
+
* @param string $sScanSlug .
|
53 |
+
*
|
54 |
+
* @return mixed
|
55 |
+
*/
|
56 |
+
protected function task( $sScanSlug ) {
|
57 |
+
|
58 |
+
try {
|
59 |
+
( new HackGuard\Scan\Queue\ScanInitiate() )
|
60 |
+
->setMod( $this->getMod() )
|
61 |
+
->setQueueProcessor( $this->getQueueProcessor() )
|
62 |
+
->init( $sScanSlug );
|
63 |
+
}
|
64 |
+
catch ( \Exception $oE ) {
|
65 |
+
// error_log( $oE->getMessage() );
|
66 |
+
}
|
67 |
+
|
68 |
+
// deletes the scan from the to-be-built array
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Complete.
|
74 |
+
*
|
75 |
+
* Override if applicable, but ensure that the below actions are
|
76 |
+
* performed, or, call parent::complete().
|
77 |
+
*/
|
78 |
+
protected function complete() {
|
79 |
+
parent::complete();
|
80 |
+
$this->getQueueProcessor()->dispatch();
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Delete queue
|
85 |
+
*
|
86 |
+
* @param string $sScanSlug .
|
87 |
+
* @return $this
|
88 |
+
*/
|
89 |
+
public function delete( $sScanSlug ) {
|
90 |
+
/** @var HackGuard\Options $oOpts */
|
91 |
+
$oOpts = $this->getMod()->getOptions();
|
92 |
+
$oOpts->addRemoveScanToBuild( $sScanSlug, false );
|
93 |
+
$this->save();
|
94 |
+
return $this;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Is queue empty
|
99 |
+
*
|
100 |
+
* @return bool
|
101 |
+
*/
|
102 |
+
protected function is_queue_empty() {
|
103 |
+
/** @var HackGuard\Options $oOpts */
|
104 |
+
$oOpts = $this->getMod()->getOptions();
|
105 |
+
return count( $oOpts->getScansToBuild() ) === 0;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Save queue
|
110 |
+
*
|
111 |
+
* @return $this
|
112 |
+
*/
|
113 |
+
public function save() {
|
114 |
+
$this->getMod()->saveModOptions();
|
115 |
+
return $this;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Update queue
|
120 |
+
*
|
121 |
+
* @param string $key Key.
|
122 |
+
* @param mixed $data Data.
|
123 |
+
* @return $this
|
124 |
+
*/
|
125 |
+
public function update( $key, $data ) {
|
126 |
+
return $this;
|
127 |
+
}
|
128 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilderConsumer.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue\Build;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Trait QueueBuilderConsumer
|
7 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue\Build
|
8 |
+
*/
|
9 |
+
trait QueueBuilderConsumer {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @var QueueBuilder
|
13 |
+
*/
|
14 |
+
private $oQueueBuilder;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @return QueueBuilder
|
18 |
+
*/
|
19 |
+
public function getQueueBuilder() {
|
20 |
+
return $this->oQueueBuilder;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param QueueBuilder $oQP
|
25 |
+
* @return $this
|
26 |
+
*/
|
27 |
+
public function setQueueBuilder( QueueBuilder $oQP ) {
|
28 |
+
$this->oQueueBuilder = $oQP;
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/BuildScanAction.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\ScanActionFromSlug;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class BuildScanAction
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
11 |
+
*/
|
12 |
+
class BuildScanAction {
|
13 |
+
|
14 |
+
use Shield\Modules\ModConsumer;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param string $sSlug
|
18 |
+
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
19 |
+
* @throws \Exception
|
20 |
+
*/
|
21 |
+
public function build( $sSlug ) {
|
22 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
23 |
+
$oMod = $this->getMod();
|
24 |
+
|
25 |
+
$oAction = ( new ScanActionFromSlug() )->getAction( $sSlug );
|
26 |
+
|
27 |
+
// Build the action definition:
|
28 |
+
|
29 |
+
$sClass = $oAction->getScanNamespace().'BuildScanAction';
|
30 |
+
/** @var Shield\Scans\Base\BaseBuildScanAction $oBuilder */
|
31 |
+
$oBuilder = new $sClass();
|
32 |
+
$oBuilder->setMod( $oMod )
|
33 |
+
->setScanActionVO( $oAction )
|
34 |
+
->build();
|
35 |
+
return $oAction;
|
36 |
+
}
|
37 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/CollateResults.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class CollateResults
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
11 |
+
*/
|
12 |
+
class CollateResults {
|
13 |
+
|
14 |
+
use Databases\Base\HandlerConsumer;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param string $sScanSlug
|
18 |
+
* @return Scans\Base\BaseResultsSet|mixed|null
|
19 |
+
*/
|
20 |
+
public function collate( $sScanSlug ) {
|
21 |
+
/** @var Databases\ScanQueue\Handler $oDbH */
|
22 |
+
$oDbH = $this->getDbHandler();
|
23 |
+
/** @var Databases\ScanQueue\Select $oSel */
|
24 |
+
$oSel = $oDbH->getQuerySelector();
|
25 |
+
$oSel->filterByScan( $sScanSlug )
|
26 |
+
->setResultsAsVo( true );
|
27 |
+
|
28 |
+
$oResultsSet = null;
|
29 |
+
/** @var Databases\ScanQueue\EntryVO $oEntry */
|
30 |
+
foreach ( $oSel->query() as $oEntry ) {
|
31 |
+
$oAction = ( new ConvertBetweenTypes() )
|
32 |
+
->setDbHandler( $oDbH )
|
33 |
+
->fromDbEntryToAction( $oEntry );
|
34 |
+
|
35 |
+
if ( empty( $oResultsSet ) ) {
|
36 |
+
$oResultsSet = $oAction->getNewResultsSet();
|
37 |
+
}
|
38 |
+
|
39 |
+
foreach ( $oAction->results as $aResItemData ) {
|
40 |
+
$oResultsSet->addItem(
|
41 |
+
$oAction->getNewResultItem()->applyFromArray( $aResItemData )
|
42 |
+
);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
return $oResultsSet;
|
47 |
+
}
|
48 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/CompleteQueue.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
7 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
8 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
9 |
+
use FernleafSystems\Wordpress\Services\Services;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class CompleteQueue
|
13 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
14 |
+
*/
|
15 |
+
class CompleteQueue {
|
16 |
+
|
17 |
+
use ModConsumer,
|
18 |
+
Databases\Base\HandlerConsumer;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Take care here not to confuse the 2x DB Handlers
|
22 |
+
*/
|
23 |
+
public function complete() {
|
24 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
25 |
+
$oMod = $this->getMod();
|
26 |
+
$oDbH = $this->getDbHandler();
|
27 |
+
$oSel = $oDbH->getQuerySelector();
|
28 |
+
|
29 |
+
/** @var Databases\Scanner\Handler $oDbH */
|
30 |
+
$oDbHResults = $oMod->getDbHandler();
|
31 |
+
$aScansToNotify = [];
|
32 |
+
foreach ( $oSel->getDistinctForColumn( 'scan' ) as $sScanSlug ) {
|
33 |
+
|
34 |
+
$oAction = ( new HackGuard\Scan\ScanActionFromSlug() )->getAction( $sScanSlug );
|
35 |
+
|
36 |
+
$oResultsSet = ( new CollateResults() )
|
37 |
+
->setDbHandler( $oDbH )
|
38 |
+
->collate( $sScanSlug );
|
39 |
+
|
40 |
+
$this->getCon()->fireEvent( $oAction->scan.'_scan_run' );
|
41 |
+
|
42 |
+
if ( $oResultsSet instanceof Scans\Base\BaseResultsSet ) {
|
43 |
+
( new HackGuard\Scan\Results\ResultsUpdate() )
|
44 |
+
->setDbHandler( $oDbHResults )
|
45 |
+
->setScanActionVO( $oAction )
|
46 |
+
->update( $oResultsSet );
|
47 |
+
|
48 |
+
if ( $oResultsSet->countItems() > 0 ) {
|
49 |
+
$this->getCon()->fireEvent( $oAction->scan.'_scan_found' );
|
50 |
+
$aScansToNotify[] = $oAction->scan;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/** @var Databases\ScanQueue\Delete $oDel */
|
55 |
+
$oDel = $oDbH->getQueryDeleter();
|
56 |
+
$oDel->filterByScan( $sScanSlug )
|
57 |
+
->query();
|
58 |
+
}
|
59 |
+
|
60 |
+
/** @var HackGuard\Options $oOpts */
|
61 |
+
$oOpts = $this->getOptions();
|
62 |
+
if ( $oOpts->isScanCron() && !empty( $aScansToNotify ) && !wp_next_scheduled( $oMod->prefix( 'post_scan' ) ) ) {
|
63 |
+
wp_schedule_single_event(
|
64 |
+
Services::Request()->ts() + 30,
|
65 |
+
$oMod->prefix( 'post_scan' ),
|
66 |
+
[ $aScansToNotify ]
|
67 |
+
);
|
68 |
+
}
|
69 |
+
$oOpts->setIsScanCron( false );
|
70 |
+
}
|
71 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/Controller.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue\Select;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
7 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Controller
|
11 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
12 |
+
*/
|
13 |
+
class Controller {
|
14 |
+
|
15 |
+
use ModConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var Build\QueueBuilder
|
19 |
+
*/
|
20 |
+
private $oQueueBuilder;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @var QueueProcessor
|
24 |
+
*/
|
25 |
+
private $oQueueProcessor;
|
26 |
+
|
27 |
+
public function __construct() {
|
28 |
+
add_action( 'wp_loaded', [ $this, 'onWpLoaded' ] );
|
29 |
+
}
|
30 |
+
|
31 |
+
public function onWpLoaded() {
|
32 |
+
$this->getQueueBuilder();
|
33 |
+
$this->getQueueProcessor();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @return bool[]
|
38 |
+
*/
|
39 |
+
public function getScansRunningStates() {
|
40 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
41 |
+
$oMod = $this->getMod();
|
42 |
+
/** @var HackGuard\Options $oOpts */
|
43 |
+
$oOpts = $oMod->getOptions();
|
44 |
+
/** @var Select $oSel */
|
45 |
+
$oSel = $oMod->getDbHandler_ScanQueue()->getQuerySelector();
|
46 |
+
|
47 |
+
$aScans = array_fill_keys( $oOpts->getScanSlugs(), false );
|
48 |
+
foreach ( $oSel->getInitiatedScans() as $sInitScan ) {
|
49 |
+
$aScans[ $sInitScan ] = true;
|
50 |
+
}
|
51 |
+
return $aScans;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return string[]
|
56 |
+
*/
|
57 |
+
public function getRunningScans() {
|
58 |
+
return array_keys( array_filter( $this->getScansRunningStates() ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @return float
|
63 |
+
*/
|
64 |
+
public function getScanJobProgress() {
|
65 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
66 |
+
$oMod = $this->getMod();
|
67 |
+
$oDbH = $oMod->getDbHandler_ScanQueue();
|
68 |
+
/** @var Select $oSel */
|
69 |
+
$oSel = $oDbH->getQuerySelector();
|
70 |
+
|
71 |
+
$aUnfinished = $oSel->getUnfinishedScans();
|
72 |
+
$nProgress = 1;
|
73 |
+
if ( $oSel->getUnfinishedScans() > 0 ) {
|
74 |
+
$nInitiated = count( $oSel->getInitiatedScans() );
|
75 |
+
if ( $nInitiated > 0 ) {
|
76 |
+
$nProgress = 1 - ( count( $aUnfinished )/count( $oSel->getInitiatedScans() ) );
|
77 |
+
}
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$nProgress = 1;
|
81 |
+
}
|
82 |
+
return $nProgress;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @return bool
|
87 |
+
*/
|
88 |
+
public function hasRunningScans() {
|
89 |
+
/** @var HackGuard\Options $oOpts */
|
90 |
+
$oOpts = $this->getMod()->getOptions();
|
91 |
+
return count( $this->getRunningScans() ) > 0 || count( $oOpts->getScansToBuild() ) > 0;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @param string|string[] $aScanSlugs
|
96 |
+
*/
|
97 |
+
public function startScans( $aScanSlugs ) {
|
98 |
+
if ( !is_array( $aScanSlugs ) ) {
|
99 |
+
$aScanSlugs = [ $aScanSlugs ];
|
100 |
+
}
|
101 |
+
if ( !empty( $aScanSlugs ) ) {
|
102 |
+
/** @var HackGuard\Options $oOpts */
|
103 |
+
$oOpts = $this->getMod()->getOptions();
|
104 |
+
foreach ( $aScanSlugs as $sSlug ) {
|
105 |
+
$oOpts->addRemoveScanToBuild( $sSlug );
|
106 |
+
}
|
107 |
+
$this->getQueueBuilder()->dispatch();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return Build\QueueBuilder
|
113 |
+
*/
|
114 |
+
public function getQueueBuilder() {
|
115 |
+
if ( empty( $this->oQueueBuilder ) ) {
|
116 |
+
$this->oQueueBuilder = ( new Build\QueueBuilder( 'shield_scanqbuild' ) )
|
117 |
+
->setMod( $this->getMod() )
|
118 |
+
->setQueueProcessor( $this->getQueueProcessor() );
|
119 |
+
}
|
120 |
+
return $this->oQueueBuilder;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @return QueueProcessor
|
125 |
+
*/
|
126 |
+
public function getQueueProcessor() {
|
127 |
+
if ( empty( $this->oQueueProcessor ) ) {
|
128 |
+
$this->oQueueProcessor = ( new QueueProcessor( 'shield_scanq' ) )
|
129 |
+
->setMod( $this->getMod() )
|
130 |
+
->setExpirationInterval( MINUTE_IN_SECONDS*10 );
|
131 |
+
}
|
132 |
+
return $this->oQueueProcessor;
|
133 |
+
}
|
134 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/ConvertBetweenTypes.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\ScanActionFromSlug;
|
7 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class ConvertBetweenTypes
|
11 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
12 |
+
*/
|
13 |
+
class ConvertBetweenTypes {
|
14 |
+
|
15 |
+
use Databases\Base\HandlerConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param Databases\ScanQueue\EntryVO $oEntry
|
19 |
+
* @return Scans\Base\BaseScanActionVO|mixed
|
20 |
+
*/
|
21 |
+
public function fromDbEntryToAction( $oEntry ) {
|
22 |
+
$oScanAction = ( new ScanActionFromSlug() )->getAction( $oEntry->scan );
|
23 |
+
$oScanAction->applyFromArray( $oEntry->meta );
|
24 |
+
$oScanAction->items = $oEntry->items;
|
25 |
+
$oScanAction->results = $oEntry->results;
|
26 |
+
return $oScanAction;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param Scans\Base\BaseScanActionVO $oAction
|
31 |
+
* @return Databases\ScanQueue\EntryVO
|
32 |
+
*/
|
33 |
+
public function fromActionToDbEntry( $oAction ) {
|
34 |
+
$oEntry = new Databases\ScanQueue\EntryVO();
|
35 |
+
foreach ( $this->getDbHandler()->getColumnsDefinition() as $sField ) {
|
36 |
+
if ( isset( $oAction->{$sField} ) ) {
|
37 |
+
$oEntry->{$sField} = $oAction->{$sField};
|
38 |
+
}
|
39 |
+
}
|
40 |
+
unset( $oAction->items );
|
41 |
+
unset( $oAction->results );
|
42 |
+
$oEntry->meta = $oAction->getRawDataAsArray();
|
43 |
+
return $oEntry;
|
44 |
+
}
|
45 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/IsScanEnqueued.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class IsScanInQueue
|
9 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
10 |
+
*/
|
11 |
+
class IsScanEnqueued {
|
12 |
+
|
13 |
+
use Databases\Base\HandlerConsumer;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @param string $sScanSlug
|
17 |
+
* @return bool
|
18 |
+
*/
|
19 |
+
public function check( $sScanSlug ) {
|
20 |
+
/** @var Databases\ScanQueue\Select $oSel */
|
21 |
+
$oSel = $this->getDbHandler()->getQuerySelector();
|
22 |
+
return $oSel->countForScan( $sScanSlug ) > 0;
|
23 |
+
}
|
24 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/QueueProcessor.php
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
7 |
+
use FernleafSystems\Wordpress\Services\Services;
|
8 |
+
use FernleafSystems\Wordpress\Services\Utilities;
|
9 |
+
|
10 |
+
class QueueProcessor extends Utilities\BackgroundProcessing\BackgroundProcess {
|
11 |
+
|
12 |
+
use Shield\Modules\ModConsumer;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Get batch
|
16 |
+
*
|
17 |
+
* @return \stdClass Return the first batch from the queue
|
18 |
+
*/
|
19 |
+
protected function get_batch() {
|
20 |
+
/** @var ScanQueue\Select $oSel */
|
21 |
+
$oSel = $this->getDbHandler()->getQuerySelector();
|
22 |
+
|
23 |
+
$oEntry = $oSel->filterByNotStarted()
|
24 |
+
->filterByNotFinished()
|
25 |
+
->setOrderBy( 'created_at', 'ASC' )
|
26 |
+
->first();
|
27 |
+
|
28 |
+
$oBatch = new \stdClass();
|
29 |
+
$oBatch->key = $oEntry->id;
|
30 |
+
$oBatch->data = [ $oEntry ];
|
31 |
+
return $oBatch;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Task
|
36 |
+
*
|
37 |
+
* Override this method to perform any actions required on each
|
38 |
+
* queue item. Return the modified item for further processing
|
39 |
+
* in the next pass through. Or, return false to remove the
|
40 |
+
* item from the queue.
|
41 |
+
*
|
42 |
+
* @param ScanQueue\EntryVO $oEntry Queue item to iterate over.
|
43 |
+
*
|
44 |
+
* @return mixed
|
45 |
+
*/
|
46 |
+
protected function task( $oEntry ) {
|
47 |
+
$oEntry->started_at = Services::Request()->ts();
|
48 |
+
/** @var ScanQueue\Update $oUpd */
|
49 |
+
$oUpd = $this->getDbHandler()->getQueryUpdater();
|
50 |
+
$oUpd->setStarted( $oEntry );
|
51 |
+
|
52 |
+
try {
|
53 |
+
( new ScanExecute() )
|
54 |
+
->setMod( $this->getMod() )
|
55 |
+
->execute( $oEntry );
|
56 |
+
}
|
57 |
+
catch ( \Exception $oE ) {
|
58 |
+
// error_log( $oE->getMessage() );
|
59 |
+
}
|
60 |
+
|
61 |
+
$oUpd->setFinished( $oEntry );
|
62 |
+
return $oEntry;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Complete.
|
67 |
+
*
|
68 |
+
* Override if applicable, but ensure that the below actions are
|
69 |
+
* performed, or, call parent::complete().
|
70 |
+
*/
|
71 |
+
protected function complete() {
|
72 |
+
parent::complete();
|
73 |
+
|
74 |
+
( new CompleteQueue() )
|
75 |
+
->setDbHandler( $this->getDbHandler() )
|
76 |
+
->setMod( $this->getMod() )
|
77 |
+
->complete();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Delete queue
|
82 |
+
*
|
83 |
+
* @param string $key Key.
|
84 |
+
* @return $this
|
85 |
+
*/
|
86 |
+
public function delete( $key ) {
|
87 |
+
/** @var ScanQueue\Delete $oDel */
|
88 |
+
$oDel = $this->getDbHandler()->getQueryDeleter();
|
89 |
+
$oDel->deleteById( $key );
|
90 |
+
return $this;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Is queue empty
|
95 |
+
*
|
96 |
+
* @return bool
|
97 |
+
*/
|
98 |
+
protected function is_queue_empty() {
|
99 |
+
/** @var ScanQueue\Select $oSel */
|
100 |
+
$oSel = $this->getDbHandler()->getQuerySelector();
|
101 |
+
$nUnfinished = $oSel->filterByNotStarted()
|
102 |
+
->filterByNotFinished()
|
103 |
+
->count();
|
104 |
+
return $nUnfinished === 0;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Save queue
|
109 |
+
*
|
110 |
+
* @return $this
|
111 |
+
*/
|
112 |
+
public function save() {
|
113 |
+
|
114 |
+
if ( !empty( $this->data ) ) {
|
115 |
+
/** @var ScanQueue\Insert $oInsert */
|
116 |
+
$oInsert = $this->getDbHandler()->getQueryInserter();
|
117 |
+
foreach ( $this->data as $oEntry ) {
|
118 |
+
if ( $oEntry instanceof ScanQueue\EntryVO ) {
|
119 |
+
$oInsert->insert( $oEntry );
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
return $this;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Update queue
|
129 |
+
*
|
130 |
+
* @param string $key Key.
|
131 |
+
* @param ScanQueue\EntryVO[] $data Data.
|
132 |
+
* @return $this
|
133 |
+
*/
|
134 |
+
public function update( $key, $data ) {
|
135 |
+
/** @var ScanQueue\Update $oUpd */
|
136 |
+
$oUpd = $this->getDbHandler()->getQueryUpdater();
|
137 |
+
$oToUpdate = array_shift( $data );
|
138 |
+
$oUpd->updateEntry( $oToUpdate );
|
139 |
+
return $this;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
*/
|
144 |
+
public function handleExpiredItems() {
|
145 |
+
$nBoundary = Services::Request()
|
146 |
+
->carbon()
|
147 |
+
->subSeconds( $this->getExpirationInterval() )->timestamp;
|
148 |
+
$this->getDbHandler()->deleteRowsOlderThan( $nBoundary );
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @return ScanQueue\Handler
|
153 |
+
*/
|
154 |
+
public function getDbHandler() {
|
155 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
156 |
+
$oMod = $this->getMod();
|
157 |
+
return $oMod->getDbHandler_ScanQueue();
|
158 |
+
}
|
159 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/QueueProcessorConsumer.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Trait QueueProcessorConsumer
|
7 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
8 |
+
*/
|
9 |
+
trait QueueProcessorConsumer {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @var QueueProcessor
|
13 |
+
*/
|
14 |
+
private $oQueueProcessor;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @return QueueProcessor
|
18 |
+
*/
|
19 |
+
public function getQueueProcessor() {
|
20 |
+
return $this->oQueueProcessor;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param QueueProcessor $oQP
|
25 |
+
* @return $this
|
26 |
+
*/
|
27 |
+
public function setQueueProcessor( QueueProcessor $oQP ) {
|
28 |
+
$this->oQueueProcessor = $oQP;
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/ScanEnqueue.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Base\HandlerConsumer;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ScanEnqueue
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
11 |
+
*/
|
12 |
+
class ScanEnqueue {
|
13 |
+
|
14 |
+
use HandlerConsumer,
|
15 |
+
QueueProcessorConsumer,
|
16 |
+
Scans\Common\ScanActionConsumer;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @throws \Exception
|
20 |
+
*/
|
21 |
+
public function enqueue() {
|
22 |
+
$oAction = $this->getScanActionVO();
|
23 |
+
$aAllItems = (array)$oAction->items;
|
24 |
+
unset( $oAction->items );
|
25 |
+
|
26 |
+
$nSliceSize = $oAction::ITEM_STORAGE_LIMIT;
|
27 |
+
|
28 |
+
do {
|
29 |
+
$oCurrent = clone $oAction;
|
30 |
+
$oCurrent->items = array_slice( $aAllItems, 0, $nSliceSize );
|
31 |
+
$this->pushActionToQueue( $oCurrent );
|
32 |
+
$aAllItems = array_slice( $aAllItems, $nSliceSize );
|
33 |
+
} while ( !empty( $aAllItems ) );
|
34 |
+
|
35 |
+
$this->getQueueProcessor()->save();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @param Scans\Base\BaseScanActionVO $oAction
|
40 |
+
*/
|
41 |
+
protected function pushActionToQueue( $oAction ) {
|
42 |
+
$oEntry = ( new ConvertBetweenTypes() )
|
43 |
+
->setDbHandler( $this->getDbHandler() )
|
44 |
+
->fromActionToDbEntry( $oAction );
|
45 |
+
$this->getQueueProcessor()->push_to_queue( $oEntry );
|
46 |
+
}
|
47 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/ScanExecute.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases\ScanQueue;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ScanExecute
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
11 |
+
*/
|
12 |
+
class ScanExecute {
|
13 |
+
|
14 |
+
use Shield\Modules\ModConsumer;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param ScanQueue\EntryVO $oEntry
|
18 |
+
* @return ScanQueue\EntryVO
|
19 |
+
* @throws \Exception
|
20 |
+
*/
|
21 |
+
public function execute( $oEntry ) {
|
22 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
23 |
+
$oMod = $this->getMod();
|
24 |
+
$oDbH = $oMod->getDbHandler_ScanQueue();
|
25 |
+
$oTypeConverter = ( new ConvertBetweenTypes() )->setDbHandler( $oDbH );
|
26 |
+
|
27 |
+
$oAction = $oTypeConverter->fromDbEntryToAction( $oEntry );
|
28 |
+
|
29 |
+
$this->getScanner( $oAction )
|
30 |
+
->setScanActionVO( $oAction )
|
31 |
+
->setMod( $oMod )
|
32 |
+
->run();
|
33 |
+
|
34 |
+
$oEntry->results = $oAction->results;
|
35 |
+
|
36 |
+
return $oEntry;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @param Shield\Scans\Base\BaseScanActionVO $oAction
|
41 |
+
* @return Shield\Scans\Base\BaseScan
|
42 |
+
*/
|
43 |
+
private function getScanner( $oAction ) {
|
44 |
+
$sClass = $oAction->getScanNamespace().'Scan';
|
45 |
+
/** @var Shield\Scans\Base\BaseScan $o */
|
46 |
+
$o = new $sClass();
|
47 |
+
return $o->setMod( $this->getMod() )
|
48 |
+
->setScanActionVO( $oAction );
|
49 |
+
}
|
50 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Queue/ScanInitiate.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ScanInitiate
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
11 |
+
*/
|
12 |
+
class ScanInitiate {
|
13 |
+
|
14 |
+
use ModConsumer,
|
15 |
+
QueueProcessorConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Build and Enqueue.
|
19 |
+
* @param string $sSlug
|
20 |
+
* @throws \Exception
|
21 |
+
*/
|
22 |
+
public function init( $sSlug ) {
|
23 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
24 |
+
$oMod = $this->getMod();
|
25 |
+
$oDbH = $oMod->getDbHandler_ScanQueue();
|
26 |
+
|
27 |
+
if ( ( new IsScanEnqueued() )->setDbHandler( $oMod->getDbHandler_ScanQueue() )->check( $sSlug ) ) {
|
28 |
+
throw new \Exception( 'Scan is already running' );
|
29 |
+
}
|
30 |
+
|
31 |
+
$oAction = ( new BuildScanAction() )
|
32 |
+
->setMod( $oMod )
|
33 |
+
->build( $sSlug );
|
34 |
+
|
35 |
+
$oQ = $this->getQueueProcessor();
|
36 |
+
( new ScanEnqueue() )
|
37 |
+
->setDbHandler( $oDbH )
|
38 |
+
->setQueueProcessor( $oQ )
|
39 |
+
->setScanActionVO( $oAction )
|
40 |
+
->enqueue();
|
41 |
+
}
|
42 |
+
}
|
src/lib/src/{Scans/Base/ScanResults → Modules/HackGuard/Scan/Results}/Clean.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
|
@@ -22,7 +22,7 @@ class Clean {
|
|
22 |
* @return $this
|
23 |
*/
|
24 |
public function deleteAllForScan() {
|
25 |
-
$sScan = $this->getScanActionVO()->
|
26 |
if ( !empty( $sScan ) ) {
|
27 |
/** @var Shield\Databases\Scanner\Delete $oDel */
|
28 |
$oDel = $this->getDbHandler()->getQueryDeleter();
|
1 |
<?php
|
2 |
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
|
22 |
* @return $this
|
23 |
*/
|
24 |
public function deleteAllForScan() {
|
25 |
+
$sScan = $this->getScanActionVO()->scan;
|
26 |
if ( !empty( $sScan ) ) {
|
27 |
/** @var Shield\Databases\Scanner\Delete $oDel */
|
28 |
$oDel = $this->getDbHandler()->getQueryDeleter();
|
src/lib/src/Modules/HackGuard/Scan/Results/ConvertBetweenTypes.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ConvertBetweenTypes
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results
|
11 |
+
*/
|
12 |
+
class ConvertBetweenTypes {
|
13 |
+
|
14 |
+
use Scans\Common\ScanActionConsumer;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param Scans\Base\BaseResultsSet $oResultsSet
|
18 |
+
* @return Databases\Scanner\EntryVO[]|mixed
|
19 |
+
*/
|
20 |
+
public function fromResultsToVOs( $oResultsSet ) {
|
21 |
+
$aVos = [];
|
22 |
+
foreach ( $oResultsSet->getAllItems() as $oIt ) {
|
23 |
+
/** @var Scans\Base\BaseResultItem $oIt */
|
24 |
+
$aVos[ $oIt->generateHash() ] = $this->convertResultItemToVO( $oIt );
|
25 |
+
}
|
26 |
+
return $aVos;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param Databases\Scanner\EntryVO[] $aVOs
|
31 |
+
* @return Scans\Base\BaseResultsSet|mixed
|
32 |
+
*/
|
33 |
+
public function fromVOsToResultsSet( $aVOs ) {
|
34 |
+
$oRes = $this->getScanActionVO()->getNewResultsSet();
|
35 |
+
foreach ( $aVOs as $oVo ) {
|
36 |
+
$oRes->addItem( $this->convertVoToResultItem( $oVo ) );
|
37 |
+
}
|
38 |
+
return $oRes;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @param Databases\Scanner\EntryVO $oVo
|
43 |
+
* @return Scans\Base\BaseResultItem
|
44 |
+
*/
|
45 |
+
public function convertVoToResultItem( $oVo ) {
|
46 |
+
$oAction = $this->getScanActionVO();
|
47 |
+
$oItem = $oAction->getNewResultItem()->applyFromArray( $oVo->meta );
|
48 |
+
return $oItem;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param Scans\Base\BaseResultItem $oIt
|
53 |
+
* @return Databases\Scanner\EntryVO
|
54 |
+
*/
|
55 |
+
private function convertResultItemToVO( $oIt ) {
|
56 |
+
$oVo = new Databases\Scanner\EntryVO();
|
57 |
+
$oVo->hash = $oIt->hash;
|
58 |
+
$oVo->meta = $oIt->getData();
|
59 |
+
$oVo->scan = $this->getScanActionVO()->scan;
|
60 |
+
return $oVo;
|
61 |
+
}
|
62 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Results/ResultsDelete.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ResultsDelete
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results
|
11 |
+
*/
|
12 |
+
class ResultsDelete {
|
13 |
+
|
14 |
+
use Databases\Base\HandlerConsumer;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param Scans\Base\BaseResultsSet $oToDelete
|
18 |
+
*/
|
19 |
+
public function delete( $oToDelete ) {
|
20 |
+
( new Clean() )
|
21 |
+
->setDbHandler( $this->getDbHandler() )
|
22 |
+
->deleteResults( $oToDelete );
|
23 |
+
}
|
24 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Results/ResultsRetrieve.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ResultsRetrieve
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results
|
11 |
+
*/
|
12 |
+
class ResultsRetrieve {
|
13 |
+
|
14 |
+
use Databases\Base\HandlerConsumer,
|
15 |
+
Scans\Common\ScanActionConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @return Scans\Base\BaseResultsSet|mixed
|
19 |
+
*/
|
20 |
+
public function retrieve() {
|
21 |
+
/** @var Databases\Scanner\Select $oSelector */
|
22 |
+
$oSelector = $this->getDbHandler()->getQuerySelector();
|
23 |
+
$oScan = $this->getScanActionVO();
|
24 |
+
return ( new ConvertBetweenTypes() )
|
25 |
+
->setScanActionVO( $oScan )
|
26 |
+
->fromVOsToResultsSet( $oSelector->forScan( $oScan->scan ) );
|
27 |
+
}
|
28 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Results/ResultsStore.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ResultsStore
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results
|
11 |
+
*/
|
12 |
+
class ResultsStore {
|
13 |
+
|
14 |
+
use Databases\Base\HandlerConsumer,
|
15 |
+
Scans\Common\ScanActionConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param Scans\Base\BaseResultsSet $oToStore
|
19 |
+
*/
|
20 |
+
public function store( $oToStore ) {
|
21 |
+
/** @var Databases\Scanner\Insert $oInsert */
|
22 |
+
$oInsert = $this->getDbHandler()->getQueryInserter();
|
23 |
+
$aVOs = ( new ConvertBetweenTypes() )
|
24 |
+
->setScanActionVO( $this->getScanActionVO() )
|
25 |
+
->fromResultsToVOs( $oToStore );
|
26 |
+
foreach ( $aVOs as $oVo ) {
|
27 |
+
$oInsert->insert( $oVo );
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ResultsUpdate
|
10 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results
|
11 |
+
*/
|
12 |
+
class ResultsUpdate {
|
13 |
+
|
14 |
+
use Databases\Base\HandlerConsumer,
|
15 |
+
Scans\Common\ScanActionConsumer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param Scans\Base\BaseResultsSet $oNewResults
|
19 |
+
*/
|
20 |
+
public function update( $oNewResults ) {
|
21 |
+
$oAction = $this->getScanActionVO();
|
22 |
+
$oNewCopy = clone $oNewResults; // so we don't modify these for later use.
|
23 |
+
|
24 |
+
$oDbH = $this->getDbHandler();
|
25 |
+
|
26 |
+
$oExisting = ( new ResultsRetrieve() )
|
27 |
+
->setDbHandler( $oDbH )
|
28 |
+
->setScanActionVO( $oAction )
|
29 |
+
->retrieve();
|
30 |
+
|
31 |
+
$oItemsToDelete = ( new Scans\Base\DiffResultForStorage() )->diff( $oExisting, $oNewCopy );
|
32 |
+
( new ResultsDelete() )
|
33 |
+
->setDbHandler( $oDbH )
|
34 |
+
->delete( $oItemsToDelete );
|
35 |
+
|
36 |
+
( new ResultsStore() )
|
37 |
+
->setDbHandler( $oDbH )
|
38 |
+
->setScanActionVO( $oAction )
|
39 |
+
->store( $oNewCopy );
|
40 |
+
|
41 |
+
$oUp = $oDbH->getQueryUpdater();
|
42 |
+
/** @var Databases\Scanner\EntryVO $oVo */
|
43 |
+
$oConverter = ( new ConvertBetweenTypes() )->setScanActionVO( $oAction );
|
44 |
+
foreach ( $oConverter->fromResultsToVOs( $oExisting ) as $oVo ) {
|
45 |
+
$oUp->reset()
|
46 |
+
->setUpdateData( $oVo->getRawDataAsArray() )
|
47 |
+
->setUpdateWheres(
|
48 |
+
[
|
49 |
+
'scan' => $oAction->scan,
|
50 |
+
'hash' => $oVo->hash,
|
51 |
+
]
|
52 |
+
)
|
53 |
+
->query();
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
src/lib/src/Modules/HackGuard/Scan/ScanActionFromSlug.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ScanActionFromSlug
|
9 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Queue
|
10 |
+
*/
|
11 |
+
class ScanActionFromSlug {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @param string $sScanSlug
|
15 |
+
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
16 |
+
*/
|
17 |
+
public function getAction( $sScanSlug ) {
|
18 |
+
$oVO = null;
|
19 |
+
switch ( $sScanSlug ) {
|
20 |
+
case 'apc':
|
21 |
+
$oVO = new Shield\Scans\Apc\ScanActionVO();
|
22 |
+
break;
|
23 |
+
case 'mal':
|
24 |
+
$oVO = new Shield\Scans\Mal\ScanActionVO();
|
25 |
+
break;
|
26 |
+
case 'ptg':
|
27 |
+
$oVO = new Shield\Scans\Ptg\ScanActionVO();
|
28 |
+
break;
|
29 |
+
case 'ufc':
|
30 |
+
$oVO = new Shield\Scans\Ufc\ScanActionVO();
|
31 |
+
break;
|
32 |
+
case 'wcf':
|
33 |
+
$oVO = new Shield\Scans\Wcf\ScanActionVO();
|
34 |
+
break;
|
35 |
+
case 'wpv':
|
36 |
+
$oVO = new Shield\Scans\Wpv\ScanActionVO();
|
37 |
+
break;
|
38 |
+
}
|
39 |
+
$oVO->scan = $sScanSlug;
|
40 |
+
return $oVO;
|
41 |
+
}
|
42 |
+
}
|
src/lib/src/Modules/HackGuard/Strings.php
CHANGED
@@ -178,7 +178,8 @@ class Strings extends Base\Strings {
|
|
178 |
*/
|
179 |
public function getOptionStrings( $sOptKey ) {
|
180 |
|
181 |
-
$
|
|
|
182 |
|
183 |
switch ( $sOptKey ) {
|
184 |
|
@@ -262,7 +263,7 @@ class Strings extends Base\Strings {
|
|
262 |
case 'ufc_exclusions' :
|
263 |
$sName = __( 'File Exclusions', 'wp-simple-firewall' );
|
264 |
$sSummary = __( 'Provide A List Of Files To Be Excluded From The Scan', 'wp-simple-firewall' );
|
265 |
-
$sDefaults = implode( ', ', $
|
266 |
$sDescription = __( 'Take a new line for each file you wish to exclude from the scan.', 'wp-simple-firewall' )
|
267 |
.'<br/><strong>'.__( 'No commas are necessary.', 'wp-simple-firewall' ).'</strong>'
|
268 |
.'<br/>'.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $sDefaults );
|
178 |
*/
|
179 |
public function getOptionStrings( $sOptKey ) {
|
180 |
|
181 |
+
$oMod = $this->getMod();
|
182 |
+
$sModName = $oMod->getMainFeatureName();
|
183 |
|
184 |
switch ( $sOptKey ) {
|
185 |
|
263 |
case 'ufc_exclusions' :
|
264 |
$sName = __( 'File Exclusions', 'wp-simple-firewall' );
|
265 |
$sSummary = __( 'Provide A List Of Files To Be Excluded From The Scan', 'wp-simple-firewall' );
|
266 |
+
$sDefaults = implode( ', ', $oMod->getOptions()->getOptDefault( 'ufc_exclusions' ) );
|
267 |
$sDescription = __( 'Take a new line for each file you wish to exclude from the scan.', 'wp-simple-firewall' )
|
268 |
.'<br/><strong>'.__( 'No commas are necessary.', 'wp-simple-firewall' ).'</strong>'
|
269 |
.'<br/>'.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $sDefaults );
|
src/lib/src/Modules/IPs/AjaxHandler.php
CHANGED
@@ -141,15 +141,14 @@ class AjaxHandler extends Shield\Modules\Base\AjaxHandlerShield {
|
|
141 |
private function ajaxExec_BuildTableIps() {
|
142 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
143 |
$oMod = $this->getMod();
|
144 |
-
/** @var \ICWP_WPSF_Processor_Ips $oPro */
|
145 |
-
$oPro = $oMod->getProcessor();
|
146 |
|
147 |
-
|
148 |
-
$
|
|
|
149 |
|
150 |
$oTableBuilder = ( new Shield\Tables\Build\Ip() )
|
151 |
->setMod( $oMod )
|
152 |
-
->setDbHandler( $
|
153 |
|
154 |
return [
|
155 |
'success' => true,
|
141 |
private function ajaxExec_BuildTableIps() {
|
142 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
143 |
$oMod = $this->getMod();
|
|
|
|
|
144 |
|
145 |
+
/** @var Shield\Databases\IPs\Handler $oDbH */
|
146 |
+
$oDbH = $oMod->getDbHandler();
|
147 |
+
$oDbH->autoCleanDb();
|
148 |
|
149 |
$oTableBuilder = ( new Shield\Tables\Build\Ip() )
|
150 |
->setMod( $oMod )
|
151 |
+
->setDbHandler( $oDbH );
|
152 |
|
153 |
return [
|
154 |
'success' => true,
|
src/lib/src/Modules/IPs/BotTrack/Base.php
CHANGED
@@ -7,8 +7,7 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
7 |
|
8 |
abstract class Base {
|
9 |
|
10 |
-
use Shield\
|
11 |
-
Shield\Modules\ModConsumer;
|
12 |
const OPT_KEY = '';
|
13 |
|
14 |
public function run() {
|
@@ -49,12 +48,4 @@ abstract class Base {
|
|
49 |
}
|
50 |
|
51 |
abstract protected function process();
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @return $this
|
55 |
-
* @deprecated 7.5
|
56 |
-
*/
|
57 |
-
protected function writeAudit() {
|
58 |
-
return $this;
|
59 |
-
}
|
60 |
}
|
7 |
|
8 |
abstract class Base {
|
9 |
|
10 |
+
use Shield\Modules\ModConsumer;
|
|
|
11 |
const OPT_KEY = '';
|
12 |
|
13 |
public function run() {
|
48 |
}
|
49 |
|
50 |
abstract protected function process();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
src/lib/src/Modules/IPs/Options.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
|
|
|
6 |
|
7 |
class Options extends Base\ShieldOptions {
|
8 |
|
@@ -13,6 +14,31 @@ class Options extends Base\ShieldOptions {
|
|
13 |
return constant( strtoupper( $this->getOpt( 'auto_expire' ).'_IN_SECONDS' ) );
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* @return string[]
|
18 |
*/
|
@@ -25,4 +51,94 @@ class Options extends Base\ShieldOptions {
|
|
25 |
public function getDbTable_IPs() {
|
26 |
return $this->getCon()->prefixOption( $this->getDef( 'ip_lists_table_name' ) );
|
27 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Base;
|
6 |
+
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
class Options extends Base\ShieldOptions {
|
9 |
|
14 |
return constant( strtoupper( $this->getOpt( 'auto_expire' ).'_IN_SECONDS' ) );
|
15 |
}
|
16 |
|
17 |
+
/**
|
18 |
+
* @return array
|
19 |
+
*/
|
20 |
+
public function getAutoUnblockIps() {
|
21 |
+
$aIps = $this->getOpt( 'autounblock_ips', [] );
|
22 |
+
return is_array( $aIps ) ? $aIps : [];
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param string $sIp
|
27 |
+
* @return bool
|
28 |
+
*/
|
29 |
+
public function getCanIpRequestAutoUnblock( $sIp ) {
|
30 |
+
$aExistingIps = $this->getAutoUnblockIps();
|
31 |
+
return !array_key_exists( $sIp, $aExistingIps )
|
32 |
+
|| ( Services::Request()->carbon()->subDay( 1 ) > $aExistingIps[ $sIp ] );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @return int
|
37 |
+
*/
|
38 |
+
public function getOffenseLimit() {
|
39 |
+
return (int)$this->getOpt( 'transgression_limit' );
|
40 |
+
}
|
41 |
+
|
42 |
/**
|
43 |
* @return string[]
|
44 |
*/
|
51 |
public function getDbTable_IPs() {
|
52 |
return $this->getCon()->prefixOption( $this->getDef( 'ip_lists_table_name' ) );
|
53 |
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @return bool
|
57 |
+
*/
|
58 |
+
public function isEnabledAutoBlackList() {
|
59 |
+
return $this->getOffenseLimit() > 0;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @return bool
|
64 |
+
*/
|
65 |
+
public function isEnabledAutoUserRecover() {
|
66 |
+
return !$this->isOpt( 'user_auto_recover', 'disabled' );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
public function isEnabledTrack404() {
|
73 |
+
return $this->isSelectOptionEnabled( 'track_404' );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return bool
|
78 |
+
*/
|
79 |
+
public function isEnabledTrackFakeWebCrawler() {
|
80 |
+
return $this->isSelectOptionEnabled( 'track_fakewebcrawler' );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @return bool
|
85 |
+
*/
|
86 |
+
public function isEnabledTrackLoginInvalid() {
|
87 |
+
return $this->isSelectOptionEnabled( 'track_logininvalid' );
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @return bool
|
92 |
+
*/
|
93 |
+
public function isEnabledTrackLoginFailed() {
|
94 |
+
return $this->isSelectOptionEnabled( 'track_loginfailed' );
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @return bool
|
99 |
+
*/
|
100 |
+
public function isEnabledTrackLinkCheese() {
|
101 |
+
return $this->isSelectOptionEnabled( 'track_linkcheese' );
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* @return bool
|
106 |
+
*/
|
107 |
+
public function isEnabledTrackXmlRpc() {
|
108 |
+
return $this->isSelectOptionEnabled( 'track_xmlrpc' );
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @param string $sOptionKey
|
113 |
+
* @return bool
|
114 |
+
* @deprecated 8.1
|
115 |
+
*/
|
116 |
+
public function isTrackOptTransgression( $sOptionKey ) {
|
117 |
+
return strpos( $this->getOpt( $sOptionKey ), 'transgression' ) !== false;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* @param string $sOptionKey
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
public function isTrackOptDoubleTransgression( $sOptionKey ) {
|
125 |
+
return $this->isOpt( $sOptionKey, 'transgression-double' );
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* @param string $sOptionKey
|
130 |
+
* @return bool
|
131 |
+
*/
|
132 |
+
public function isTrackOptImmediateBlock( $sOptionKey ) {
|
133 |
+
return $this->isOpt( $sOptionKey, 'block' );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* @param string $sOptionKey
|
138 |
+
* @return bool
|
139 |
+
*/
|
140 |
+
protected function isSelectOptionEnabled( $sOptionKey ) {
|
141 |
+
$bOptPrem = $this->isOptPremium( $sOptionKey );
|
142 |
+
return ( !$bOptPrem || $this->getCon()->isPremiumActive() ) && !$this->isOpt( $sOptionKey, 'disabled' );
|
143 |
+
}
|
144 |
}
|
src/lib/src/Modules/LoginGuard/Strings.php
CHANGED
@@ -262,7 +262,7 @@ class Strings extends Base\Strings {
|
|
262 |
$sSummary = __( 'Limit account access requests to every X seconds', 'wp-simple-firewall' );
|
263 |
$sDescription = __( 'WordPress will process only ONE account access attempt per number of seconds specified.', 'wp-simple-firewall' )
|
264 |
.'<br />'.__( 'Zero (0) turns this off.', 'wp-simple-firewall' )
|
265 |
-
.' '.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $oMod->
|
266 |
->getOptDefault( 'login_limit_interval' ) );
|
267 |
break;
|
268 |
|
262 |
$sSummary = __( 'Limit account access requests to every X seconds', 'wp-simple-firewall' );
|
263 |
$sDescription = __( 'WordPress will process only ONE account access attempt per number of seconds specified.', 'wp-simple-firewall' )
|
264 |
.'<br />'.__( 'Zero (0) turns this off.', 'wp-simple-firewall' )
|
265 |
+
.' '.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), $oMod->getOptions()
|
266 |
->getOptDefault( 'login_limit_interval' ) );
|
267 |
break;
|
268 |
|
src/lib/src/Modules/ModConsumer.php
CHANGED
@@ -30,6 +30,13 @@ trait ModConsumer {
|
|
30 |
return $this->oMod;
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* @param Controller $oCon
|
35 |
* @return $this
|
30 |
return $this->oMod;
|
31 |
}
|
32 |
|
33 |
+
/**
|
34 |
+
* @return Modules\Base\Options
|
35 |
+
*/
|
36 |
+
public function getOptions() {
|
37 |
+
return $this->getMod()->getOptions();
|
38 |
+
}
|
39 |
+
|
40 |
/**
|
41 |
* @param Controller $oCon
|
42 |
* @return $this
|
src/lib/src/Modules/Plugin/Components/BadgeWidget.php
CHANGED
@@ -7,7 +7,7 @@ class BadgeWidget extends \ICWP_WPSF_WpWidget {
|
|
7 |
use \FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
* @param \ICWP_WPSF_FeatureHandler_Base $oMod
|
12 |
*/
|
13 |
public function __construct( $oMod ) {
|
7 |
use \FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
8 |
|
9 |
/**
|
10 |
+
* BadgeWidget constructor.
|
11 |
* @param \ICWP_WPSF_FeatureHandler_Base $oMod
|
12 |
*/
|
13 |
public function __construct( $oMod ) {
|
src/lib/src/Modules/Plugin/Strings.php
CHANGED
@@ -268,10 +268,9 @@ class Strings extends Base\Strings {
|
|
268 |
*/
|
269 |
private function buildIpAddressMap() {
|
270 |
$oReq = Services::Request();
|
|
|
271 |
|
272 |
-
$aOptionData = $
|
273 |
-
->getOptionsVo()
|
274 |
-
->getRawData_SingleOption( 'visitor_address_source' );
|
275 |
$aValueOptions = $aOptionData[ 'value_options' ];
|
276 |
|
277 |
$aMap = [];
|
@@ -280,8 +279,7 @@ class Strings extends Base\Strings {
|
|
280 |
$sKey = $aOptionValue[ 'value_key' ];
|
281 |
if ( $sKey == 'AUTO_DETECT_IP' ) {
|
282 |
$sKey = 'Auto Detect';
|
283 |
-
$sIp = Services::IP()->getRequestIp().sprintf( ' (%s)', $
|
284 |
-
->getOpt( 'last_ip_detect_source' ) );
|
285 |
}
|
286 |
else {
|
287 |
$sIp = $oReq->server( $sKey );
|
268 |
*/
|
269 |
private function buildIpAddressMap() {
|
270 |
$oReq = Services::Request();
|
271 |
+
$oOpts = $this->getOptions();
|
272 |
|
273 |
+
$aOptionData = $oOpts->getRawData_SingleOption( 'visitor_address_source' );
|
|
|
|
|
274 |
$aValueOptions = $aOptionData[ 'value_options' ];
|
275 |
|
276 |
$aMap = [];
|
279 |
$sKey = $aOptionValue[ 'value_key' ];
|
280 |
if ( $sKey == 'AUTO_DETECT_IP' ) {
|
281 |
$sKey = 'Auto Detect';
|
282 |
+
$sIp = Services::IP()->getRequestIp().sprintf( ' (%s)', $oOpts->getOpt( 'last_ip_detect_source' ) );
|
|
|
283 |
}
|
284 |
else {
|
285 |
$sIp = $oReq->server( $sKey );
|
src/lib/src/Modules/SecurityAdmin/Options.php
CHANGED
@@ -7,6 +7,13 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
7 |
|
8 |
class Options extends Base\ShieldOptions {
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* @return string
|
12 |
*/
|
@@ -46,9 +53,9 @@ class Options extends Base\ShieldOptions {
|
|
46 |
* @param string $sArea one of plugins, themes
|
47 |
* @return array
|
48 |
*/
|
49 |
-
|
50 |
-
$
|
51 |
-
return
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -87,4 +94,25 @@ class Options extends Base\ShieldOptions {
|
|
87 |
$sKey = $this->getAccessKeyHash();
|
88 |
return !empty( $sKey ) && strlen( $sKey ) == 32;
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
7 |
|
8 |
class Options extends Base\ShieldOptions {
|
9 |
|
10 |
+
/**
|
11 |
+
* @return $this
|
12 |
+
*/
|
13 |
+
public function clearSecurityAdminKey() {
|
14 |
+
return $this->setOpt( 'admin_access_key', '' );
|
15 |
+
}
|
16 |
+
|
17 |
/**
|
18 |
* @return string
|
19 |
*/
|
53 |
* @param string $sArea one of plugins, themes
|
54 |
* @return array
|
55 |
*/
|
56 |
+
private function getAdminAccessArea( $sArea = 'plugins' ) {
|
57 |
+
$aD = $this->getOpt( 'admin_access_restrict_'.$sArea, [] );
|
58 |
+
return is_array( $aD ) ? $aD : [];
|
59 |
}
|
60 |
|
61 |
/**
|
94 |
$sKey = $this->getAccessKeyHash();
|
95 |
return !empty( $sKey ) && strlen( $sKey ) == 32;
|
96 |
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @return bool
|
100 |
+
*/
|
101 |
+
public function isEnabledWhitelabel() {
|
102 |
+
return $this->isOpt( 'whitelabel_enable', 'Y' ) && $this->isPremium();
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @return bool
|
107 |
+
*/
|
108 |
+
public function isSecAdminRestrictUsersEnabled() {
|
109 |
+
return $this->isOpt( 'admin_access_restrict_admin_users', 'Y' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @return bool
|
114 |
+
*/
|
115 |
+
public function isWlHideUpdates() {
|
116 |
+
return $this->isEnabledWhitelabel() && $this->isOpt( 'wl_hide_updates', 'Y' );
|
117 |
+
}
|
118 |
}
|
src/lib/src/Modules/SecurityAdmin/Strings.php
CHANGED
@@ -92,10 +92,8 @@ class Strings extends Base\Strings {
|
|
92 |
* @throws \Exception
|
93 |
*/
|
94 |
public function getOptionStrings( $sOptKey ) {
|
95 |
-
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
96 |
-
$oMod = $this->getMod();
|
97 |
/** @var Options $oOpts */
|
98 |
-
$oOpts = $
|
99 |
$sPlugName = $this->getCon()->getHumanName();
|
100 |
|
101 |
switch ( $sOptKey ) {
|
@@ -130,8 +128,7 @@ class Strings extends Base\Strings {
|
|
130 |
.sprintf(
|
131 |
'%s: %s',
|
132 |
__( 'Default', 'wp-simple-firewall' ),
|
133 |
-
sprintf( '%s minutes', $
|
134 |
-
->getOptDefault( 'admin_access_timeout' ) )
|
135 |
);
|
136 |
break;
|
137 |
|
92 |
* @throws \Exception
|
93 |
*/
|
94 |
public function getOptionStrings( $sOptKey ) {
|
|
|
|
|
95 |
/** @var Options $oOpts */
|
96 |
+
$oOpts = $this->getOptions();
|
97 |
$sPlugName = $this->getCon()->getHumanName();
|
98 |
|
99 |
switch ( $sOptKey ) {
|
128 |
.sprintf(
|
129 |
'%s: %s',
|
130 |
__( 'Default', 'wp-simple-firewall' ),
|
131 |
+
sprintf( '%s minutes', $oOpts->getOptDefault( 'admin_access_timeout' ) )
|
|
|
132 |
);
|
133 |
break;
|
134 |
|
src/lib/src/Modules/Traffic/Options.php
CHANGED
@@ -14,10 +14,17 @@ class Options extends Base\ShieldOptions {
|
|
14 |
}
|
15 |
|
16 |
/**
|
17 |
-
* @return
|
18 |
*/
|
19 |
-
public function
|
20 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -28,23 +35,23 @@ class Options extends Base\ShieldOptions {
|
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
-
* @return
|
32 |
*/
|
33 |
-
public function
|
34 |
-
return (
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
-
* @return
|
39 |
*/
|
40 |
-
public function
|
41 |
-
return $this->
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
* @return
|
46 |
*/
|
47 |
-
public function
|
48 |
-
return $this->
|
49 |
}
|
50 |
}
|
14 |
}
|
15 |
|
16 |
/**
|
17 |
+
* @return string[]
|
18 |
*/
|
19 |
+
public function getDbColumns_TrafficLog() {
|
20 |
+
return $this->getDef( 'traffic_table_columns' );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
public function getDbTable_TrafficLog() {
|
27 |
+
return $this->getCon()->prefixOption( $this->getDef( 'traffic_table_name' ) );
|
28 |
}
|
29 |
|
30 |
/**
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* @return int
|
39 |
*/
|
40 |
+
public function getLimitTimeSpan() {
|
41 |
+
return (int)$this->getOpt( 'limit_time_span' );
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
+
* @return int
|
46 |
*/
|
47 |
+
public function getMaxEntries() {
|
48 |
+
return (int)$this->getOpt( 'max_entries' );
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
+
* @return bool
|
53 |
*/
|
54 |
+
public function isTrafficLimitEnabled() {
|
55 |
+
return ( $this->getLimitTimeSpan() > 0 ) && ( $this->getLimitRequestCount() > 0 );
|
56 |
}
|
57 |
}
|
src/lib/src/Modules/UserManagement/Strings.php
CHANGED
@@ -104,7 +104,7 @@ class Strings extends Base\Strings {
|
|
104 |
* @throws \Exception
|
105 |
*/
|
106 |
public function getOptionStrings( $sOptKey ) {
|
107 |
-
$
|
108 |
$sModName = $this->getMod()->getMainFeatureName();
|
109 |
|
110 |
switch ( $sOptKey ) {
|
@@ -112,124 +112,125 @@ class Strings extends Base\Strings {
|
|
112 |
case 'enable_user_management' :
|
113 |
$sName = sprintf( __( 'Enable %s Module', 'wp-simple-firewall' ), $sModName );
|
114 |
$sSummary = sprintf( __( 'Enable (or Disable) The %s Module', 'wp-simple-firewall' ), $sModName );
|
115 |
-
$
|
116 |
break;
|
117 |
|
118 |
case 'enable_admin_login_email_notification' :
|
119 |
$sName = __( 'Admin Login Notification Email', 'wp-simple-firewall' );
|
120 |
$sSummary = __( 'Send An Notification Email When Administrator Logs In', 'wp-simple-firewall' );
|
121 |
-
$
|
122 |
-
|
|
|
123 |
break;
|
124 |
|
125 |
case 'enable_user_login_email_notification' :
|
126 |
$sName = __( 'User Login Notification Email', 'wp-simple-firewall' );
|
127 |
$sSummary = __( 'Send Email Notification To Each User Upon Successful Login', 'wp-simple-firewall' );
|
128 |
-
$
|
129 |
break;
|
130 |
|
131 |
case 'session_timeout_interval' :
|
132 |
$sName = __( 'Session Timeout', 'wp-simple-firewall' );
|
133 |
$sSummary = __( 'Specify How Many Days After Login To Automatically Force Re-Login', 'wp-simple-firewall' );
|
134 |
-
$
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
break;
|
139 |
|
140 |
case 'session_idle_timeout_interval' :
|
141 |
$sName = __( 'Idle Timeout', 'wp-simple-firewall' );
|
142 |
$sSummary = __( 'Specify How Many Hours After Inactivity To Automatically Logout User', 'wp-simple-firewall' );
|
143 |
-
$
|
144 |
-
|
145 |
break;
|
146 |
|
147 |
case 'session_lock_location' :
|
148 |
$sName = __( 'Lock To Location', 'wp-simple-firewall' );
|
149 |
$sSummary = __( 'Locks A User Session To IP address', 'wp-simple-firewall' );
|
150 |
-
$
|
151 |
-
|
152 |
break;
|
153 |
|
154 |
case 'session_username_concurrent_limit' :
|
155 |
$sName = __( 'Max Simultaneous Sessions', 'wp-simple-firewall' );
|
156 |
$sSummary = __( 'Limit Simultaneous Sessions For The Same Username', 'wp-simple-firewall' );
|
157 |
-
$
|
158 |
-
|
159 |
break;
|
160 |
|
161 |
case 'enable_password_policies' :
|
162 |
$sName = __( 'Enable Password Policies', 'wp-simple-firewall' );
|
163 |
$sSummary = __( 'Enable The Password Policies Detailed Below', 'wp-simple-firewall' );
|
164 |
-
$
|
165 |
break;
|
166 |
|
167 |
case 'pass_prevent_pwned' :
|
168 |
$sName = __( 'Prevent Pwned Passwords', 'wp-simple-firewall' );
|
169 |
$sSummary = __( 'Prevent Use Of "Pwned" Passwords', 'wp-simple-firewall' );
|
170 |
-
$
|
171 |
break;
|
172 |
|
173 |
case 'pass_min_length' :
|
174 |
$sName = __( 'Minimum Length', 'wp-simple-firewall' );
|
175 |
$sSummary = __( 'Minimum Password Length', 'wp-simple-firewall' );
|
176 |
-
$
|
177 |
-
|
178 |
break;
|
179 |
|
180 |
case 'pass_min_strength' :
|
181 |
$sName = __( 'Minimum Strength', 'wp-simple-firewall' );
|
182 |
$sSummary = __( 'Minimum Password Strength', 'wp-simple-firewall' );
|
183 |
-
$
|
184 |
break;
|
185 |
|
186 |
case 'pass_force_existing' :
|
187 |
$sName = __( 'Apply To Existing Users', 'wp-simple-firewall' );
|
188 |
$sSummary = __( 'Apply Password Policies To Existing Users and Their Passwords', 'wp-simple-firewall' );
|
189 |
-
$
|
190 |
-
|
191 |
break;
|
192 |
|
193 |
case 'pass_expire' :
|
194 |
$sName = __( 'Password Expiration', 'wp-simple-firewall' );
|
195 |
$sSummary = __( 'Passwords Expire After This Many Days', 'wp-simple-firewall' );
|
196 |
-
$
|
197 |
-
|
198 |
break;
|
199 |
|
200 |
case 'manual_suspend' :
|
201 |
$sName = __( 'Allow Manual User Suspension', 'wp-simple-firewall' );
|
202 |
$sSummary = __( 'Manually Suspend User Accounts To Prevent Login', 'wp-simple-firewall' );
|
203 |
-
$
|
204 |
break;
|
205 |
|
206 |
case 'auto_password' :
|
207 |
$sName = __( 'Auto-Suspend Expired Passwords', 'wp-simple-firewall' );
|
208 |
$sSummary = __( 'Automatically Suspend Users With Expired Passwords', 'wp-simple-firewall' );
|
209 |
-
$
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
break;
|
216 |
|
217 |
case 'auto_idle_days' :
|
218 |
$sName = __( 'Auto-Suspend Idle Users', 'wp-simple-firewall' );
|
219 |
$sSummary = __( 'Automatically Suspend Idle User Accounts', 'wp-simple-firewall' );
|
220 |
-
$
|
221 |
-
|
222 |
-
|
223 |
break;
|
224 |
|
225 |
case 'auto_idle_roles' :
|
226 |
$sName = __( 'Auto-Suspend Idle User Roles', 'wp-simple-firewall' );
|
227 |
$sSummary = __( 'Apply Automatic Suspension To Accounts With These Roles', 'wp-simple-firewall' );
|
228 |
-
$
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
break;
|
234 |
|
235 |
default:
|
@@ -239,7 +240,7 @@ class Strings extends Base\Strings {
|
|
239 |
return [
|
240 |
'name' => $sName,
|
241 |
'summary' => $sSummary,
|
242 |
-
'description' => $
|
243 |
];
|
244 |
}
|
245 |
|
104 |
* @throws \Exception
|
105 |
*/
|
106 |
public function getOptionStrings( $sOptKey ) {
|
107 |
+
$oOpts = $this->getOptions();
|
108 |
$sModName = $this->getMod()->getMainFeatureName();
|
109 |
|
110 |
switch ( $sOptKey ) {
|
112 |
case 'enable_user_management' :
|
113 |
$sName = sprintf( __( 'Enable %s Module', 'wp-simple-firewall' ), $sModName );
|
114 |
$sSummary = sprintf( __( 'Enable (or Disable) The %s Module', 'wp-simple-firewall' ), $sModName );
|
115 |
+
$sDesc = sprintf( __( 'Un-Checking this option will completely disable the %s module.', 'wp-simple-firewall' ), $sModName );
|
116 |
break;
|
117 |
|
118 |
case 'enable_admin_login_email_notification' :
|
119 |
$sName = __( 'Admin Login Notification Email', 'wp-simple-firewall' );
|
120 |
$sSummary = __( 'Send An Notification Email When Administrator Logs In', 'wp-simple-firewall' );
|
121 |
+
$sDesc = __( 'If you would like to be notified every time an administrator user logs into this WordPress site, enter a notification email address.', 'wp-simple-firewall' )
|
122 |
+
.'<br />'.__( 'No email address - No Notification.', 'wp-simple-firewall' )
|
123 |
+
.'<br />'.__( 'Pro customers may provide multiple email address, separated by commas.', 'wp-simple-firewall' );
|
124 |
break;
|
125 |
|
126 |
case 'enable_user_login_email_notification' :
|
127 |
$sName = __( 'User Login Notification Email', 'wp-simple-firewall' );
|
128 |
$sSummary = __( 'Send Email Notification To Each User Upon Successful Login', 'wp-simple-firewall' );
|
129 |
+
$sDesc = __( 'A notification is sent to each user when a successful login occurs for their account.', 'wp-simple-firewall' );
|
130 |
break;
|
131 |
|
132 |
case 'session_timeout_interval' :
|
133 |
$sName = __( 'Session Timeout', 'wp-simple-firewall' );
|
134 |
$sSummary = __( 'Specify How Many Days After Login To Automatically Force Re-Login', 'wp-simple-firewall' );
|
135 |
+
$sDesc = __( 'WordPress default is 2 days, or 14 days if you check the "Remember Me" box.', 'wp-simple-firewall' )
|
136 |
+
.'<br />'.__( 'Think of this as an absolute maximum possible session length.', 'wp-simple-firewall' )
|
137 |
+
.'<br />'.sprintf( __( 'This cannot be less than %s.', 'wp-simple-firewall' ), '<strong>1</strong>' )
|
138 |
+
.' '.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), '<strong>'.$oOpts->getOptDefault( 'session_timeout_interval' ).'</strong>' );
|
139 |
break;
|
140 |
|
141 |
case 'session_idle_timeout_interval' :
|
142 |
$sName = __( 'Idle Timeout', 'wp-simple-firewall' );
|
143 |
$sSummary = __( 'Specify How Many Hours After Inactivity To Automatically Logout User', 'wp-simple-firewall' );
|
144 |
+
$sDesc = __( 'If the user is inactive for the number of hours specified, they will be forcefully logged out next time they return.', 'wp-simple-firewall' )
|
145 |
+
.'<br />'.sprintf( __( 'Set to %s to turn off this option.', 'wp-simple-firewall' ), '"<strong>0</strong>"' );
|
146 |
break;
|
147 |
|
148 |
case 'session_lock_location' :
|
149 |
$sName = __( 'Lock To Location', 'wp-simple-firewall' );
|
150 |
$sSummary = __( 'Locks A User Session To IP address', 'wp-simple-firewall' );
|
151 |
+
$sDesc = __( 'When selected, a session is restricted to the same IP address as when the user logged in.', 'wp-simple-firewall' )
|
152 |
+
.' '.__( "If a logged-in user's IP address changes, the session will be invalidated and they'll be forced to re-login to WordPress.", 'wp-simple-firewall' );
|
153 |
break;
|
154 |
|
155 |
case 'session_username_concurrent_limit' :
|
156 |
$sName = __( 'Max Simultaneous Sessions', 'wp-simple-firewall' );
|
157 |
$sSummary = __( 'Limit Simultaneous Sessions For The Same Username', 'wp-simple-firewall' );
|
158 |
+
$sDesc = __( 'The number provided here is the maximum number of simultaneous, distinct, sessions allowed for any given username.', 'wp-simple-firewall' )
|
159 |
+
.'<br />'.__( "Zero (0) will allow unlimited simultaneous sessions.", 'wp-simple-firewall' );
|
160 |
break;
|
161 |
|
162 |
case 'enable_password_policies' :
|
163 |
$sName = __( 'Enable Password Policies', 'wp-simple-firewall' );
|
164 |
$sSummary = __( 'Enable The Password Policies Detailed Below', 'wp-simple-firewall' );
|
165 |
+
$sDesc = __( 'Turn on/off all password policy settings.', 'wp-simple-firewall' );
|
166 |
break;
|
167 |
|
168 |
case 'pass_prevent_pwned' :
|
169 |
$sName = __( 'Prevent Pwned Passwords', 'wp-simple-firewall' );
|
170 |
$sSummary = __( 'Prevent Use Of "Pwned" Passwords', 'wp-simple-firewall' );
|
171 |
+
$sDesc = __( 'Prevents users from using any passwords found on the public available list of "pwned" passwords.', 'wp-simple-firewall' );
|
172 |
break;
|
173 |
|
174 |
case 'pass_min_length' :
|
175 |
$sName = __( 'Minimum Length', 'wp-simple-firewall' );
|
176 |
$sSummary = __( 'Minimum Password Length', 'wp-simple-firewall' );
|
177 |
+
$sDesc = __( 'All passwords that a user sets must be at least this many characters in length.', 'wp-simple-firewall' )
|
178 |
+
.'<br/>'.__( 'Set to Zero(0) to disable.', 'wp-simple-firewall' );
|
179 |
break;
|
180 |
|
181 |
case 'pass_min_strength' :
|
182 |
$sName = __( 'Minimum Strength', 'wp-simple-firewall' );
|
183 |
$sSummary = __( 'Minimum Password Strength', 'wp-simple-firewall' );
|
184 |
+
$sDesc = __( 'All passwords that a user sets must meet this minimum strength.', 'wp-simple-firewall' );
|
185 |
break;
|
186 |
|
187 |
case 'pass_force_existing' :
|
188 |
$sName = __( 'Apply To Existing Users', 'wp-simple-firewall' );
|
189 |
$sSummary = __( 'Apply Password Policies To Existing Users and Their Passwords', 'wp-simple-firewall' );
|
190 |
+
$sDesc = __( "Forces existing users to update their passwords if they don't meet requirements, after they next login.", 'wp-simple-firewall' )
|
191 |
+
.'<br/>'.__( 'Note: You may want to warn users prior to enabling this option.', 'wp-simple-firewall' );
|
192 |
break;
|
193 |
|
194 |
case 'pass_expire' :
|
195 |
$sName = __( 'Password Expiration', 'wp-simple-firewall' );
|
196 |
$sSummary = __( 'Passwords Expire After This Many Days', 'wp-simple-firewall' );
|
197 |
+
$sDesc = __( 'Users will be forced to reset their passwords after the number of days specified.', 'wp-simple-firewall' )
|
198 |
+
.'<br/>'.__( 'Set to Zero(0) to disable.', 'wp-simple-firewall' );
|
199 |
break;
|
200 |
|
201 |
case 'manual_suspend' :
|
202 |
$sName = __( 'Allow Manual User Suspension', 'wp-simple-firewall' );
|
203 |
$sSummary = __( 'Manually Suspend User Accounts To Prevent Login', 'wp-simple-firewall' );
|
204 |
+
$sDesc = __( 'Users may be suspended by administrators to prevent future login.', 'wp-simple-firewall' );
|
205 |
break;
|
206 |
|
207 |
case 'auto_password' :
|
208 |
$sName = __( 'Auto-Suspend Expired Passwords', 'wp-simple-firewall' );
|
209 |
$sSummary = __( 'Automatically Suspend Users With Expired Passwords', 'wp-simple-firewall' );
|
210 |
+
$sDesc = __( 'Automatically suspends login by users and requires password reset to unsuspend.', 'wp-simple-firewall' )
|
211 |
+
.'<br/>'.sprintf(
|
212 |
+
'<strong>%s</strong> - %s',
|
213 |
+
__( 'Important', 'wp-simple-firewall' ),
|
214 |
+
__( 'Requires password expiration policy to be set.', 'wp-simple-firewall' )
|
215 |
+
);
|
216 |
break;
|
217 |
|
218 |
case 'auto_idle_days' :
|
219 |
$sName = __( 'Auto-Suspend Idle Users', 'wp-simple-firewall' );
|
220 |
$sSummary = __( 'Automatically Suspend Idle User Accounts', 'wp-simple-firewall' );
|
221 |
+
$sDesc = __( 'Automatically suspends login for idle accounts and requires password reset to unsuspend.', 'wp-simple-firewall' )
|
222 |
+
.'<br/>'.__( 'Specify the number of days since last login to consider a user as idle.', 'wp-simple-firewall' )
|
223 |
+
.'<br/>'.__( 'Set to Zero(0) to disable.', 'wp-simple-firewall' );
|
224 |
break;
|
225 |
|
226 |
case 'auto_idle_roles' :
|
227 |
$sName = __( 'Auto-Suspend Idle User Roles', 'wp-simple-firewall' );
|
228 |
$sSummary = __( 'Apply Automatic Suspension To Accounts With These Roles', 'wp-simple-firewall' );
|
229 |
+
$sDesc = __( 'Automatic suspension for idle accounts applies only to the roles you specify.', 'wp-simple-firewall' )
|
230 |
+
.'<br/>'.sprintf( '%s: %s', __( 'Important', 'wp-simple-firewall' ), __( 'Take a new line for each user role.', 'wp-simple-firewall' ) )
|
231 |
+
.'<br/>'.sprintf( '%s: %s', __( 'Available Roles', 'wp-simple-firewall' ), implode( ', ', Services::WpUsers()
|
232 |
+
->getAvailableUserRoles() ) )
|
233 |
+
.'<br/>'.sprintf( '%s: %s', __( 'Default', 'wp-simple-firewall' ), implode( ', ', $oOpts->getOptDefault( 'auto_idle_roles' ) ) );
|
234 |
break;
|
235 |
|
236 |
default:
|
240 |
return [
|
241 |
'name' => $sName,
|
242 |
'summary' => $sSummary,
|
243 |
+
'description' => $sDesc,
|
244 |
];
|
245 |
}
|
246 |
|
src/lib/src/Scans/Apc/BuildScanAction.php
CHANGED
@@ -10,13 +10,12 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
10 |
protected function buildItems() {
|
11 |
/** @var ScanActionVO $oAction */
|
12 |
$oAction = $this->getScanActionVO();
|
13 |
-
$oAction->
|
14 |
}
|
15 |
|
16 |
protected function setCustomFields() {
|
17 |
/** @var ScanActionVO $oAction */
|
18 |
$oAction = $this->getScanActionVO();
|
19 |
-
$oAction->item_processing_limit = $oAction->is_async ? 3 : 0;
|
20 |
$oAction->abandoned_limit = YEAR_IN_SECONDS*2;
|
21 |
}
|
22 |
}
|
10 |
protected function buildItems() {
|
11 |
/** @var ScanActionVO $oAction */
|
12 |
$oAction = $this->getScanActionVO();
|
13 |
+
$oAction->items = Services::WpPlugins()->getInstalledPluginFiles();
|
14 |
}
|
15 |
|
16 |
protected function setCustomFields() {
|
17 |
/** @var ScanActionVO $oAction */
|
18 |
$oAction = $this->getScanActionVO();
|
|
|
19 |
$oAction->abandoned_limit = YEAR_IN_SECONDS*2;
|
20 |
}
|
21 |
}
|
src/lib/src/Scans/Apc/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Apc;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Apc
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Apc/Scan.php
CHANGED
@@ -12,34 +12,20 @@ class Scan extends Shield\Scans\Base\BaseScan {
|
|
12 |
|
13 |
$oTempRs = $oAction->getNewResultsSet();
|
14 |
|
15 |
-
|
16 |
-
$aSlice = array_slice( $oAction->scan_items, 0, $oAction->item_processing_limit );
|
17 |
-
$oAction->scan_items = array_slice( $oAction->scan_items, $oAction->item_processing_limit );
|
18 |
-
}
|
19 |
-
else {
|
20 |
-
$aSlice = $oAction->scan_items;
|
21 |
-
$oAction->scan_items = [];
|
22 |
-
}
|
23 |
-
|
24 |
-
$oAction->processed_items += count( $aSlice );
|
25 |
-
|
26 |
-
foreach ( $aSlice as $nKey => $sItem ) {
|
27 |
$oItem = $this->getItemScanner()->scan( $sItem );
|
28 |
if ( $oItem instanceof Shield\Scans\Base\BaseResultItem ) {
|
29 |
$oTempRs->addItem( $oItem );
|
30 |
}
|
31 |
}
|
32 |
|
|
|
33 |
if ( $oTempRs->hasItems() ) {
|
34 |
-
$aNewItems = [];
|
35 |
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
36 |
$aNewItems[] = $oItem->getRawDataAsArray();
|
37 |
}
|
38 |
-
if ( empty( $oAction->results ) ) {
|
39 |
-
$oAction->results = [];
|
40 |
-
}
|
41 |
-
$oAction->results = array_merge( $oAction->results, $aNewItems );
|
42 |
}
|
|
|
43 |
}
|
44 |
|
45 |
/**
|
12 |
|
13 |
$oTempRs = $oAction->getNewResultsSet();
|
14 |
|
15 |
+
foreach ( $oAction->items as $nKey => $sItem ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
$oItem = $this->getItemScanner()->scan( $sItem );
|
17 |
if ( $oItem instanceof Shield\Scans\Base\BaseResultItem ) {
|
18 |
$oTempRs->addItem( $oItem );
|
19 |
}
|
20 |
}
|
21 |
|
22 |
+
$aNewItems = [];
|
23 |
if ( $oTempRs->hasItems() ) {
|
|
|
24 |
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
25 |
$aNewItems[] = $oItem->getRawDataAsArray();
|
26 |
}
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
+
$oAction->results = $aNewItems;
|
29 |
}
|
30 |
|
31 |
/**
|
src/lib/src/Scans/Apc/ScanActionVO.php
CHANGED
@@ -11,4 +11,5 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
11 |
*/
|
12 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
13 |
|
|
|
14 |
}
|
11 |
*/
|
12 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
13 |
|
14 |
+
const ITEM_STORAGE_LIMIT = 3;
|
15 |
}
|
src/lib/src/Scans/Base/ActionStore.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Common\ScanActionConsumer;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
|
8 |
-
class ActionStore {
|
9 |
-
|
10 |
-
use ScanActionConsumer;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @return array|null
|
14 |
-
*/
|
15 |
-
public function readActionDefinitionFromDisk() {
|
16 |
-
$aDef = null;
|
17 |
-
$oFS = Services::WpFs();
|
18 |
-
$sPath = $this->getActionFilePath();
|
19 |
-
if ( $oFS->exists( $sPath ) ) {
|
20 |
-
$sDef = Services::WpFs()->getFileContent( $this->getActionFilePath(), true );
|
21 |
-
if ( !empty( $sDef ) ) {
|
22 |
-
$aDef = json_decode( $sDef, true );
|
23 |
-
}
|
24 |
-
}
|
25 |
-
return ( !empty( $aDef ) && is_array( $aDef ) ) ? $aDef : null;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @return $this
|
30 |
-
*/
|
31 |
-
public function deleteAction() {
|
32 |
-
Services::WpFs()->deleteFile( $this->getActionFilePath() );
|
33 |
-
return $this;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @return bool
|
38 |
-
*/
|
39 |
-
public function storeAction() {
|
40 |
-
return Services::WpFs()->putFileContent(
|
41 |
-
$this->getActionFilePath(),
|
42 |
-
json_encode( $this->getScanActionVO()->getRawDataAsArray() ),
|
43 |
-
true
|
44 |
-
);
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @return string
|
49 |
-
*/
|
50 |
-
public function getActionFilePath() {
|
51 |
-
return path_join( $this->getScanActionVO()->tmp_dir, 'action-'.$this->getScanActionVO()->id.'.txt' );
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @return string
|
56 |
-
*/
|
57 |
-
public function getLockFilePath() {
|
58 |
-
return path_join( $this->getScanActionVO()->tmp_dir, '.action-'.$this->getScanActionVO()->id.'.lock' );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* @return bool
|
63 |
-
*/
|
64 |
-
public function isActionRunning() {
|
65 |
-
return Services::WpFs()->exists( $this->getActionFilePath() );
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* @return bool
|
70 |
-
*/
|
71 |
-
public function isLocked() {
|
72 |
-
return Services::WpFs()->exists( $this->getLockFilePath() );
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* @return $this
|
77 |
-
*/
|
78 |
-
public function lockAction() {
|
79 |
-
Services::WpFs()->putFileContent( $this->getLockFilePath(), Services::Request()->ts() );
|
80 |
-
return $this;
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* @return $this
|
85 |
-
*/
|
86 |
-
public function unlockAction() {
|
87 |
-
Services::WpFs()->deleteFile( $this->getLockFilePath() );
|
88 |
-
return $this;
|
89 |
-
}
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Base/BaseBuildScanAction.php
CHANGED
@@ -11,39 +11,31 @@ abstract class BaseBuildScanAction {
|
|
11 |
Shield\Scans\Common\ScanActionConsumer;
|
12 |
|
13 |
/**
|
14 |
-
* @param bool $bBuildItems
|
15 |
* @throws \Exception
|
16 |
*/
|
17 |
-
public function build(
|
18 |
/** @var BaseScanActionVO $oAction */
|
19 |
$oAction = $this->getScanActionVO();
|
20 |
if ( !$oAction instanceof BaseScanActionVO ) {
|
21 |
-
throw new \Exception( 'Action VO not provided.' );
|
22 |
}
|
23 |
-
if ( empty( $oAction->
|
24 |
-
throw new \Exception( '
|
25 |
}
|
26 |
|
27 |
$this->setCustomFields();
|
28 |
-
|
29 |
-
$this->buildScanItems();
|
30 |
-
}
|
31 |
$this->setStandardFields();
|
32 |
}
|
33 |
|
34 |
/**
|
35 |
* @throws \Exception
|
36 |
*/
|
37 |
-
|
38 |
/** @var BaseScanActionVO $oAction */
|
39 |
$oAction = $this->getScanActionVO();
|
40 |
-
if ( $oAction->is_items_built ) {
|
41 |
-
throw new \Exception( 'Attempting to build items while they already exist.' );
|
42 |
-
}
|
43 |
$this->buildItems();
|
44 |
-
$oAction->
|
45 |
-
$oAction->processed_items = 0;
|
46 |
-
$oAction->total_scan_items = count( $oAction->scan_items );
|
47 |
}
|
48 |
|
49 |
/**
|
@@ -55,9 +47,10 @@ abstract class BaseBuildScanAction {
|
|
55 |
protected function setStandardFields() {
|
56 |
/** @var BaseScanActionVO $oAction */
|
57 |
$oAction = $this->getScanActionVO();
|
58 |
-
if ( empty( $oAction->
|
59 |
-
$oAction->
|
60 |
-
$oAction->
|
|
|
61 |
}
|
62 |
}
|
63 |
|
11 |
Shield\Scans\Common\ScanActionConsumer;
|
12 |
|
13 |
/**
|
|
|
14 |
* @throws \Exception
|
15 |
*/
|
16 |
+
public function build() {
|
17 |
/** @var BaseScanActionVO $oAction */
|
18 |
$oAction = $this->getScanActionVO();
|
19 |
if ( !$oAction instanceof BaseScanActionVO ) {
|
20 |
+
throw new \Exception( 'Scan Action VO not provided.' );
|
21 |
}
|
22 |
+
if ( empty( $oAction->scan ) ) {
|
23 |
+
throw new \Exception( 'Scan Slug not provided.' );
|
24 |
}
|
25 |
|
26 |
$this->setCustomFields();
|
27 |
+
$this->buildScanItems();
|
|
|
|
|
28 |
$this->setStandardFields();
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
* @throws \Exception
|
33 |
*/
|
34 |
+
protected function buildScanItems() {
|
35 |
/** @var BaseScanActionVO $oAction */
|
36 |
$oAction = $this->getScanActionVO();
|
|
|
|
|
|
|
37 |
$this->buildItems();
|
38 |
+
$oAction->total_items = count( $oAction->items );
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
47 |
protected function setStandardFields() {
|
48 |
/** @var BaseScanActionVO $oAction */
|
49 |
$oAction = $this->getScanActionVO();
|
50 |
+
if ( empty( $oAction->created_at ) ) {
|
51 |
+
$oAction->created_at = Services::Request()->ts();
|
52 |
+
$oAction->started_at = 0;
|
53 |
+
$oAction->finished_at = 0;
|
54 |
}
|
55 |
}
|
56 |
|
src/lib/src/Scans/Base/BaseConvertResultsToVos.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class BaseConvertResultsToVos
|
9 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Base
|
10 |
-
*/
|
11 |
-
abstract class BaseConvertResultsToVos {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @param BaseResultsSet $oResults
|
15 |
-
* @return Scanner\EntryVO[]
|
16 |
-
*/
|
17 |
-
public function convert( $oResults ) {
|
18 |
-
$aVos = [];
|
19 |
-
foreach ( $oResults->getAllItems() as $oIt ) {
|
20 |
-
/** @var BaseResultItem $oIt */
|
21 |
-
$aVos[ $oIt->generateHash() ] = $this->convertItem( $oIt );
|
22 |
-
}
|
23 |
-
return $aVos;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param BaseResultItem $oIt
|
28 |
-
* @return Scanner\EntryVO
|
29 |
-
*/
|
30 |
-
public function convertItem( $oIt ) {
|
31 |
-
$oVo = new Scanner\EntryVO();
|
32 |
-
$oVo->hash = $oIt->hash;
|
33 |
-
$oVo->meta = $oIt->getData();
|
34 |
-
return $oVo;
|
35 |
-
}
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Base/BaseResultItem.php
CHANGED
@@ -6,8 +6,9 @@ use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
|
6 |
|
7 |
/**
|
8 |
* Class BaseResultItem
|
9 |
-
* @property string hash
|
10 |
-
* @property bool is_excluded
|
|
|
11 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wcf
|
12 |
*/
|
13 |
class BaseResultItem {
|
6 |
|
7 |
/**
|
8 |
* Class BaseResultItem
|
9 |
+
* @property string $hash
|
10 |
+
* @property bool $is_excluded
|
11 |
+
* @property string $scan
|
12 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wcf
|
13 |
*/
|
14 |
class BaseResultItem {
|
src/lib/src/Scans/Base/BaseScan.php
CHANGED
@@ -29,43 +29,22 @@ abstract class BaseScan {
|
|
29 |
if ( !$oAction instanceof BaseScanActionVO ) {
|
30 |
throw new \Exception( 'Action VO not provided.' );
|
31 |
}
|
32 |
-
if ( empty( $oAction->
|
33 |
-
throw new \Exception( 'Action
|
34 |
}
|
35 |
-
if ( !Services::WpFs()->exists( $oAction->tmp_dir ) ) {
|
36 |
-
throw new \Exception( 'TMP Dir does not exist' );
|
37 |
-
}
|
38 |
-
|
39 |
-
$oStore = ( new ActionStore() )->setScanActionVO( $oAction );
|
40 |
-
$oQ = ( new ScanActionQuery() )->setScanActionVO( $oAction );
|
41 |
-
if ( $oStore->isLocked() ) {
|
42 |
-
if ( $oQ->isLockExpired() ) {
|
43 |
-
$oStore->unlockAction();
|
44 |
-
}
|
45 |
-
else {
|
46 |
-
throw new \Exception( 'Scan is currently locked.' );
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
if ( $oQ->isScanExpired() ) {
|
51 |
-
$oStore->deleteAction();
|
52 |
-
throw new \Exception( 'Scan was expired and was forcefully deleted.' );
|
53 |
-
}
|
54 |
-
|
55 |
-
$oStore->lockAction();
|
56 |
}
|
57 |
|
58 |
protected function scan() {
|
59 |
/** @var BaseScanActionVO $oAction */
|
60 |
$oAction = $this->getScanActionVO();
|
61 |
|
62 |
-
if ( empty( $oAction->
|
63 |
-
$oAction->
|
64 |
}
|
65 |
else {
|
66 |
$this->scanSlice();
|
67 |
-
if ( empty( $oAction->
|
68 |
-
$oAction->
|
69 |
}
|
70 |
}
|
71 |
|
@@ -78,16 +57,5 @@ abstract class BaseScan {
|
|
78 |
abstract protected function scanSlice();
|
79 |
|
80 |
protected function postScan() {
|
81 |
-
$oAction = $this->getScanActionVO();
|
82 |
-
$oStore = ( new ActionStore() )->setScanActionVO( $oAction );
|
83 |
-
|
84 |
-
if ( $oAction->ts_finish > 0 ) {
|
85 |
-
$oStore->deleteAction();
|
86 |
-
}
|
87 |
-
else {
|
88 |
-
$oStore->storeAction();
|
89 |
-
}
|
90 |
-
|
91 |
-
$oStore->unlockAction();
|
92 |
}
|
93 |
}
|
29 |
if ( !$oAction instanceof BaseScanActionVO ) {
|
30 |
throw new \Exception( 'Action VO not provided.' );
|
31 |
}
|
32 |
+
if ( empty( $oAction->scan ) ) {
|
33 |
+
throw new \Exception( 'Action Slug not provided.' );
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
protected function scan() {
|
38 |
/** @var BaseScanActionVO $oAction */
|
39 |
$oAction = $this->getScanActionVO();
|
40 |
|
41 |
+
if ( empty( $oAction->items ) ) {
|
42 |
+
$oAction->finished_at = Services::Request()->ts();
|
43 |
}
|
44 |
else {
|
45 |
$this->scanSlice();
|
46 |
+
if ( empty( $oAction->items ) ) {
|
47 |
+
$oAction->finished_at = Services::Request()->ts();
|
48 |
}
|
49 |
}
|
50 |
|
57 |
abstract protected function scanSlice();
|
58 |
|
59 |
protected function postScan() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
}
|
src/lib/src/Scans/Base/BaseScanActionVO.php
CHANGED
@@ -7,29 +7,26 @@ use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
|
7 |
/**
|
8 |
* Class ScanActionVO
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Base
|
10 |
-
* @property string $
|
11 |
-
* @property int $
|
12 |
-
* @property int $
|
13 |
-
* @property int $
|
14 |
* @property bool $is_async
|
15 |
-
* @property
|
16 |
-
* @property
|
17 |
-
* @property int $processed_items
|
18 |
-
* @property int $total_scan_items
|
19 |
-
* @property int $item_processing_limit
|
20 |
-
* @property string $tmp_dir
|
21 |
-
* @property string[] $scan_items
|
22 |
* @property array[] $results
|
23 |
*/
|
24 |
class BaseScanActionVO {
|
25 |
|
26 |
use StdClassAdapter;
|
27 |
|
|
|
|
|
28 |
/**
|
29 |
* @return BaseResultItem|mixed
|
30 |
*/
|
31 |
public function getNewResultItem() {
|
32 |
-
$sClass = $this->getScanNamespace().'
|
33 |
return new $sClass();
|
34 |
}
|
35 |
|
@@ -37,7 +34,7 @@ class BaseScanActionVO {
|
|
37 |
* @return BaseResultsSet|mixed
|
38 |
*/
|
39 |
public function getNewResultsSet() {
|
40 |
-
$sClass = $this->getScanNamespace().'
|
41 |
return new $sClass();
|
42 |
}
|
43 |
|
@@ -51,6 +48,6 @@ class BaseScanActionVO {
|
|
51 |
catch ( \Exception $oE ) {
|
52 |
$sName = __NAMESPACE__;
|
53 |
}
|
54 |
-
return $sName;
|
55 |
}
|
56 |
}
|
7 |
/**
|
8 |
* Class ScanActionVO
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Base
|
10 |
+
* @property string $scan
|
11 |
+
* @property int $created_at
|
12 |
+
* @property int $started_at
|
13 |
+
* @property int $finished_at
|
14 |
* @property bool $is_async
|
15 |
+
* @property int $total_items
|
16 |
+
* @property string[] $items
|
|
|
|
|
|
|
|
|
|
|
17 |
* @property array[] $results
|
18 |
*/
|
19 |
class BaseScanActionVO {
|
20 |
|
21 |
use StdClassAdapter;
|
22 |
|
23 |
+
const ITEM_STORAGE_LIMIT = 1;
|
24 |
+
|
25 |
/**
|
26 |
* @return BaseResultItem|mixed
|
27 |
*/
|
28 |
public function getNewResultItem() {
|
29 |
+
$sClass = $this->getScanNamespace().'ResultItem';
|
30 |
return new $sClass();
|
31 |
}
|
32 |
|
34 |
* @return BaseResultsSet|mixed
|
35 |
*/
|
36 |
public function getNewResultsSet() {
|
37 |
+
$sClass = $this->getScanNamespace().'ResultsSet';
|
38 |
return new $sClass();
|
39 |
}
|
40 |
|
48 |
catch ( \Exception $oE ) {
|
49 |
$sName = __NAMESPACE__;
|
50 |
}
|
51 |
+
return rtrim( $sName, '\\' ).'\\';
|
52 |
}
|
53 |
}
|
src/lib/src/Scans/Base/Files/BaseFileMapScan.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\Files;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
/**
|
9 |
* Class BaseFileAsyncScanner
|
@@ -22,23 +21,13 @@ abstract class BaseFileMapScan extends Base\BaseScan {
|
|
22 |
->setScanActionVO( $oAction )
|
23 |
->run();
|
24 |
|
|
|
25 |
if ( $oTempRs->hasItems() ) {
|
26 |
-
$aNewItems = [];
|
27 |
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
28 |
$aNewItems[] = $oItem->getRawDataAsArray();
|
29 |
}
|
30 |
-
if ( empty( $oAction->results ) ) {
|
31 |
-
$oAction->results = [];
|
32 |
-
}
|
33 |
-
$oAction->results = array_merge( $oAction->results, $aNewItems );
|
34 |
-
}
|
35 |
-
|
36 |
-
if ( $oAction->item_processing_limit > 0 ) {
|
37 |
-
$oAction->scan_items = array_slice( $oAction->scan_items, $oAction->item_processing_limit );
|
38 |
-
}
|
39 |
-
else {
|
40 |
-
$oAction->scan_items = [];
|
41 |
}
|
|
|
42 |
|
43 |
return $this;
|
44 |
}
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\Files;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class BaseFileAsyncScanner
|
21 |
->setScanActionVO( $oAction )
|
22 |
->run();
|
23 |
|
24 |
+
$aNewItems = [];
|
25 |
if ( $oTempRs->hasItems() ) {
|
|
|
26 |
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
27 |
$aNewItems[] = $oItem->getRawDataAsArray();
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
+
$oAction->results = $aNewItems;
|
31 |
|
32 |
return $this;
|
33 |
}
|
src/lib/src/Scans/Base/Files/BaseScanFromFileMap.php
CHANGED
@@ -20,18 +20,9 @@ abstract class BaseScanFromFileMap {
|
|
20 |
$oAction = $this->getScanActionVO();
|
21 |
$oResultSet = $oAction->getNewResultsSet();
|
22 |
|
23 |
-
if (
|
24 |
|
25 |
-
|
26 |
-
$aSlice = array_slice( $oAction->scan_items, 0, $oAction->item_processing_limit );
|
27 |
-
}
|
28 |
-
else {
|
29 |
-
$aSlice = $oAction->scan_items;
|
30 |
-
}
|
31 |
-
|
32 |
-
$oAction->processed_items += count( $aSlice );
|
33 |
-
|
34 |
-
foreach ( $aSlice as $nKey => $sFullPath ) {
|
35 |
$oItem = $this->getFileScanner()->scan( $sFullPath );
|
36 |
if ( $oItem instanceof Scans\Base\BaseResultItem ) {
|
37 |
$oResultSet->addItem( $oItem );
|
20 |
$oAction = $this->getScanActionVO();
|
21 |
$oResultSet = $oAction->getNewResultsSet();
|
22 |
|
23 |
+
if ( is_array( $oAction->items ) ) {
|
24 |
|
25 |
+
foreach ( $oAction->items as $nKey => $sFullPath ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
$oItem = $this->getFileScanner()->scan( $sFullPath );
|
27 |
if ( $oItem instanceof Scans\Base\BaseResultItem ) {
|
28 |
$oResultSet->addItem( $oItem );
|
src/lib/src/Scans/Base/ScanActionQuery.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
|
8 |
-
class ScanActionQuery {
|
9 |
-
|
10 |
-
use Shield\Scans\Common\ScanActionConsumer;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @param int $nExpiration
|
14 |
-
* @return bool
|
15 |
-
*/
|
16 |
-
public function isLockExpired( $nExpiration = 20 ) {
|
17 |
-
$oFS = Services::WpFs();
|
18 |
-
$sFile = $this->getActionStore()->getActionFilePath();
|
19 |
-
return $oFS->exists( $sFile ) &&
|
20 |
-
( Services::Request()->ts() - (int)$oFS->getFileContent( $sFile ) > $nExpiration );
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param int $nExpiration
|
25 |
-
* @return bool
|
26 |
-
*/
|
27 |
-
public function isScanExpired( $nExpiration = 60 ) {
|
28 |
-
$bExpired = false;
|
29 |
-
if ( $this->isRunning() ) {
|
30 |
-
$aDef = $this->getActionStore()->readActionDefinitionFromDisk();
|
31 |
-
if ( !empty( $aDef ) ) {
|
32 |
-
$oAction = ( new BaseScanActionVO() )->applyFromArray( $aDef );
|
33 |
-
$bExpired = Services::Request()->ts() - $oAction->ts_start > $nExpiration;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
return $bExpired;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @return bool
|
41 |
-
*/
|
42 |
-
public function isRunning() {
|
43 |
-
$sFile = $this->getActionStore()->getActionFilePath();
|
44 |
-
return (bool)Services::WpFs()->exists( $sFile );
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @return float|null
|
49 |
-
* @throws \Exception
|
50 |
-
*/
|
51 |
-
public function getPercentageComplete() {
|
52 |
-
$nPercent = null;
|
53 |
-
if ( $this->isRunning() ) {
|
54 |
-
$aDef = $this->getActionStore()->readActionDefinitionFromDisk();
|
55 |
-
if ( !empty( $aDef ) ) {
|
56 |
-
$oAction = ( new BaseScanActionVO() )->applyFromArray( $aDef );
|
57 |
-
|
58 |
-
if ( $oAction->ts_finish > 0 ) {
|
59 |
-
$nPercent = 100;
|
60 |
-
}
|
61 |
-
else {
|
62 |
-
$nPercent = $oAction->processed_items/$oAction->total_scan_items;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
return $nPercent;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* @return ActionStore
|
72 |
-
*/
|
73 |
-
protected function getActionStore() {
|
74 |
-
return ( new ActionStore() )
|
75 |
-
->setScanActionVO( $this->getScanActionVO() );
|
76 |
-
}
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Base/ScannerProfileConsumer.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class ScannerProfileConsumer
|
7 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Base
|
8 |
-
* @deprecated
|
9 |
-
*/
|
10 |
-
trait ScannerProfileConsumer {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @var ScannerProfile
|
14 |
-
*/
|
15 |
-
private $oScannerProfile;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @return ScannerProfile
|
19 |
-
*/
|
20 |
-
public function getScannerProfile() {
|
21 |
-
if ( !$this->oScannerProfile instanceof ScannerProfile ) {
|
22 |
-
$this->oScannerProfile = new ScannerProfile();
|
23 |
-
}
|
24 |
-
return $this->oScannerProfile;
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @param ScannerProfile $oScannerProfile
|
29 |
-
* @return $this
|
30 |
-
*/
|
31 |
-
public function setScannerProfile( $oScannerProfile ) {
|
32 |
-
$this->oScannerProfile = $oScannerProfile;
|
33 |
-
return $this;
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Common/AsyncScansController.php
DELETED
@@ -1,263 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Common;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ScansController
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Common
|
11 |
-
*/
|
12 |
-
class AsyncScansController {
|
13 |
-
|
14 |
-
use Shield\Modules\ModConsumer;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @var bool
|
18 |
-
*/
|
19 |
-
private $bIsRunning;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @return $this
|
23 |
-
*/
|
24 |
-
public function cleanStaleScans() {
|
25 |
-
$nBoundary = Services::Request()->ts() - 600;
|
26 |
-
|
27 |
-
$oJob = $this->loadScansJob();
|
28 |
-
foreach ( $oJob->getInitiatedScans() as $sScanSlug => $aInfo ) {
|
29 |
-
$nInitTs = $oJob->getScanInitTime( $sScanSlug );
|
30 |
-
if ( $nInitTs > 0 && $nBoundary > $nInitTs ) {
|
31 |
-
$oJob->removeInitiatedScan( $sScanSlug );
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
return $this->storeScansJob( $oJob );
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @return $this
|
40 |
-
*/
|
41 |
-
public function abortAllScans() {
|
42 |
-
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
43 |
-
$oMod = $this->getMod();
|
44 |
-
Services::WpFs()->deleteDir( $oMod->getScansTempDir() );
|
45 |
-
$oJob = $this->loadScansJob();
|
46 |
-
$oJob->clearScans();
|
47 |
-
return $this->storeScansJob( $oJob );
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
52 |
-
* @throws \Exception
|
53 |
-
*/
|
54 |
-
public function runScans() {
|
55 |
-
if ( $this->isRunning() ) {
|
56 |
-
throw new \Exception( 'Scans already running', 100 );
|
57 |
-
}
|
58 |
-
if ( !$this->loadScansJob()->hasScansToRun() ) {
|
59 |
-
throw new \Exception( 'No scans to run', 101 );
|
60 |
-
}
|
61 |
-
|
62 |
-
$this->start();
|
63 |
-
|
64 |
-
@ignore_user_abort( true );
|
65 |
-
|
66 |
-
$oAction = $this->getWorkingScanAction();
|
67 |
-
try {
|
68 |
-
( new Shield\Scans\Common\ScanLauncher() )
|
69 |
-
->setMod( $this->getMod() )
|
70 |
-
->setScanActionVO( $oAction )
|
71 |
-
->launch();
|
72 |
-
}
|
73 |
-
catch ( \Exception $oE ) {
|
74 |
-
$this->end();
|
75 |
-
throw $oE;
|
76 |
-
}
|
77 |
-
|
78 |
-
// Mark scan as finished so we know whether to fire another round
|
79 |
-
if ( $oAction->ts_finish > 0 || $oAction->ts_init == 0 ) {
|
80 |
-
$this->setScanAsFinished( $oAction );
|
81 |
-
}
|
82 |
-
|
83 |
-
if ( $this->loadScansJob()->hasScansToRun() ) {
|
84 |
-
Services::HttpRequest()
|
85 |
-
->get(
|
86 |
-
add_query_arg(
|
87 |
-
[
|
88 |
-
'shield_action' => 'scan_async_process',
|
89 |
-
'scan_key' => $this->getOpts()->getScanKey()
|
90 |
-
],
|
91 |
-
Services::WpGeneral()->getHomeUrl()
|
92 |
-
),
|
93 |
-
[
|
94 |
-
'blocking' => true,
|
95 |
-
'timeout' => 5,
|
96 |
-
]
|
97 |
-
);
|
98 |
-
}
|
99 |
-
else {
|
100 |
-
$this->abortAllScans();
|
101 |
-
}
|
102 |
-
|
103 |
-
$this->end();
|
104 |
-
return $oAction;
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* @return Shield\Scans\Base\BaseScanActionVO
|
109 |
-
*/
|
110 |
-
private function getWorkingScanAction() {
|
111 |
-
$oJob = $this->loadScansJob();
|
112 |
-
|
113 |
-
$aWorkingScan = $oJob->getCurrentScan();
|
114 |
-
if ( empty( $aWorkingScan ) ) {
|
115 |
-
$aUnfinished = $oJob->getUnfinishedScans();
|
116 |
-
$aWorkingScan = array_shift( $aUnfinished );
|
117 |
-
$oJob->setScanAsCurrent( $aWorkingScan[ 'id' ] );
|
118 |
-
$this->storeScansJob( $oJob );
|
119 |
-
}
|
120 |
-
|
121 |
-
$oAction = $this->getScanAction( $aWorkingScan );
|
122 |
-
|
123 |
-
return $oAction;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* @param Shield\Scans\Base\BaseScanActionVO $oAction
|
128 |
-
* @return $this
|
129 |
-
*/
|
130 |
-
protected function setScanAsFinished( $oAction ) {
|
131 |
-
$oJob = $this->loadScansJob();
|
132 |
-
$aWorkingScan = $oJob->getScanInfo( $oAction->id );
|
133 |
-
$aWorkingScan[ 'ts_finish' ] = $oAction->ts_finish;
|
134 |
-
$oJob->setScanInfo( $oAction->id, $aWorkingScan );
|
135 |
-
$oJob->setScanAsCurrent( $oAction->id, false );
|
136 |
-
$this->storeScansJob( $oJob );
|
137 |
-
return $this;
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* @param array $aWorkingScan
|
142 |
-
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
143 |
-
*/
|
144 |
-
private function getScanAction( $aWorkingScan ) {
|
145 |
-
$oAct = $this->getNewScanActionVO( $aWorkingScan[ 'id' ] );
|
146 |
-
if ( $oAct instanceof Shield\Scans\Base\BaseScanActionVO ) {
|
147 |
-
$oAct->applyFromArray( $aWorkingScan );
|
148 |
-
|
149 |
-
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
150 |
-
$oMod = $this->getMod();
|
151 |
-
$oAct->tmp_dir = $oMod->getScansTempDir();
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Only update is_cron if this is true so we don't overwrite it
|
155 |
-
* later with false on an async-request
|
156 |
-
*/
|
157 |
-
if ( $this->loadScansJob()->is_cron ) {
|
158 |
-
$oAct->is_cron = true;
|
159 |
-
}
|
160 |
-
|
161 |
-
$oAct->is_async = true;
|
162 |
-
}
|
163 |
-
|
164 |
-
return $oAct;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* @param $sScanSlug
|
169 |
-
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
170 |
-
*/
|
171 |
-
private function getNewScanActionVO( $sScanSlug ) {
|
172 |
-
$oVO = null;
|
173 |
-
switch ( $sScanSlug ) {
|
174 |
-
case 'apc':
|
175 |
-
$oVO = new Shield\Scans\Apc\ScanActionVO();
|
176 |
-
break;
|
177 |
-
case 'mal':
|
178 |
-
$oVO = new Shield\Scans\Mal\ScanActionVO();
|
179 |
-
break;
|
180 |
-
case 'ptg':
|
181 |
-
$oVO = new Shield\Scans\Ptg\ScanActionVO();
|
182 |
-
break;
|
183 |
-
case 'ufc':
|
184 |
-
$oVO = new Shield\Scans\Ufc\ScanActionVO();
|
185 |
-
break;
|
186 |
-
case 'wcf':
|
187 |
-
$oVO = new Shield\Scans\Wcf\ScanActionVO();
|
188 |
-
break;
|
189 |
-
case 'wpv':
|
190 |
-
$oVO = new Shield\Scans\Wpv\ScanActionVO();
|
191 |
-
break;
|
192 |
-
}
|
193 |
-
return $oVO;
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* @param bool $bNew
|
198 |
-
* @return ScansJobVO
|
199 |
-
*/
|
200 |
-
public function loadScansJob( $bNew = false ) {
|
201 |
-
$aSn = $this->getOpts()->getOpt( 'scans_job' );
|
202 |
-
if ( $bNew || !is_array( $aSn ) ) {
|
203 |
-
$aSn = [];
|
204 |
-
}
|
205 |
-
return ( new ScansJobVO() )->applyFromArray( $aSn );
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
* @param string[] $aScanSlugs
|
210 |
-
* @return $this
|
211 |
-
*/
|
212 |
-
public function setupNewScanJob( $aScanSlugs ) {
|
213 |
-
$oJob = $this->loadScansJob( true );
|
214 |
-
$oJob->is_cron = Services::WpGeneral()->isCron();
|
215 |
-
|
216 |
-
foreach ( $aScanSlugs as $sScanSlug ) {
|
217 |
-
$oJob->setScanInfo( $sScanSlug, [
|
218 |
-
'id' => $sScanSlug,
|
219 |
-
'ts_init' => Services::Request()->ts(),
|
220 |
-
] );
|
221 |
-
}
|
222 |
-
|
223 |
-
return $this->storeScansJob( $oJob );
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* @param ScansJobVO $oJob
|
228 |
-
* @return $this
|
229 |
-
*/
|
230 |
-
private function storeScansJob( $oJob ) {
|
231 |
-
$this->getOpts()->setOpt( 'scans_job', $oJob->getRawDataAsArray() );
|
232 |
-
$this->getMod()->savePluginOptions();
|
233 |
-
return $this;
|
234 |
-
}
|
235 |
-
|
236 |
-
/**
|
237 |
-
* @return Shield\Modules\HackGuard\Options
|
238 |
-
*/
|
239 |
-
private function getOpts() {
|
240 |
-
return $this->getMod()->getOptions();
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* @return bool
|
245 |
-
*/
|
246 |
-
private function start() {
|
247 |
-
return $this->bIsRunning = true;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* @return bool
|
252 |
-
*/
|
253 |
-
private function end() {
|
254 |
-
return $this->bIsRunning = false;
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* @return bool
|
259 |
-
*/
|
260 |
-
private function isRunning() {
|
261 |
-
return (bool)$this->bIsRunning;
|
262 |
-
}
|
263 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Common/ScanLauncher.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Common;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base;
|
7 |
-
|
8 |
-
class ScanLauncher {
|
9 |
-
|
10 |
-
use Shield\Modules\ModConsumer,
|
11 |
-
Shield\Scans\Common\ScanActionConsumer;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Builds the Action Definition and handles the storage to and from disk.
|
15 |
-
* @return bool
|
16 |
-
* @throws \Exception
|
17 |
-
*/
|
18 |
-
public function launch() {
|
19 |
-
$oAction = $this->getScanActionVO();
|
20 |
-
if ( !$oAction instanceof Base\BaseScanActionVO ) {
|
21 |
-
throw new \Exception( 'Scan Action VO not provided.' );
|
22 |
-
}
|
23 |
-
|
24 |
-
$oStore = ( new Shield\Scans\Base\ActionStore() )
|
25 |
-
->setScanActionVO( $oAction );
|
26 |
-
|
27 |
-
$aDef = $oStore->readActionDefinitionFromDisk();
|
28 |
-
|
29 |
-
// Only run a scan for async actions if the def was already on-disk
|
30 |
-
$bRunScan = !$oAction->is_async || !empty( $aDef );
|
31 |
-
|
32 |
-
if ( empty( $aDef ) ) {
|
33 |
-
$this->getScanActionBuilder()
|
34 |
-
->setMod( $this->getMod() )
|
35 |
-
->setScanActionVO( $oAction )
|
36 |
-
->build( !$oAction->is_async );
|
37 |
-
if ( $oAction->is_async ) {
|
38 |
-
$oStore->storeAction();
|
39 |
-
}
|
40 |
-
}
|
41 |
-
else {
|
42 |
-
$oAction->applyFromArray( $aDef );
|
43 |
-
if ( !$oAction->is_items_built ) {
|
44 |
-
try { // Build the scan items if it's not already done
|
45 |
-
$this->getScanActionBuilder()
|
46 |
-
->setMod( $this->getMod() )
|
47 |
-
->setScanActionVO( $oAction )
|
48 |
-
->buildScanItems();
|
49 |
-
$oStore->storeAction();
|
50 |
-
}
|
51 |
-
catch ( \Exception $oE ) {
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
if ( $bRunScan ) {
|
57 |
-
$this->getScanner()
|
58 |
-
->setScanActionVO( $oAction )
|
59 |
-
->setMod( $this->getMod() )
|
60 |
-
->run();
|
61 |
-
}
|
62 |
-
|
63 |
-
return true;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @return Base\BaseScan|mixed
|
68 |
-
*/
|
69 |
-
private function getScanner() {
|
70 |
-
$sClass = $this->getScanActionVO()->getScanNamespace().'\\Scan';
|
71 |
-
/** @var Base\BaseScan $o */
|
72 |
-
$o = new $sClass();
|
73 |
-
return $o->setMod( $this->getMod() )
|
74 |
-
->setScanActionVO( $this->getScanActionVO() );
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* @return Base\BaseBuildScanAction|mixed
|
79 |
-
*/
|
80 |
-
private function getScanActionBuilder() {
|
81 |
-
$sClass = $this->getScanActionVO()->getScanNamespace().'\\BuildScanAction';
|
82 |
-
/** @var Base\BaseBuildScanAction $o */
|
83 |
-
$o = new $sClass();
|
84 |
-
return $o->setMod( $this->getMod() )
|
85 |
-
->setScanActionVO( $this->getScanActionVO() );
|
86 |
-
}
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Common/ScansJobVO.php
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Common;
|
4 |
-
|
5 |
-
use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class ScanActionVO
|
9 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Common
|
10 |
-
* @property bool $is_cron
|
11 |
-
* @property array $scans
|
12 |
-
*/
|
13 |
-
class ScansJobVO {
|
14 |
-
|
15 |
-
use StdClassAdapter;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @return $this
|
19 |
-
*/
|
20 |
-
public function clearScans() {
|
21 |
-
return $this->setScans( [] );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @return array|null
|
26 |
-
*/
|
27 |
-
public function getCurrentScan() {
|
28 |
-
$aCurrent = null;
|
29 |
-
foreach ( $this->getInitiatedScans() as $aScanInfo ) {
|
30 |
-
if ( isset( $aScanInfo[ 'current' ] ) && $aScanInfo[ 'current' ] ) {
|
31 |
-
$aCurrent = $aScanInfo;
|
32 |
-
break;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
return $aCurrent;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @return array
|
40 |
-
*/
|
41 |
-
public function getInitiatedScans() {
|
42 |
-
return array_filter(
|
43 |
-
$this->getScans(),
|
44 |
-
function ( $aScan ) {
|
45 |
-
return !empty( $aScan[ 'ts_init' ] );
|
46 |
-
}
|
47 |
-
);
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @return array[] - keys: scan slugs; values: array of ts_init, id
|
52 |
-
*/
|
53 |
-
public function getUnfinishedScans() {
|
54 |
-
return array_filter(
|
55 |
-
$this->getInitiatedScans(),
|
56 |
-
function ( $aScan ) {
|
57 |
-
return empty( $aScan[ 'ts_finish' ] );
|
58 |
-
}
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* @param string $sScanSlug
|
64 |
-
* @param array $aScanInfo
|
65 |
-
* @return $this
|
66 |
-
*/
|
67 |
-
public function setScanInfo( $sScanSlug, $aScanInfo ) {
|
68 |
-
$aScans = $this->getScans();
|
69 |
-
$aScans[ $sScanSlug ] = array_merge(
|
70 |
-
[
|
71 |
-
'id' => $sScanSlug,
|
72 |
-
'ts_init' => 0,
|
73 |
-
'current' => false,
|
74 |
-
],
|
75 |
-
$aScanInfo
|
76 |
-
);
|
77 |
-
return $this->setScans( $aScans );
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param string $sScanSlug
|
82 |
-
* @return array
|
83 |
-
*/
|
84 |
-
public function getScanInfo( $sScanSlug ) {
|
85 |
-
$aScn = $this->getScans();
|
86 |
-
$aScanInfo = isset( $aScn[ $sScanSlug ] ) ? $aScn[ $sScanSlug ] : [];
|
87 |
-
return array_merge(
|
88 |
-
[
|
89 |
-
'id' => $sScanSlug,
|
90 |
-
'ts_init' => 0,
|
91 |
-
'current' => false,
|
92 |
-
],
|
93 |
-
$aScanInfo
|
94 |
-
);
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @param string $sScanSlug
|
99 |
-
* @return int
|
100 |
-
*/
|
101 |
-
public function getScanInitTime( $sScanSlug ) {
|
102 |
-
return $this->getScanInfo( $sScanSlug )[ 'ts_init' ];
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* @return float
|
107 |
-
*/
|
108 |
-
public function getScanJobProgress() {
|
109 |
-
if ( $this->hasScansToRun() ) {
|
110 |
-
$nProgress = 1 - ( count( $this->getUnfinishedScans() )/count( $this->getInitiatedScans() ) );
|
111 |
-
}
|
112 |
-
else {
|
113 |
-
$nProgress = 1;
|
114 |
-
}
|
115 |
-
return $nProgress;
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* @return bool
|
120 |
-
*/
|
121 |
-
public function hasScansToRun() {
|
122 |
-
return count( $this->getUnfinishedScans() ) > 0;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @param string $sScanSlug
|
127 |
-
* @return bool
|
128 |
-
*/
|
129 |
-
public function isScanInited( $sScanSlug ) {
|
130 |
-
return $this->getScanInitTime( $sScanSlug ) > 0;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* @param string $sScanSlug
|
135 |
-
* @return $this
|
136 |
-
*/
|
137 |
-
public function removeInitiatedScan( $sScanSlug ) {
|
138 |
-
if ( $this->isScanInited( $sScanSlug ) ) {
|
139 |
-
$aScan = $this->getScanInfo( $sScanSlug );
|
140 |
-
$aScan[ 'ts_init' ] = 0;
|
141 |
-
$this->setScanInfo( $sScanSlug, $aScan );
|
142 |
-
}
|
143 |
-
return $this;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* @param string $sScanSlug
|
148 |
-
* @param bool $bSetAsCurrent
|
149 |
-
* @return $this
|
150 |
-
*/
|
151 |
-
public function setScanAsCurrent( $sScanSlug, $bSetAsCurrent = true ) {
|
152 |
-
$aScanInfo = $this->getScanInfo( $sScanSlug );
|
153 |
-
if ( !empty( $aScanInfo ) && $aScanInfo[ 'ts_init' ] > 0 ) {
|
154 |
-
if ( is_null( $this->getCurrentScan() ) && $bSetAsCurrent ) {
|
155 |
-
$aScanInfo[ 'current' ] = true;
|
156 |
-
$this->setScanInfo( $sScanSlug, $aScanInfo );
|
157 |
-
}
|
158 |
-
else if ( !$bSetAsCurrent ) {
|
159 |
-
$aScanInfo[ 'current' ] = false;
|
160 |
-
$this->setScanInfo( $sScanSlug, $aScanInfo );
|
161 |
-
}
|
162 |
-
}
|
163 |
-
return $this;
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* @param array $aScans
|
168 |
-
* @return $this
|
169 |
-
*/
|
170 |
-
private function setScans( $aScans ) {
|
171 |
-
if ( !is_array( $aScans ) ) {
|
172 |
-
$aScans = [];
|
173 |
-
}
|
174 |
-
ksort( $aScans );
|
175 |
-
$this->scans = $aScans;
|
176 |
-
return $this;
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* @return array
|
181 |
-
*/
|
182 |
-
public function getScans() {
|
183 |
-
if ( !is_array( $this->scans ) ) {
|
184 |
-
$this->scans = [];
|
185 |
-
}
|
186 |
-
return $this->scans;
|
187 |
-
}
|
188 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Helpers/BuildHashesFromApi.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Helpers;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
-
use FernleafSystems\Wordpress\Services\Utilities\
|
7 |
|
8 |
/**
|
9 |
* Class BuildHashesFromDir
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Helpers;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
7 |
|
8 |
/**
|
9 |
* Class BuildHashesFromDir
|
src/lib/src/Scans/Mal/BuildScanAction.php
CHANGED
@@ -9,7 +9,7 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
9 |
protected function buildItems() {
|
10 |
/** @var ScanActionVO $oAction */
|
11 |
$oAction = $this->getScanActionVO();
|
12 |
-
$oAction->
|
13 |
->setScanActionVO( $oAction )
|
14 |
->build();
|
15 |
}
|
@@ -22,11 +22,9 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
22 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
23 |
$oOpts = $this->getMod()->getOptions();
|
24 |
|
25 |
-
$oAction->item_processing_limit = $oAction->is_async ? $oOpts->getFileScanLimit() : 0;
|
26 |
$oAction->paths_whitelisted = $oOpts->getMalWhitelistPaths();
|
27 |
$oAction->patterns_regex = $oOpts->getMalSignaturesRegex();
|
28 |
$oAction->patterns_simple = $oOpts->getMalSignaturesSimple();
|
29 |
-
$oAction->whitelist_hashes = $oOpts->getMalWhitelistHashes();
|
30 |
$oAction->file_exts = [ 'php', 'php5', 'php7' ];
|
31 |
$oAction->scan_root_dir = ABSPATH;
|
32 |
}
|
9 |
protected function buildItems() {
|
10 |
/** @var ScanActionVO $oAction */
|
11 |
$oAction = $this->getScanActionVO();
|
12 |
+
$oAction->items = ( new Shield\Scans\Mal\BuildFileMap() )
|
13 |
->setScanActionVO( $oAction )
|
14 |
->build();
|
15 |
}
|
22 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
23 |
$oOpts = $this->getMod()->getOptions();
|
24 |
|
|
|
25 |
$oAction->paths_whitelisted = $oOpts->getMalWhitelistPaths();
|
26 |
$oAction->patterns_regex = $oOpts->getMalSignaturesRegex();
|
27 |
$oAction->patterns_simple = $oOpts->getMalSignaturesSimple();
|
|
|
28 |
$oAction->file_exts = [ 'php', 'php5', 'php7' ];
|
29 |
$oAction->scan_root_dir = ABSPATH;
|
30 |
}
|
src/lib/src/Scans/Mal/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Mal/ConvertVosToResults.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertVosToResults
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal
|
11 |
-
*/
|
12 |
-
class ConvertVosToResults extends Scans\Base\BaseConvertVosToResults {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param EntryVO[] $oVos
|
16 |
-
* @return ResultsSet
|
17 |
-
*/
|
18 |
-
public function convert( $oVos ) {
|
19 |
-
$oRes = new ResultsSet();
|
20 |
-
foreach ( $oVos as $oVo ) {
|
21 |
-
$oRes->addItem( $this->convertItem( $oVo ) );
|
22 |
-
}
|
23 |
-
return $oRes;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param EntryVO $oVo
|
28 |
-
* @return ResultItem
|
29 |
-
*/
|
30 |
-
public function convertItem( $oVo ) {
|
31 |
-
return ( new ResultItem() )->applyFromArray( $oVo->meta );
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Mal/FileScanner.php
CHANGED
@@ -6,6 +6,7 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
6 |
use FernleafSystems\Wordpress\Services\Core\VOs\WpPluginVo;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
use FernleafSystems\Wordpress\Services\Utilities;
|
|
|
9 |
|
10 |
/**
|
11 |
* Class FileScanner
|
@@ -13,6 +14,11 @@ use FernleafSystems\Wordpress\Services\Utilities;
|
|
13 |
*/
|
14 |
class FileScanner extends Shield\Scans\Base\Files\BaseFileScanner {
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
/**
|
17 |
* @param string $sFullPath
|
18 |
* @return ResultItem|null
|
@@ -56,6 +62,19 @@ class FileScanner extends Shield\Scans\Base\Files\BaseFileScanner {
|
|
56 |
return $oResultItem;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/**
|
60 |
* @param $aLines
|
61 |
* @param $sFullPath
|
@@ -87,12 +106,11 @@ class FileScanner extends Shield\Scans\Base\Files\BaseFileScanner {
|
|
87 |
*/
|
88 |
private function isPathWhitelisted( $sFullPath ) {
|
89 |
$bWhitelisted = false;
|
90 |
-
|
91 |
-
$
|
92 |
-
if ( isset( $oAction->whitelist_hashes[ basename( $sFullPath ) ] ) ) {
|
93 |
try {
|
94 |
$oHasher = new Utilities\File\Compare\CompareHash();
|
95 |
-
foreach ( $
|
96 |
if ( $oHasher->isEqualFileSha1( $sFullPath, $sWlHash ) ) {
|
97 |
$bWhitelisted = true;
|
98 |
break;
|
6 |
use FernleafSystems\Wordpress\Services\Core\VOs\WpPluginVo;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
use FernleafSystems\Wordpress\Services\Utilities;
|
9 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware;
|
10 |
|
11 |
/**
|
12 |
* Class FileScanner
|
14 |
*/
|
15 |
class FileScanner extends Shield\Scans\Base\Files\BaseFileScanner {
|
16 |
|
17 |
+
/**
|
18 |
+
* @var array[]
|
19 |
+
*/
|
20 |
+
private $aWhitelistHashes;
|
21 |
+
|
22 |
/**
|
23 |
* @param string $sFullPath
|
24 |
* @return ResultItem|null
|
62 |
return $oResultItem;
|
63 |
}
|
64 |
|
65 |
+
/**
|
66 |
+
* @return array[]
|
67 |
+
*/
|
68 |
+
protected function getWhitelistHashes() {
|
69 |
+
if ( !is_array( $this->aWhitelistHashes ) ) {
|
70 |
+
$this->aWhitelistHashes = ( new Malware\WhitelistRetrieve() )->getFiles();
|
71 |
+
if ( !is_array( $this->aWhitelistHashes ) ) {
|
72 |
+
$this->aWhitelistHashes = [];
|
73 |
+
};
|
74 |
+
}
|
75 |
+
return $this->aWhitelistHashes;
|
76 |
+
}
|
77 |
+
|
78 |
/**
|
79 |
* @param $aLines
|
80 |
* @param $sFullPath
|
106 |
*/
|
107 |
private function isPathWhitelisted( $sFullPath ) {
|
108 |
$bWhitelisted = false;
|
109 |
+
$aWhitelistHashes = $this->getWhitelistHashes();
|
110 |
+
if ( isset( $aWhitelistHashes[ basename( $sFullPath ) ] ) ) {
|
|
|
111 |
try {
|
112 |
$oHasher = new Utilities\File\Compare\CompareHash();
|
113 |
+
foreach ( $aWhitelistHashes[ basename( $sFullPath ) ] as $sWlHash ) {
|
114 |
if ( $oHasher->isEqualFileSha1( $sFullPath, $sWlHash ) ) {
|
115 |
$bWhitelisted = true;
|
116 |
break;
|
src/lib/src/Scans/Mal/ScanActionVO.php
CHANGED
@@ -7,13 +7,13 @@ use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\BaseScanActionVO;
|
|
7 |
/**
|
8 |
* Class ScanActionVO
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal
|
10 |
-
* @property string[]
|
11 |
-
* @property string[]
|
12 |
-
* @property string[]
|
13 |
-
* @property string[]
|
14 |
-
* @property string[]
|
15 |
-
* @property string[][] $whitelist_hashes
|
16 |
*/
|
17 |
class ScanActionVO extends BaseScanActionVO {
|
18 |
|
|
|
19 |
}
|
7 |
/**
|
8 |
* Class ScanActionVO
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Mal
|
10 |
+
* @property string[] $file_exts
|
11 |
+
* @property string[] $scan_root_dir
|
12 |
+
* @property string[] $paths_whitelisted
|
13 |
+
* @property string[] $patterns_regex
|
14 |
+
* @property string[] $patterns_simple
|
|
|
15 |
*/
|
16 |
class ScanActionVO extends BaseScanActionVO {
|
17 |
|
18 |
+
const ITEM_STORAGE_LIMIT = 50;
|
19 |
}
|
src/lib/src/Scans/Ptg/BuildScanAction.php
CHANGED
@@ -18,7 +18,7 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
18 |
$aThemes[] = $oTheme->get_template();
|
19 |
}
|
20 |
|
21 |
-
$oAction->
|
22 |
array_map(
|
23 |
function ( $nKey ) {
|
24 |
return 'plugins';
|
@@ -39,7 +39,6 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
39 |
$oAction = $this->getScanActionVO();
|
40 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
41 |
$oOpts = $this->getMod()->getOptions();
|
42 |
-
$oAction->item_processing_limit = $oAction->is_async ? 3 : 0;
|
43 |
$oAction->scan_depth = $oOpts->getPtgScanDepth();
|
44 |
$oAction->file_exts = $oOpts->getPtgFileExtensions();
|
45 |
$oAction->hashes_base_path = $oOpts->getPtgSnapsBaseDir();
|
18 |
$aThemes[] = $oTheme->get_template();
|
19 |
}
|
20 |
|
21 |
+
$oAction->items = array_merge(
|
22 |
array_map(
|
23 |
function ( $nKey ) {
|
24 |
return 'plugins';
|
39 |
$oAction = $this->getScanActionVO();
|
40 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
41 |
$oOpts = $this->getMod()->getOptions();
|
|
|
42 |
$oAction->scan_depth = $oOpts->getPtgScanDepth();
|
43 |
$oAction->file_exts = $oOpts->getPtgFileExtensions();
|
44 |
$oAction->hashes_base_path = $oOpts->getPtgSnapsBaseDir();
|
src/lib/src/Scans/Ptg/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Ptg/ConvertVosToResults.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertVosToResults
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg
|
11 |
-
*/
|
12 |
-
class ConvertVosToResults extends Scans\Base\BaseConvertVosToResults {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param EntryVO[] $oVos
|
16 |
-
* @return ResultsSet
|
17 |
-
*/
|
18 |
-
public function convert( $oVos ) {
|
19 |
-
$oRes = new ResultsSet();
|
20 |
-
foreach ( $oVos as $oVo ) {
|
21 |
-
$oRes->addItem( $this->convertItem( $oVo ) );
|
22 |
-
}
|
23 |
-
return $oRes;
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @param EntryVO $oVo
|
28 |
-
* @return ResultItem
|
29 |
-
*/
|
30 |
-
public function convertItem( $oVo ) {
|
31 |
-
return ( new ResultItem() )->applyFromArray( $oVo->meta );
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Ptg/Scan.php
CHANGED
@@ -4,7 +4,7 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg;
|
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
use FernleafSystems\Wordpress\Services\Utilities\
|
8 |
|
9 |
class Scan extends Shield\Scans\Base\BaseScan {
|
10 |
|
@@ -22,26 +22,16 @@ class Scan extends Shield\Scans\Base\BaseScan {
|
|
22 |
/** @var ScanActionVO $oAction */
|
23 |
$oAction = $this->getScanActionVO();
|
24 |
|
25 |
-
if ( (int)$oAction->item_processing_limit > 0 ) {
|
26 |
-
$aSlice = array_slice( $oAction->scan_items, 0, $oAction->item_processing_limit );
|
27 |
-
$oAction->scan_items = array_slice( $oAction->scan_items, $oAction->item_processing_limit );
|
28 |
-
}
|
29 |
-
else {
|
30 |
-
$aSlice = $oAction->scan_items;
|
31 |
-
$oAction->scan_items = [];
|
32 |
-
}
|
33 |
-
|
34 |
-
$oAction->processed_items += count( $aSlice );
|
35 |
-
|
36 |
$oTempRs = $oAction->getNewResultsSet();
|
37 |
|
38 |
$oWpPlugins = Services::WpPlugins();
|
39 |
$oWpThemes = Services::WpThemes();
|
40 |
$oItemScanner = $this->getItemScanner();
|
|
|
41 |
|
42 |
// check we can even ping the WP Hashes API.
|
43 |
-
$bLiveHashesPing = ( new
|
44 |
-
foreach ( $
|
45 |
$oNewRes = null;
|
46 |
|
47 |
$bUseStaticHashes = true;
|
@@ -83,20 +73,17 @@ class Scan extends Shield\Scans\Base\BaseScan {
|
|
83 |
if ( $oNewRes instanceof ResultsSet ) {
|
84 |
$oNewRes->setSlugOnAllItems( $sSlug )
|
85 |
->setContextOnAllItems( $sContext );
|
86 |
-
|
87 |
}
|
88 |
}
|
89 |
|
|
|
90 |
if ( $oTempRs->hasItems() ) {
|
91 |
-
$
|
92 |
-
|
93 |
-
$aNewItems[] = $oNewRes->getRawDataAsArray();
|
94 |
-
}
|
95 |
-
if ( empty( $oAction->results ) ) {
|
96 |
-
$oAction->results = [];
|
97 |
}
|
98 |
-
$oAction->results = array_merge( $oAction->results, $aNewItems );
|
99 |
}
|
|
|
100 |
}
|
101 |
|
102 |
/**
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
8 |
|
9 |
class Scan extends Shield\Scans\Base\BaseScan {
|
10 |
|
22 |
/** @var ScanActionVO $oAction */
|
23 |
$oAction = $this->getScanActionVO();
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$oTempRs = $oAction->getNewResultsSet();
|
26 |
|
27 |
$oWpPlugins = Services::WpPlugins();
|
28 |
$oWpThemes = Services::WpThemes();
|
29 |
$oItemScanner = $this->getItemScanner();
|
30 |
+
$oCopier = new Shield\Scans\Helpers\CopyResultsSets();
|
31 |
|
32 |
// check we can even ping the WP Hashes API.
|
33 |
+
$bLiveHashesPing = ( new WpHashes\ApiPing() )->ping();
|
34 |
+
foreach ( $oAction->items as $sSlug => $sContext ) {
|
35 |
$oNewRes = null;
|
36 |
|
37 |
$bUseStaticHashes = true;
|
73 |
if ( $oNewRes instanceof ResultsSet ) {
|
74 |
$oNewRes->setSlugOnAllItems( $sSlug )
|
75 |
->setContextOnAllItems( $sContext );
|
76 |
+
$oCopier->copyTo( $oNewRes, $oTempRs );
|
77 |
}
|
78 |
}
|
79 |
|
80 |
+
$aNewItems = [];
|
81 |
if ( $oTempRs->hasItems() ) {
|
82 |
+
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
83 |
+
$aNewItems[] = $oItem->getRawDataAsArray();
|
|
|
|
|
|
|
|
|
84 |
}
|
|
|
85 |
}
|
86 |
+
$oAction->results = $aNewItems;
|
87 |
}
|
88 |
|
89 |
/**
|
src/lib/src/Scans/Ptg/ScanActionVO.php
CHANGED
@@ -13,4 +13,5 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
13 |
*/
|
14 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
15 |
|
|
|
16 |
}
|
13 |
*/
|
14 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
15 |
|
16 |
+
const ITEM_STORAGE_LIMIT = 100;
|
17 |
}
|
src/lib/src/Scans/Ptg/ScanResults/Clean.php
CHANGED
@@ -4,7 +4,7 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ptg\ScanResults;
|
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
6 |
|
7 |
-
class Clean extends
|
8 |
|
9 |
/**
|
10 |
* @return $this
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
6 |
|
7 |
+
class Clean extends \FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan\Results\Clean {
|
8 |
|
9 |
/**
|
10 |
* @return $this
|
src/lib/src/Scans/Ufc/BuildScanAction.php
CHANGED
@@ -4,12 +4,16 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ufc;
|
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
|
|
|
|
|
|
|
|
|
7 |
class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
8 |
|
9 |
protected function buildItems() {
|
10 |
/** @var ScanActionVO $oAction */
|
11 |
$oAction = $this->getScanActionVO();
|
12 |
-
$oAction->
|
13 |
->setScanActionVO( $oAction )
|
14 |
->build();
|
15 |
}
|
@@ -20,7 +24,6 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
20 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
21 |
$oOpts = $this->getMod()->getOptions();
|
22 |
|
23 |
-
$oAction->item_processing_limit = $oAction->is_async ? $oOpts->getFileScanLimit() : 0;
|
24 |
$oAction->exclusions = $oOpts->getUfcFileExclusions();
|
25 |
$oAction->scan_dirs = $oOpts->getUfcScanDirectories();
|
26 |
}
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
|
7 |
+
/**
|
8 |
+
* Class BuildScanAction
|
9 |
+
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Ufc
|
10 |
+
*/
|
11 |
class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
12 |
|
13 |
protected function buildItems() {
|
14 |
/** @var ScanActionVO $oAction */
|
15 |
$oAction = $this->getScanActionVO();
|
16 |
+
$oAction->items = ( new Shield\Scans\Ufc\BuildFileMap() )
|
17 |
->setScanActionVO( $oAction )
|
18 |
->build();
|
19 |
}
|
24 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
25 |
$oOpts = $this->getMod()->getOptions();
|
26 |
|
|
|
27 |
$oAction->exclusions = $oOpts->getUfcFileExclusions();
|
28 |
$oAction->scan_dirs = $oOpts->getUfcScanDirectories();
|
29 |
}
|
src/lib/src/Scans/Ufc/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Ufc;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Ufc
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Ufc/ScanActionVO.php
CHANGED
@@ -11,4 +11,6 @@ use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\BaseScanActionVO;
|
|
11 |
* @property string[] $exclusions
|
12 |
*/
|
13 |
class ScanActionVO extends BaseScanActionVO {
|
|
|
|
|
14 |
}
|
11 |
* @property string[] $exclusions
|
12 |
*/
|
13 |
class ScanActionVO extends BaseScanActionVO {
|
14 |
+
|
15 |
+
const ITEM_STORAGE_LIMIT = 100;
|
16 |
}
|
src/lib/src/Scans/Wcf/BuildScanAction.php
CHANGED
@@ -9,7 +9,7 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
9 |
protected function buildItems() {
|
10 |
/** @var ScanActionVO $oAction */
|
11 |
$oAction = $this->getScanActionVO();
|
12 |
-
$oAction->
|
13 |
->setScanActionVO( $oAction )
|
14 |
->build();
|
15 |
}
|
@@ -20,7 +20,6 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
20 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
21 |
$oOpts = $this->getMod()->getOptions();
|
22 |
|
23 |
-
$oAction->item_processing_limit = $oAction->is_async ? $oOpts->getFileScanLimit() : 0;
|
24 |
$oAction->exclusions_missing_regex = $oOpts->getWcfMissingExclusions();
|
25 |
$oAction->exclusions_files_regex = $oOpts->getWcfFileExclusions();
|
26 |
}
|
9 |
protected function buildItems() {
|
10 |
/** @var ScanActionVO $oAction */
|
11 |
$oAction = $this->getScanActionVO();
|
12 |
+
$oAction->items = ( new Shield\Scans\Wcf\BuildFileMap() )
|
13 |
->setScanActionVO( $oAction )
|
14 |
->build();
|
15 |
}
|
20 |
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
21 |
$oOpts = $this->getMod()->getOptions();
|
22 |
|
|
|
23 |
$oAction->exclusions_missing_regex = $oOpts->getWcfMissingExclusions();
|
24 |
$oAction->exclusions_files_regex = $oOpts->getWcfFileExclusions();
|
25 |
}
|
src/lib/src/Scans/Wcf/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wcf;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wcf
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wcf/ScanActionVO.php
CHANGED
@@ -13,4 +13,5 @@ use FernleafSystems\Wordpress\Plugin\Shield\Scans\Base\BaseScanActionVO;
|
|
13 |
*/
|
14 |
class ScanActionVO extends BaseScanActionVO {
|
15 |
|
|
|
16 |
}
|
13 |
*/
|
14 |
class ScanActionVO extends BaseScanActionVO {
|
15 |
|
16 |
+
const ITEM_STORAGE_LIMIT = 100;
|
17 |
}
|
src/lib/src/Scans/Wpv/BuildScanAction.php
CHANGED
@@ -22,12 +22,6 @@ class BuildScanAction extends Shield\Scans\Base\BaseBuildScanAction {
|
|
22 |
$oTheme = $oWpT->isActiveThemeAChild() ? $oWpT->getCurrentParent() : $oWpT->getCurrent();
|
23 |
$aItems[ $oTheme->get_stylesheet() ] = 'themes';
|
24 |
|
25 |
-
$oAction->
|
26 |
-
}
|
27 |
-
|
28 |
-
protected function setCustomFields() {
|
29 |
-
/** @var ScanActionVO $oAction */
|
30 |
-
$oAction = $this->getScanActionVO();
|
31 |
-
$oAction->item_processing_limit = $oAction->is_async ? 3 : 0;
|
32 |
}
|
33 |
}
|
22 |
$oTheme = $oWpT->isActiveThemeAChild() ? $oWpT->getCurrentParent() : $oWpT->getCurrent();
|
23 |
$aItems[ $oTheme->get_stylesheet() ] = 'themes';
|
24 |
|
25 |
+
$oAction->items = $aItems;
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
}
|
src/lib/src/Scans/Wpv/ConvertResultsToVos.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner\EntryVO;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ConvertResultsToVos
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
11 |
-
*/
|
12 |
-
class ConvertResultsToVos extends Scans\Base\BaseConvertResultsToVos {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param ResultItem $oIt
|
16 |
-
* @return EntryVO
|
17 |
-
*/
|
18 |
-
public function convertItem( $oIt ) {
|
19 |
-
$oVo = parent::convertItem( $oIt );
|
20 |
-
$oVo->scan = $oIt::SCAN_RESULT_TYPE;
|
21 |
-
return $oVo;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/ItemScanner.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb\RetrieveForItem;
|
7 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb\WpVulnVO;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class ItemScanner
|
11 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
12 |
-
*/
|
13 |
-
abstract class ItemScanner {
|
14 |
-
|
15 |
-
use Shield\Scans\Common\ScanActionConsumer;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @param string $sFile
|
19 |
-
* @return ResultsSet|null
|
20 |
-
*/
|
21 |
-
abstract public function scan( $sFile );
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param WpVulnVO[] $aVos
|
25 |
-
* @param string $sCurrentVersion
|
26 |
-
* @return WpVulnVO[]
|
27 |
-
*/
|
28 |
-
protected function filterAgainstVersion( $aVos, $sCurrentVersion ) {
|
29 |
-
$sCurrentVersion = trim( $sCurrentVersion, 'v' );
|
30 |
-
return array_filter(
|
31 |
-
$aVos,
|
32 |
-
function ( $oVo ) use ( $sCurrentVersion ) {
|
33 |
-
/** @var WpVulnVO $oVo */
|
34 |
-
$sFixed = $oVo->fixed_in;
|
35 |
-
return ( empty ( $sFixed ) || version_compare( $sCurrentVersion, $sFixed, '<' ) );
|
36 |
-
}
|
37 |
-
);
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @param string $sSlug
|
42 |
-
* @param string $sContext
|
43 |
-
* @return WpVulnVO[]
|
44 |
-
*/
|
45 |
-
protected function retrieveForSlug( $sSlug, $sContext = 'plugins' ) {
|
46 |
-
return ( new RetrieveForItem() )
|
47 |
-
->setContext( $sContext )
|
48 |
-
->setSlug( $sSlug )
|
49 |
-
->retrieve();
|
50 |
-
}
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/PluginScanner.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class PluginScanner
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
11 |
-
*/
|
12 |
-
class PluginScanner extends ItemScanner {
|
13 |
-
|
14 |
-
use Shield\Scans\Common\ScanActionConsumer;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $sFile
|
18 |
-
* @return ResultsSet|null
|
19 |
-
*/
|
20 |
-
public function scan( $sFile ) {
|
21 |
-
$oResultsSet = null;
|
22 |
-
|
23 |
-
$oWpPlugins = Services::WpPlugins();
|
24 |
-
|
25 |
-
$sSlug = $oWpPlugins->getSlug( $sFile );
|
26 |
-
if ( empty( $sSlug ) ) {
|
27 |
-
$sSlug = dirname( $sFile );
|
28 |
-
}
|
29 |
-
|
30 |
-
$aVos = $this->retrieveForSlug( $sSlug, 'plugins' );
|
31 |
-
if ( !empty( $aVos ) ) {
|
32 |
-
$aVulns = $this->filterAgainstVersion( $aVos, $oWpPlugins->getPluginAsVo( $sFile )->Version );
|
33 |
-
|
34 |
-
if ( !empty( $aVulns ) ) {
|
35 |
-
$oResultsSet = new ResultsSet();
|
36 |
-
foreach ( $aVulns as $oVo ) {
|
37 |
-
$oItem = new ResultItem();
|
38 |
-
$oItem->slug = $sFile;
|
39 |
-
$oItem->context = 'plugins';
|
40 |
-
$oItem->wpvuln_id = $oVo->id;
|
41 |
-
$oItem->wpvuln_vo = $oVo->getRawDataAsArray();
|
42 |
-
$oResultsSet->addItem( $oItem );
|
43 |
-
}
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
return $oResultsSet;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/Scan.php
CHANGED
@@ -4,55 +4,74 @@ namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
|
|
7 |
|
8 |
class Scan extends Shield\Scans\Base\BaseScan {
|
9 |
|
10 |
protected function scanSlice() {
|
11 |
/** @var ScanActionVO $oAction */
|
12 |
$oAction = $this->getScanActionVO();
|
13 |
-
|
14 |
-
if ( (int)$oAction->item_processing_limit > 0 ) {
|
15 |
-
$aSlice = array_slice( $oAction->scan_items, 0, $oAction->item_processing_limit );
|
16 |
-
$oAction->scan_items = array_slice( $oAction->scan_items, $oAction->item_processing_limit );
|
17 |
-
}
|
18 |
-
else {
|
19 |
-
$aSlice = $oAction->scan_items;
|
20 |
-
$oAction->scan_items = [];
|
21 |
-
}
|
22 |
-
|
23 |
-
$oAction->processed_items += count( $aSlice );
|
24 |
-
|
25 |
$oTempRs = $oAction->getNewResultsSet();
|
26 |
|
27 |
-
|
28 |
-
|
|
|
29 |
if ( $oNewRes instanceof Shield\Scans\Base\BaseResultsSet ) {
|
30 |
-
|
31 |
}
|
32 |
}
|
33 |
|
|
|
34 |
if ( $oTempRs->hasItems() ) {
|
35 |
-
$
|
36 |
-
|
37 |
-
$aNewItems[] = $oNewRes->getRawDataAsArray();
|
38 |
-
}
|
39 |
-
if ( empty( $oAction->results ) ) {
|
40 |
-
$oAction->results = [];
|
41 |
}
|
42 |
-
$oAction->results = array_merge( $oAction->results, $aNewItems );
|
43 |
}
|
|
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
* @param string $sContext
|
48 |
-
* @
|
|
|
49 |
*/
|
50 |
-
protected function
|
|
|
|
|
51 |
if ( $sContext == 'plugins' ) {
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
else {
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
|
|
|
|
57 |
}
|
58 |
}
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
8 |
|
9 |
class Scan extends Shield\Scans\Base\BaseScan {
|
10 |
|
11 |
protected function scanSlice() {
|
12 |
/** @var ScanActionVO $oAction */
|
13 |
$oAction = $this->getScanActionVO();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$oTempRs = $oAction->getNewResultsSet();
|
15 |
|
16 |
+
$oCopier = new Shield\Scans\Helpers\CopyResultsSets();
|
17 |
+
foreach ( $oAction->items as $sFile => $sContext ) {
|
18 |
+
$oNewRes = $this->scanItem( $sContext, $sFile );
|
19 |
if ( $oNewRes instanceof Shield\Scans\Base\BaseResultsSet ) {
|
20 |
+
$oCopier->copyTo( $oNewRes, $oTempRs );
|
21 |
}
|
22 |
}
|
23 |
|
24 |
+
$aNewItems = [];
|
25 |
if ( $oTempRs->hasItems() ) {
|
26 |
+
foreach ( $oTempRs->getAllItems() as $oItem ) {
|
27 |
+
$aNewItems[] = $oItem->getRawDataAsArray();
|
|
|
|
|
|
|
|
|
28 |
}
|
|
|
29 |
}
|
30 |
+
$oAction->results = $aNewItems;
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
* @param string $sContext
|
35 |
+
* @param string $sFile
|
36 |
+
* @return ResultsSet
|
37 |
*/
|
38 |
+
protected function scanItem( $sContext, $sFile ) {
|
39 |
+
$oResultsSet = new ResultsSet();
|
40 |
+
|
41 |
if ( $sContext == 'plugins' ) {
|
42 |
+
$oWpPlugins = Services::WpPlugins();
|
43 |
+
$sSlug = $oWpPlugins->getSlug( $sFile );
|
44 |
+
if ( empty( $sSlug ) ) {
|
45 |
+
$sSlug = dirname( $sFile );
|
46 |
+
}
|
47 |
+
$sVersion = $oWpPlugins->getPluginAsVo( $sFile )->Version;
|
48 |
+
$oLookup = new Vulnerabilities\Plugin();
|
49 |
}
|
50 |
else {
|
51 |
+
$sSlug = $sFile;
|
52 |
+
$sVersion = Services::WpThemes()->getTheme( $sSlug )->get( 'Version' );
|
53 |
+
$oLookup = new Vulnerabilities\Theme();
|
54 |
+
}
|
55 |
+
|
56 |
+
$aVulns = $oLookup->getVulnerabilities( $sSlug, $sVersion );
|
57 |
+
$aVulns = array_filter( array_map(
|
58 |
+
function ( $aVuln ) {
|
59 |
+
return empty( $aVuln ) ? null
|
60 |
+
: ( new Shield\Scans\Wpv\WpVulnDb\WpVulnVO() )->applyFromArray( $aVuln );
|
61 |
+
},
|
62 |
+
( is_array( $aVulns ) ? $aVulns : [] )
|
63 |
+
) );
|
64 |
+
|
65 |
+
/** @var Shield\Scans\Wpv\WpVulnDb\WpVulnVO[] $aVulns */
|
66 |
+
foreach ( $aVulns as $oVo ) {
|
67 |
+
$oItem = new ResultItem();
|
68 |
+
$oItem->slug = $sFile;
|
69 |
+
$oItem->context = $sContext;
|
70 |
+
$oItem->wpvuln_id = $oVo->id;
|
71 |
+
$oItem->wpvuln_vo = $oVo->getRawDataAsArray();
|
72 |
+
$oResultsSet->addItem( $oItem );
|
73 |
}
|
74 |
+
|
75 |
+
return $oResultsSet;
|
76 |
}
|
77 |
}
|
src/lib/src/Scans/Wpv/ScanActionVO.php
CHANGED
@@ -9,4 +9,6 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
10 |
*/
|
11 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
|
|
|
|
12 |
}
|
9 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
10 |
*/
|
11 |
class ScanActionVO extends Shield\Scans\Base\BaseScanActionVO {
|
12 |
+
|
13 |
+
const ITEM_STORAGE_LIMIT = 3;
|
14 |
}
|
src/lib/src/Scans/Wpv/Scanner.php
DELETED
@@ -1,150 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb\RetrieveForItem;
|
6 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb\WpVulnVO;
|
7 |
-
use FernleafSystems\Wordpress\Services\Services;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class Scanner
|
11 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
12 |
-
*/
|
13 |
-
class Scanner {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @return ResultsSet
|
17 |
-
*/
|
18 |
-
public function run() {
|
19 |
-
$oResultSet = new ResultsSet();
|
20 |
-
|
21 |
-
foreach ( $this->getAllPluginVulnerabilities() as $sFile => $aVulnerabilities ) {
|
22 |
-
foreach ( $aVulnerabilities as $oVo ) {
|
23 |
-
$oItem = new ResultItem();
|
24 |
-
$oItem->slug = $sFile;
|
25 |
-
$oItem->context = 'plugins';
|
26 |
-
$oItem->wpvuln_id = $oVo->id;
|
27 |
-
$oItem->wpvuln_vo = $oVo->getRawDataAsArray();
|
28 |
-
$oResultSet->addItem( $oItem );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
foreach ( $this->getAllThemeVulnerabilities() as $sFile => $aVulnerabilities ) {
|
33 |
-
foreach ( $aVulnerabilities as $oVo ) {
|
34 |
-
$oItem = new ResultItem();
|
35 |
-
$oItem->slug = $sFile;
|
36 |
-
$oItem->context = 'themes';
|
37 |
-
$oItem->wpvuln_id = $oVo->id;
|
38 |
-
$oItem->wpvuln_vo = $oVo->getRawDataAsArray();
|
39 |
-
$oResultSet->addItem( $oItem );
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
return $oResultSet;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @return WpVulnVO[][]
|
48 |
-
*/
|
49 |
-
protected function getAllPluginVulnerabilities() {
|
50 |
-
$aVulns = [];
|
51 |
-
foreach ( Services::WpPlugins()->getInstalledPluginFiles() as $sFile ) {
|
52 |
-
$aVulns[ $sFile ] = $this->getPluginVulnerabilities( $sFile );
|
53 |
-
}
|
54 |
-
return array_filter( $aVulns );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @return WpVulnVO[][]
|
59 |
-
*/
|
60 |
-
protected function getAllThemeVulnerabilities() {
|
61 |
-
$aVulns = [];
|
62 |
-
$oWpThemes = Services::WpThemes();
|
63 |
-
|
64 |
-
$oActiveTheme = $oWpThemes->getCurrent();
|
65 |
-
if ( $oActiveTheme instanceof \WP_Theme ) {
|
66 |
-
|
67 |
-
$aThemes = [
|
68 |
-
$oActiveTheme->get_stylesheet() => $oActiveTheme->get_stylesheet()
|
69 |
-
];
|
70 |
-
|
71 |
-
if ( $oWpThemes->isActiveThemeAChild() ) { // is child theme
|
72 |
-
$oParent = $oWpThemes->getCurrentParent();
|
73 |
-
if ( $oParent instanceof \WP_Theme ) {
|
74 |
-
$aThemes[ $oParent->get_stylesheet() ] = $oParent->get_stylesheet();
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
foreach ( $aThemes as $sBaseFile => $sSlug ) {
|
79 |
-
$aVulns[ $sBaseFile ] = $this->getThemeVulnerabilities( $sBaseFile );
|
80 |
-
}
|
81 |
-
}
|
82 |
-
return array_filter( $aVulns );
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @param string $sFile
|
87 |
-
* @return WpVulnVO[]
|
88 |
-
*/
|
89 |
-
public function getPluginVulnerabilities( $sFile ) {
|
90 |
-
$oWpPlugins = Services::WpPlugins();
|
91 |
-
|
92 |
-
$sSlug = $oWpPlugins->getSlug( $sFile );
|
93 |
-
if ( empty( $sSlug ) ) {
|
94 |
-
$sSlug = dirname( $sFile );
|
95 |
-
}
|
96 |
-
|
97 |
-
$aVulns = [];
|
98 |
-
try {
|
99 |
-
$aVos = ( new RetrieveForItem() )->setContext( 'plugins' )
|
100 |
-
->setSlug( $sSlug )
|
101 |
-
->retrieve();
|
102 |
-
if ( !empty( $aVos ) ) {
|
103 |
-
$aVulns = $this->filterVulnerabilitiesAgainstVersion( $aVos, $oWpPlugins->getPluginAsVo( $sFile )->Version );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
catch ( \Exception $oE ) {
|
107 |
-
}
|
108 |
-
|
109 |
-
return $aVulns;
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* @param string $sSlug
|
114 |
-
* @return WpVulnVO[]
|
115 |
-
*/
|
116 |
-
public function getThemeVulnerabilities( $sSlug ) {
|
117 |
-
|
118 |
-
$aVulns = [];
|
119 |
-
try {
|
120 |
-
$aVos = ( new RetrieveForItem() )->setContext( 'themes' )
|
121 |
-
->setSlug( $sSlug )
|
122 |
-
->retrieve();
|
123 |
-
if ( !empty( $aVos ) ) {
|
124 |
-
$oTheme = Services::WpThemes()->getTheme( $sSlug );
|
125 |
-
$aVulns = $this->filterVulnerabilitiesAgainstVersion( $aVos, $oTheme->get( 'Version' ) );
|
126 |
-
}
|
127 |
-
}
|
128 |
-
catch ( \Exception $oE ) {
|
129 |
-
}
|
130 |
-
|
131 |
-
return $aVulns;
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* @param WpVulnVO[] $aVos
|
136 |
-
* @param string $sCurrentVersion
|
137 |
-
* @return WpVulnVO[]
|
138 |
-
*/
|
139 |
-
private function filterVulnerabilitiesAgainstVersion( $aVos, $sCurrentVersion ) {
|
140 |
-
$sCurrentVersion = trim( $sCurrentVersion, 'v' );
|
141 |
-
return array_filter(
|
142 |
-
$aVos,
|
143 |
-
function ( $oVo ) use ( $sCurrentVersion ) {
|
144 |
-
/** @var WpVulnVO $oVo */
|
145 |
-
$sFixed = $oVo->fixed_in;
|
146 |
-
return ( empty ( $sFixed ) || version_compare( $sCurrentVersion, $sFixed, '<' ) );
|
147 |
-
}
|
148 |
-
);
|
149 |
-
}
|
150 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/ThemeScanner.php
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
-
use FernleafSystems\Wordpress\Services\Services;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class ThemeScanner
|
10 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv
|
11 |
-
*/
|
12 |
-
class ThemeScanner extends ItemScanner {
|
13 |
-
|
14 |
-
use Shield\Scans\Common\ScanActionConsumer;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $sSlug
|
18 |
-
* @return ResultsSet|null
|
19 |
-
*/
|
20 |
-
public function scan( $sSlug ) {
|
21 |
-
$oResultsSet = null;
|
22 |
-
|
23 |
-
$aVos = $this->retrieveForSlug( $sSlug, 'themes' );
|
24 |
-
if ( !empty( $aVos ) ) {
|
25 |
-
$oTheme = Services::WpThemes()->getTheme( $sSlug );
|
26 |
-
$aVulns = $this->filterAgainstVersion( $aVos, $oTheme->get( 'Version' ) );
|
27 |
-
|
28 |
-
if ( !empty( $aVulns ) ) {
|
29 |
-
$oResultsSet = new ResultsSet();
|
30 |
-
foreach ( $aVulns as $oVo ) {
|
31 |
-
$oItem = new ResultItem();
|
32 |
-
$oItem->slug = $sSlug;
|
33 |
-
$oItem->context = 'themes';
|
34 |
-
$oItem->wpvuln_id = $oVo->id;
|
35 |
-
$oItem->wpvuln_vo = $oVo->getRawDataAsArray();
|
36 |
-
$oResultsSet->addItem( $oItem );
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
return $oResultsSet;
|
42 |
-
}
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/WpVulnDb/RetrieveForItem.php
DELETED
@@ -1,158 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Services\Services;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class RetrieveForItem
|
9 |
-
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb
|
10 |
-
*/
|
11 |
-
class RetrieveForItem {
|
12 |
-
|
13 |
-
const URL_API_ROOT = 'https://wpvulndb.com/api/v2/%s/%s';
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
protected $sContext;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
protected $sCurrentVersion;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
protected $sSlug;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @return WpVulnVO[]
|
32 |
-
*/
|
33 |
-
public function retrieve() {
|
34 |
-
$sSlug = $this->getSlug();
|
35 |
-
|
36 |
-
$aD = $this->getCachedVo();
|
37 |
-
if ( empty( $aD ) ) {
|
38 |
-
$sRaw = Services::HttpRequest()->getContent( $this->buildApiUrl() );
|
39 |
-
if ( empty( $sRaw ) ) {
|
40 |
-
$aD = [];
|
41 |
-
}
|
42 |
-
else {
|
43 |
-
$aD = @json_decode( trim( $sRaw ), true );
|
44 |
-
if ( !is_array( $aD ) || !isset( $aD[ $sSlug ] ) || !is_array( $aD[ $sSlug ] ) ) {
|
45 |
-
$aD = [];
|
46 |
-
}
|
47 |
-
else {
|
48 |
-
$aD = $aD[ $sSlug ];
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
$aD[ 'slug' ] = $sSlug;
|
53 |
-
if ( !isset( $aD[ 'vulnerabilities' ] ) || !is_array( $aD[ 'vulnerabilities' ] ) ) {
|
54 |
-
$aD[ 'vulnerabilities' ] = [];
|
55 |
-
}
|
56 |
-
$this->setVoCache( $aD );
|
57 |
-
}
|
58 |
-
|
59 |
-
$aVulns = array_map(
|
60 |
-
function ( $aVulnData ) {
|
61 |
-
$oVo = ( new WpVulnVO() )->applyFromArray( $aVulnData );
|
62 |
-
foreach ( [ 'created_at', 'updated_at', 'published_date' ] as $sKey ) {
|
63 |
-
if ( empty( $oVo->{$sKey} ) || !is_numeric( $oVo->{$sKey} ) ) {
|
64 |
-
$oVo->{$sKey} = strtotime( $oVo->{$sKey} );
|
65 |
-
}
|
66 |
-
}
|
67 |
-
return $oVo;
|
68 |
-
},
|
69 |
-
$aD[ 'vulnerabilities' ]
|
70 |
-
);
|
71 |
-
|
72 |
-
return $aVulns;
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* @return array
|
77 |
-
*/
|
78 |
-
protected function getCachedVo() {
|
79 |
-
$oWp = Services::WpGeneral();
|
80 |
-
$aCacheData = $oWp->getTransient( $this->getVoCacheKey() );
|
81 |
-
if ( !is_array( $aCacheData ) ) {
|
82 |
-
$aCacheData = [];
|
83 |
-
$this->setVoCache( $aCacheData );
|
84 |
-
}
|
85 |
-
return $aCacheData;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* @param array $aCacheData
|
90 |
-
* @return $this
|
91 |
-
*/
|
92 |
-
protected function setVoCache( $aCacheData ) {
|
93 |
-
Services::WpGeneral()->setTransient( $this->getVoCacheKey(), $aCacheData, DAY_IN_SECONDS );
|
94 |
-
return $this;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
private function getVoCacheKey() {
|
101 |
-
return 'wpvulndb-'.md5( __NAMESPACE__.$this->getContext().$this->getSlug() );
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
protected function buildApiUrl() {
|
108 |
-
return sprintf( self::URL_API_ROOT, $this->getContext(), $this->getSlug() );
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @return string
|
113 |
-
*/
|
114 |
-
public function getContext() {
|
115 |
-
return $this->sContext;
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* @return string
|
120 |
-
*/
|
121 |
-
public function getCurrentVersion() {
|
122 |
-
return $this->sCurrentVersion;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @return string
|
127 |
-
*/
|
128 |
-
public function getSlug() {
|
129 |
-
return $this->sSlug;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* @param string $sContext
|
134 |
-
* @return $this
|
135 |
-
*/
|
136 |
-
public function setContext( $sContext ) {
|
137 |
-
$this->sContext = $sContext;
|
138 |
-
return $this;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* @param string $sVersion
|
143 |
-
* @return $this
|
144 |
-
*/
|
145 |
-
public function setCurrentVersion( $sVersion ) {
|
146 |
-
$this->sCurrentVersion = $sVersion;
|
147 |
-
return $this;
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* @param string $sContext
|
152 |
-
* @return $this
|
153 |
-
*/
|
154 |
-
public function setSlug( $sContext ) {
|
155 |
-
$this->sSlug = $sContext;
|
156 |
-
return $this;
|
157 |
-
}
|
158 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/src/Scans/Wpv/WpVulnDb/WpVulnVO.php
CHANGED
@@ -2,87 +2,21 @@
|
|
2 |
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb;
|
4 |
|
5 |
-
use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
6 |
-
|
7 |
/**
|
8 |
* Class WpVulnVO
|
9 |
-
* @property int id
|
10 |
-
* @property string title
|
11 |
-
* @property string vuln_type
|
12 |
-
* @property string fixed_in
|
13 |
-
* @property string references
|
14 |
-
* @property int updated_at
|
15 |
-
* @property int created_at
|
16 |
-
* @property int published_date
|
17 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb
|
18 |
*/
|
19 |
class WpVulnVO {
|
20 |
|
21 |
-
use StdClassAdapter;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param string $sProperty
|
25 |
-
* @return int
|
26 |
-
*/
|
27 |
-
public function getAsTimeStamp( $sProperty ) {
|
28 |
-
return strtotime( $this->{$sProperty} );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @return int
|
33 |
-
* @deprecated
|
34 |
-
*/
|
35 |
-
public function getId() {
|
36 |
-
return $this->id;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @return string
|
41 |
-
* @deprecated
|
42 |
-
*/
|
43 |
-
public function getDateCreated() {
|
44 |
-
return empty( $this->created_at ) ? 0 : strtotime( $this->created_at );
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @return string
|
49 |
-
* @deprecated
|
50 |
-
*/
|
51 |
-
public function getDatePublished() {
|
52 |
-
return empty( $this->published_date ) ? 0 : strtotime( $this->published_date );
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* @return string
|
57 |
-
* @deprecated
|
58 |
-
*/
|
59 |
-
public function getDateUpdated() {
|
60 |
-
return empty( $this->updated_at ) ? 0 : strtotime( $this->updated_at );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @return \stdClass
|
65 |
-
* @deprecated
|
66 |
-
*/
|
67 |
-
public function getReferences() {
|
68 |
-
return $this->getRawProperty( 'references', new \stdClass() );
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @return string
|
73 |
-
* @deprecated
|
74 |
-
*/
|
75 |
-
public function getTitle() {
|
76 |
-
return $this->getRawProperty( 'title', 'No Title Available' );
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* @return string
|
81 |
-
* @deprecated
|
82 |
-
*/
|
83 |
-
public function getType() {
|
84 |
-
return $this->getRawProperty( 'vuln_type', 'No Type Available' );
|
85 |
-
}
|
86 |
|
87 |
/**
|
88 |
* @return string
|
@@ -90,12 +24,4 @@ class WpVulnVO {
|
|
90 |
public function getUrl() {
|
91 |
return sprintf( 'https://wpvulndb.com/vulnerabilities/%s', $this->id );
|
92 |
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* @return int
|
96 |
-
* @deprecated
|
97 |
-
*/
|
98 |
-
public function getVersionFixedIn() {
|
99 |
-
return $this->getRawProperty( 'fixed_in', 'Unknown Fixed Version' );
|
100 |
-
}
|
101 |
}
|
2 |
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class WpVulnVO
|
7 |
+
* @property int $id
|
8 |
+
* @property string $title
|
9 |
+
* @property string $vuln_type
|
10 |
+
* @property string $fixed_in
|
11 |
+
* @property string $references
|
12 |
+
* @property int $updated_at
|
13 |
+
* @property int $created_at
|
14 |
+
* @property int $published_date
|
15 |
* @package FernleafSystems\Wordpress\Plugin\Shield\Scans\Wpv\WpVulnDb
|
16 |
*/
|
17 |
class WpVulnVO {
|
18 |
|
19 |
+
use \FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
* @return string
|
24 |
public function getUrl() {
|
25 |
return sprintf( 'https://wpvulndb.com/vulnerabilities/%s', $this->id );
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
src/lib/src/Tables/Build/AuditTrail.php
CHANGED
@@ -20,14 +20,14 @@ class AuditTrail extends BaseBuild {
|
|
20 |
/** @var Shield\Databases\AuditTrail\Select $oSelector */
|
21 |
$oSelector = $this->getWorkingSelector();
|
22 |
|
23 |
-
$oSelector->
|
24 |
|
25 |
$oIp = Services::IP();
|
26 |
// If an IP is specified, it takes priority
|
27 |
if ( $oIp->isValidIp( $aParams[ 'fIp' ] ) ) {
|
28 |
$oSelector->filterByIp( $aParams[ 'fIp' ] );
|
29 |
}
|
30 |
-
else if ( $aParams[ '
|
31 |
$oSelector->filterByNotIp( $oIp->getRequestIp() );
|
32 |
}
|
33 |
|
@@ -37,8 +37,8 @@ class AuditTrail extends BaseBuild {
|
|
37 |
if ( !empty( $aParams[ 'fDateFrom' ] ) && preg_match( '#^\d{4}-\d{2}-\d{2}$#', $aParams[ 'fDateFrom' ] ) ) {
|
38 |
$aParts = explode( '-', $aParams[ 'fDateFrom' ] );
|
39 |
$sTs = Services::Request()->carbon()
|
40 |
-
|
41 |
-
|
42 |
->timestamp;
|
43 |
$oSelector->filterByCreatedAt( $sTs, '>' );
|
44 |
}
|
@@ -46,9 +46,9 @@ class AuditTrail extends BaseBuild {
|
|
46 |
if ( !empty( $aParams[ 'fDateTo' ] ) && preg_match( '#^\d{4}-\d{2}-\d{2}$#', $aParams[ 'fDateTo' ] ) ) {
|
47 |
$aParts = explode( '-', $aParams[ 'fDateTo' ] );
|
48 |
$sTs = Services::Request()->carbon()
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
->timestamp;
|
53 |
$oSelector->filterByCreatedAt( $sTs, '<' );
|
54 |
}
|
@@ -70,13 +70,13 @@ class AuditTrail extends BaseBuild {
|
|
70 |
*/
|
71 |
protected function getCustomParams() {
|
72 |
return [
|
73 |
-
'fIp'
|
74 |
-
'fUsername'
|
75 |
-
'
|
76 |
-
'fLoggedIn'
|
77 |
-
'
|
78 |
-
'fDateFrom'
|
79 |
-
'fDateTo'
|
80 |
];
|
81 |
}
|
82 |
|
20 |
/** @var Shield\Databases\AuditTrail\Select $oSelector */
|
21 |
$oSelector = $this->getWorkingSelector();
|
22 |
|
23 |
+
$oSelector->filterByEvent( $aParams[ 'fEvent' ] );
|
24 |
|
25 |
$oIp = Services::IP();
|
26 |
// If an IP is specified, it takes priority
|
27 |
if ( $oIp->isValidIp( $aParams[ 'fIp' ] ) ) {
|
28 |
$oSelector->filterByIp( $aParams[ 'fIp' ] );
|
29 |
}
|
30 |
+
else if ( $aParams[ 'fExcludeYou' ] == 'Y' ) {
|
31 |
$oSelector->filterByNotIp( $oIp->getRequestIp() );
|
32 |
}
|
33 |
|
37 |
if ( !empty( $aParams[ 'fDateFrom' ] ) && preg_match( '#^\d{4}-\d{2}-\d{2}$#', $aParams[ 'fDateFrom' ] ) ) {
|
38 |
$aParts = explode( '-', $aParams[ 'fDateFrom' ] );
|
39 |
$sTs = Services::Request()->carbon()
|
40 |
+
->setDate( $aParts[ 0 ], $aParts[ 1 ], $aParts[ 2 ] )
|
41 |
+
->setTime( 0, 0 )
|
42 |
->timestamp;
|
43 |
$oSelector->filterByCreatedAt( $sTs, '>' );
|
44 |
}
|
46 |
if ( !empty( $aParams[ 'fDateTo' ] ) && preg_match( '#^\d{4}-\d{2}-\d{2}$#', $aParams[ 'fDateTo' ] ) ) {
|
47 |
$aParts = explode( '-', $aParams[ 'fDateTo' ] );
|
48 |
$sTs = Services::Request()->carbon()
|
49 |
+
->setDate( $aParts[ 0 ], $aParts[ 1 ], $aParts[ 2 ] )
|
50 |
+
->setTime( 0, 0 )
|
51 |
+
->addDay()
|
52 |
->timestamp;
|
53 |
$oSelector->filterByCreatedAt( $sTs, '<' );
|
54 |
}
|
70 |
*/
|
71 |
protected function getCustomParams() {
|
72 |
return [
|
73 |
+
'fIp' => '',
|
74 |
+
'fUsername' => '',
|
75 |
+
'fEvent' => '',
|
76 |
+
'fLoggedIn' => -1,
|
77 |
+
'fExcludeYou' => '',
|
78 |
+
'fDateFrom' => '',
|
79 |
+
'fDateTo' => '',
|
80 |
];
|
81 |
}
|
82 |
|
src/lib/src/Tables/Build/Ip.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\IPs;
|
|
|
6 |
use FernleafSystems\Wordpress\Plugin\Shield\Tables;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
@@ -38,8 +39,10 @@ class Ip extends BaseBuild {
|
|
38 |
protected function getEntriesFormatted() {
|
39 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
40 |
$oMod = $this->getMod();
|
41 |
-
|
|
|
42 |
|
|
|
43 |
$aEntries = [];
|
44 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
45 |
/** @var IPs\EntryVO $oEntry */
|
@@ -49,7 +52,7 @@ class Ip extends BaseBuild {
|
|
49 |
$aE[ 'last_access_at' ] = $this->formatTimestampField( $oEntry->last_access_at );
|
50 |
$aE[ 'created_at' ] = $this->formatTimestampField( $oEntry->created_at );
|
51 |
$aE[ 'blocked' ] = $bBlocked ? __( 'Yes' ) : __( 'No' );
|
52 |
-
$aE[ 'expires_at' ] = $this->formatTimestampField( $oEntry->last_access_at + $
|
53 |
$aEntries[ $nKey ] = $aE;
|
54 |
}
|
55 |
return $aEntries;
|
@@ -59,8 +62,10 @@ class Ip extends BaseBuild {
|
|
59 |
* @return Tables\Render\IpBlack|Tables\Render\IpWhite
|
60 |
*/
|
61 |
protected function getTableRenderer() {
|
|
|
|
|
62 |
$aLists = $this->getParams()[ 'fLists' ];
|
63 |
-
if ( empty( $aLists ) || in_array(
|
64 |
$sTable = new Tables\Render\IpWhite();
|
65 |
}
|
66 |
else {
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\IPs;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs\Options;
|
7 |
use FernleafSystems\Wordpress\Plugin\Shield\Tables;
|
8 |
use FernleafSystems\Wordpress\Services\Services;
|
9 |
|
39 |
protected function getEntriesFormatted() {
|
40 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
41 |
$oMod = $this->getMod();
|
42 |
+
/** @var Options $oOpts */
|
43 |
+
$oOpts = $oMod->getOptions();
|
44 |
|
45 |
+
$nTransLimit = $oOpts->getOffenseLimit();
|
46 |
$aEntries = [];
|
47 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
48 |
/** @var IPs\EntryVO $oEntry */
|
52 |
$aE[ 'last_access_at' ] = $this->formatTimestampField( $oEntry->last_access_at );
|
53 |
$aE[ 'created_at' ] = $this->formatTimestampField( $oEntry->created_at );
|
54 |
$aE[ 'blocked' ] = $bBlocked ? __( 'Yes' ) : __( 'No' );
|
55 |
+
$aE[ 'expires_at' ] = $this->formatTimestampField( $oEntry->last_access_at + $oOpts->getAutoExpireTime() );
|
56 |
$aEntries[ $nKey ] = $aE;
|
57 |
}
|
58 |
return $aEntries;
|
62 |
* @return Tables\Render\IpBlack|Tables\Render\IpWhite
|
63 |
*/
|
64 |
protected function getTableRenderer() {
|
65 |
+
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
66 |
+
$oMod = $this->getMod();
|
67 |
$aLists = $this->getParams()[ 'fLists' ];
|
68 |
+
if ( empty( $aLists ) || in_array( $oMod::LIST_MANUAL_WHITE, $aLists ) ) {
|
69 |
$sTable = new Tables\Render\IpWhite();
|
70 |
}
|
71 |
else {
|
src/lib/src/Tables/Build/ScanApc.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
/**
|
@@ -19,10 +20,14 @@ class ScanApc extends ScanBase {
|
|
19 |
|
20 |
$oCarbon = Services::Request()->carbon();
|
21 |
|
|
|
|
|
|
|
22 |
$oWpPlugins = Services::WpPlugins();
|
23 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
24 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
25 |
-
|
|
|
26 |
$oPlugin = $oWpPlugins->getPluginAsVo( $oIt->slug );
|
27 |
$aE = $oEntry->getRawDataAsArray();
|
28 |
$aE[ 'plugin' ] = sprintf( '%s (%s)', $oPlugin->Name, $oPlugin->Version );
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
9 |
/**
|
20 |
|
21 |
$oCarbon = Services::Request()->carbon();
|
22 |
|
23 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
24 |
+
->setScanActionVO( $this->getScanActionVO() );
|
25 |
+
|
26 |
$oWpPlugins = Services::WpPlugins();
|
27 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
28 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
29 |
+
/** @var Shield\Scans\Apc\ResultItem $oIt */
|
30 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
31 |
$oPlugin = $oWpPlugins->getPluginAsVo( $oIt->slug );
|
32 |
$aE = $oEntry->getRawDataAsArray();
|
33 |
$aE[ 'plugin' ] = sprintf( '%s (%s)', $oPlugin->Name, $oPlugin->Version );
|
src/lib/src/Tables/Build/ScanBase.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner;
|
|
|
6 |
use FernleafSystems\Wordpress\Plugin\Shield\Tables;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
@@ -12,6 +13,8 @@ use FernleafSystems\Wordpress\Services\Services;
|
|
12 |
*/
|
13 |
class ScanBase extends BaseBuild {
|
14 |
|
|
|
|
|
15 |
/**
|
16 |
* Override this to apply table-specific query filters.
|
17 |
* @return $this
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Scans\Common\ScanActionConsumer;
|
7 |
use FernleafSystems\Wordpress\Plugin\Shield\Tables;
|
8 |
use FernleafSystems\Wordpress\Services\Services;
|
9 |
|
13 |
*/
|
14 |
class ScanBase extends BaseBuild {
|
15 |
|
16 |
+
use ScanActionConsumer;
|
17 |
+
|
18 |
/**
|
19 |
* Override this to apply table-specific query filters.
|
20 |
* @return $this
|
src/lib/src/Tables/Build/ScanMal.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class ScanMal
|
@@ -19,9 +20,13 @@ class ScanMal extends ScanBase {
|
|
19 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
20 |
$oMod = $this->getMod();
|
21 |
$oRepairer = ( new Shield\Scans\Mal\Repair() )->setMod( $oMod );
|
|
|
|
|
|
|
22 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
23 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
24 |
-
|
|
|
25 |
$aE = $oEntry->getRawDataAsArray();
|
26 |
$aE[ 'path' ] = $oIt->path_fragment;
|
27 |
$aE[ 'status' ] = __( 'Potential Malware Detected', 'wp-simple-firewall' );
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
|
8 |
/**
|
9 |
* Class ScanMal
|
20 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
21 |
$oMod = $this->getMod();
|
22 |
$oRepairer = ( new Shield\Scans\Mal\Repair() )->setMod( $oMod );
|
23 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
24 |
+
->setScanActionVO( $this->getScanActionVO() );
|
25 |
+
|
26 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
27 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
28 |
+
/** @var Shield\Scans\Mal\ResultItem $oIt */
|
29 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
30 |
$aE = $oEntry->getRawDataAsArray();
|
31 |
$aE[ 'path' ] = $oIt->path_fragment;
|
32 |
$aE[ 'status' ] = __( 'Potential Malware Detected', 'wp-simple-firewall' );
|
src/lib/src/Tables/Build/ScanPtg.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class ScanPtg
|
@@ -18,9 +19,13 @@ class ScanPtg extends ScanBase {
|
|
18 |
|
19 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
20 |
$oMod = $this->getMod();
|
|
|
|
|
|
|
21 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
22 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
23 |
-
|
|
|
24 |
$aE = $oEntry->getRawDataAsArray();
|
25 |
$aE[ 'path' ] = $oIt->path_fragment;
|
26 |
$aE[ 'status' ] = $oIt->is_different ? __( 'Modified', 'wp-simple-firewall' )
|
@@ -44,9 +49,12 @@ class ScanPtg extends ScanBase {
|
|
44 |
$aParams = $this->getParams();
|
45 |
|
46 |
if ( !empty( $aParams[ 'fSlug' ] ) ) {
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
50 |
|
51 |
foreach ( $aEntries as $key => $oVo ) {
|
52 |
if ( !$oSlugResults->getItemExists( $oVo->hash ) ) {
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
|
8 |
/**
|
9 |
* Class ScanPtg
|
19 |
|
20 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
21 |
$oMod = $this->getMod();
|
22 |
+
|
23 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
24 |
+
->setScanActionVO( $this->getScanActionVO() );
|
25 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
26 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
27 |
+
/** @var Shield\Scans\Ptg\ResultItem $oIt */
|
28 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
29 |
$aE = $oEntry->getRawDataAsArray();
|
30 |
$aE[ 'path' ] = $oIt->path_fragment;
|
31 |
$aE[ 'status' ] = $oIt->is_different ? __( 'Modified', 'wp-simple-firewall' )
|
49 |
$aParams = $this->getParams();
|
50 |
|
51 |
if ( !empty( $aParams[ 'fSlug' ] ) ) {
|
52 |
+
|
53 |
+
/** @var Shield\Scans\Ptg\ResultsSet $oSlugResults */
|
54 |
+
$oSlugResults = ( new Scan\Results\ConvertBetweenTypes() )
|
55 |
+
->setScanActionVO( ( new Scan\ScanActionFromSlug() )->getAction( 'ptg' ) )
|
56 |
+
->fromVOsToResultsSet( $aEntries );
|
57 |
+
$oSlugResults = $oSlugResults->getResultsSetForSlug( $aParams[ 'fSlug' ] );
|
58 |
|
59 |
foreach ( $aEntries as $key => $oVo ) {
|
60 |
if ( !$oSlugResults->getItemExists( $oVo->hash ) ) {
|
src/lib/src/Tables/Build/ScanUfc.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class ScanUfc
|
@@ -18,9 +19,13 @@ class ScanUfc extends ScanBase {
|
|
18 |
|
19 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
20 |
$oMod = $this->getMod();
|
|
|
|
|
|
|
21 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
22 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
23 |
-
|
|
|
24 |
$aE = $oEntry->getRawDataAsArray();
|
25 |
$aE[ 'path' ] = $oIt->path_fragment;
|
26 |
$aE[ 'status' ] = __( 'Unrecognised', 'wp-simple-firewall' );
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
|
8 |
/**
|
9 |
* Class ScanUfc
|
19 |
|
20 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
21 |
$oMod = $this->getMod();
|
22 |
+
|
23 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
24 |
+
->setScanActionVO( $this->getScanActionVO() );
|
25 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
26 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
27 |
+
/** @var Shield\Scans\Ufc\ResultItem $oIt */
|
28 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
29 |
$aE = $oEntry->getRawDataAsArray();
|
30 |
$aE[ 'path' ] = $oIt->path_fragment;
|
31 |
$aE[ 'status' ] = __( 'Unrecognised', 'wp-simple-firewall' );
|
src/lib/src/Tables/Build/ScanWcf.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class ScanWcf
|
@@ -18,9 +19,12 @@ class ScanWcf extends ScanBase {
|
|
18 |
|
19 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
20 |
$oMod = $this->getMod();
|
|
|
|
|
21 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
22 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
23 |
-
|
|
|
24 |
$aE = $oEntry->getRawDataAsArray();
|
25 |
$aE[ 'path' ] = $oIt->path_fragment;
|
26 |
$aE[ 'status' ] = $oIt->is_checksumfail ? __( 'Modified', 'wp-simple-firewall' )
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
|
8 |
/**
|
9 |
* Class ScanWcf
|
19 |
|
20 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
21 |
$oMod = $this->getMod();
|
22 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
23 |
+
->setScanActionVO( $this->getScanActionVO() );
|
24 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
25 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
26 |
+
/** @var Shield\Scans\Wcf\ResultItem $oIt */
|
27 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
28 |
$aE = $oEntry->getRawDataAsArray();
|
29 |
$aE[ 'path' ] = $oIt->path_fragment;
|
30 |
$aE[ 'status' ] = $oIt->is_checksumfail ? __( 'Modified', 'wp-simple-firewall' )
|
src/lib/src/Tables/Build/ScanWpv.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
/**
|
@@ -24,9 +25,12 @@ class ScanWpv extends ScanBase {
|
|
24 |
$oWpPlugins->getUpdates( true );
|
25 |
$oWpThemes->getUpdates( true );
|
26 |
|
|
|
|
|
27 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
28 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
29 |
-
|
|
|
30 |
$aE = $oEntry->getRawDataAsArray();
|
31 |
if ( $oIt->context == 'plugins' ) {
|
32 |
$oAsset = $oWpPlugins->getPluginAsVo( $oIt->slug );
|
3 |
namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
9 |
/**
|
25 |
$oWpPlugins->getUpdates( true );
|
26 |
$oWpThemes->getUpdates( true );
|
27 |
|
28 |
+
$oConverter = ( new Scan\Results\ConvertBetweenTypes() )
|
29 |
+
->setScanActionVO( $this->getScanActionVO() );
|
30 |
foreach ( $this->getEntriesRaw() as $nKey => $oEntry ) {
|
31 |
/** @var Shield\Databases\Scanner\EntryVO $oEntry */
|
32 |
+
/** @var Shield\Scans\Wpv\ResultItem $oIt */
|
33 |
+
$oIt = $oConverter->convertVoToResultItem( $oEntry );
|
34 |
$aE = $oEntry->getRawDataAsArray();
|
35 |
if ( $oIt->context == 'plugins' ) {
|
36 |
$oAsset = $oWpPlugins->getPluginAsVo( $oIt->slug );
|
src/lib/src/Tables/Build/Traffic.php
CHANGED
@@ -27,7 +27,7 @@ class Traffic extends BaseBuild {
|
|
27 |
if ( $oIp->isValidIp( $aParams[ 'fIp' ] ) ) {
|
28 |
$oSelector->filterByIp( inet_pton( $aParams[ 'fIp' ] ) );
|
29 |
}
|
30 |
-
else if ( $aParams[ '
|
31 |
$oSelector->filterByNotIp( inet_pton( $oIp->getRequestIp() ) );
|
32 |
}
|
33 |
|
@@ -58,13 +58,13 @@ class Traffic extends BaseBuild {
|
|
58 |
*/
|
59 |
protected function getCustomParams() {
|
60 |
return [
|
61 |
-
'fIp'
|
62 |
-
'fUsername'
|
63 |
-
'fLoggedIn'
|
64 |
-
'fPath'
|
65 |
-
'fOffense'
|
66 |
-
'fResponse'
|
67 |
-
'
|
68 |
];
|
69 |
}
|
70 |
|
27 |
if ( $oIp->isValidIp( $aParams[ 'fIp' ] ) ) {
|
28 |
$oSelector->filterByIp( inet_pton( $aParams[ 'fIp' ] ) );
|
29 |
}
|
30 |
+
else if ( $aParams[ 'fExcludeYou' ] == 'Y' ) {
|
31 |
$oSelector->filterByNotIp( inet_pton( $oIp->getRequestIp() ) );
|
32 |
}
|
33 |
|
58 |
*/
|
59 |
protected function getCustomParams() {
|
60 |
return [
|
61 |
+
'fIp' => '',
|
62 |
+
'fUsername' => '',
|
63 |
+
'fLoggedIn' => -1,
|
64 |
+
'fPath' => '',
|
65 |
+
'fOffense' => -1,
|
66 |
+
'fResponse' => '',
|
67 |
+
'fExcludeYou' => '',
|
68 |
];
|
69 |
}
|
70 |
|
src/lib/vendor/composer/autoload_classmap.php
CHANGED
@@ -102,6 +102,13 @@ return array(
|
|
102 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Insert' => $baseDir . '/src/Databases/IPs/Insert.php',
|
103 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Select' => $baseDir . '/src/Databases/IPs/Select.php',
|
104 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Update' => $baseDir . '/src/Databases/IPs/Update.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Delete' => $baseDir . '/src/Databases/Scanner/Delete.php',
|
106 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\EntryVO' => $baseDir . '/src/Databases/Scanner/EntryVO.php',
|
107 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Handler' => $baseDir . '/src/Databases/Scanner/Handler.php',
|
@@ -168,6 +175,26 @@ return array(
|
|
168 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\GeoIp\\Lookup' => $baseDir . '/src/Modules/GeoIp/Lookup.php',
|
169 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\AjaxHandler' => $baseDir . '/src/Modules/HackGuard/AjaxHandler.php',
|
170 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Options' => $baseDir . '/src/Modules/HackGuard/Options.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => $baseDir . '/src/Modules/HackGuard/Strings.php',
|
172 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => $baseDir . '/src/Modules/Headers/Options.php',
|
173 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => $baseDir . '/src/Modules/Headers/Strings.php',
|
@@ -226,16 +253,13 @@ return array(
|
|
226 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => $baseDir . '/src/Modules/UserManagement/Suspend/Suspended.php',
|
227 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => $baseDir . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
|
228 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => $baseDir . '/src/Scans/Apc/BuildScanAction.php',
|
229 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertResultsToVos' => $baseDir . '/src/Scans/Apc/ConvertResultsToVos.php',
|
230 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => $baseDir . '/src/Scans/Apc/ConvertVosToResults.php',
|
231 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => $baseDir . '/src/Scans/Apc/PluginScanner.php',
|
232 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultItem' => $baseDir . '/src/Scans/Apc/ResultItem.php',
|
233 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultsSet' => $baseDir . '/src/Scans/Apc/ResultsSet.php',
|
234 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\Scan' => $baseDir . '/src/Scans/Apc/Scan.php',
|
235 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ScanActionVO' => $baseDir . '/src/Scans/Apc/ScanActionVO.php',
|
236 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ActionStore' => $baseDir . '/src/Scans/Base/ActionStore.php',
|
237 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseBuildScanAction' => $baseDir . '/src/Scans/Base/BaseBuildScanAction.php',
|
238 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertResultsToVos' => $baseDir . '/src/Scans/Base/BaseConvertResultsToVos.php',
|
239 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertVosToResults' => $baseDir . '/src/Scans/Base/BaseConvertVosToResults.php',
|
240 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseMergeItems' => $baseDir . '/src/Scans/Base/BaseMergeItems.php',
|
241 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseRepair' => $baseDir . '/src/Scans/Base/BaseRepair.php',
|
@@ -247,14 +271,8 @@ return array(
|
|
247 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileMapScan' => $baseDir . '/src/Scans/Base/Files/BaseFileMapScan.php',
|
248 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileScanner' => $baseDir . '/src/Scans/Base/Files/BaseFileScanner.php',
|
249 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseScanFromFileMap' => $baseDir . '/src/Scans/Base/Files/BaseScanFromFileMap.php',
|
250 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScanActionQuery' => $baseDir . '/src/Scans/Base/ScanActionQuery.php',
|
251 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScanResults\\Clean' => $baseDir . '/src/Scans/Base/ScanResults/Clean.php',
|
252 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfile' => $baseDir . '/src/Scans/Base/ScannerProfile.php',
|
253 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfileConsumer' => $baseDir . '/src/Scans/Base/ScannerProfileConsumer.php',
|
254 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\AsyncScansController' => $baseDir . '/src/Scans/Common/AsyncScansController.php',
|
255 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanActionConsumer' => $baseDir . '/src/Scans/Common/ScanActionConsumer.php',
|
256 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanLauncher' => $baseDir . '/src/Scans/Common/ScanLauncher.php',
|
257 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScansJobVO' => $baseDir . '/src/Scans/Common/ScansJobVO.php',
|
258 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromApi' => $baseDir . '/src/Scans/Helpers/BuildHashesFromApi.php',
|
259 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromDir' => $baseDir . '/src/Scans/Helpers/BuildHashesFromDir.php',
|
260 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\CopyResultsSets' => $baseDir . '/src/Scans/Helpers/CopyResultsSets.php',
|
@@ -264,8 +282,6 @@ return array(
|
|
264 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\WpCoreFile' => $baseDir . '/src/Scans/Helpers/WpCoreFile.php',
|
265 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildFileMap' => $baseDir . '/src/Scans/Mal/BuildFileMap.php',
|
266 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildScanAction' => $baseDir . '/src/Scans/Mal/BuildScanAction.php',
|
267 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ConvertResultsToVos' => $baseDir . '/src/Scans/Mal/ConvertResultsToVos.php',
|
268 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ConvertVosToResults' => $baseDir . '/src/Scans/Mal/ConvertVosToResults.php',
|
269 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\FileScanner' => $baseDir . '/src/Scans/Mal/FileScanner.php',
|
270 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\Repair' => $baseDir . '/src/Scans/Mal/Repair.php',
|
271 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ResultItem' => $baseDir . '/src/Scans/Mal/ResultItem.php',
|
@@ -274,8 +290,6 @@ return array(
|
|
274 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanActionVO' => $baseDir . '/src/Scans/Mal/ScanActionVO.php',
|
275 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanFromFileMap' => $baseDir . '/src/Scans/Mal/ScanFromFileMap.php',
|
276 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\BuildScanAction' => $baseDir . '/src/Scans/Ptg/BuildScanAction.php',
|
277 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ConvertResultsToVos' => $baseDir . '/src/Scans/Ptg/ConvertResultsToVos.php',
|
278 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ConvertVosToResults' => $baseDir . '/src/Scans/Ptg/ConvertVosToResults.php',
|
279 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\DiffHashes' => $baseDir . '/src/Scans/Ptg/DiffHashes.php',
|
280 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ItemScanner' => $baseDir . '/src/Scans/Ptg/ItemScanner.php',
|
281 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\PluginWporgScanner' => $baseDir . '/src/Scans/Ptg/PluginWporgScanner.php',
|
@@ -298,7 +312,6 @@ return array(
|
|
298 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Realtime\\Files\\Verify' => $baseDir . '/src/Scans/Realtime/Files/Verify.php',
|
299 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildFileMap' => $baseDir . '/src/Scans/Ufc/BuildFileMap.php',
|
300 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildScanAction' => $baseDir . '/src/Scans/Ufc/BuildScanAction.php',
|
301 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertResultsToVos' => $baseDir . '/src/Scans/Ufc/ConvertResultsToVos.php',
|
302 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertVosToResults' => $baseDir . '/src/Scans/Ufc/ConvertVosToResults.php',
|
303 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\FileScanner' => $baseDir . '/src/Scans/Ufc/FileScanner.php',
|
304 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\Repair' => $baseDir . '/src/Scans/Ufc/Repair.php',
|
@@ -309,7 +322,6 @@ return array(
|
|
309 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ScanFromFileMap' => $baseDir . '/src/Scans/Ufc/ScanFromFileMap.php',
|
310 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildFileMap' => $baseDir . '/src/Scans/Wcf/BuildFileMap.php',
|
311 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildScanAction' => $baseDir . '/src/Scans/Wcf/BuildScanAction.php',
|
312 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertResultsToVos' => $baseDir . '/src/Scans/Wcf/ConvertResultsToVos.php',
|
313 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertVosToResults' => $baseDir . '/src/Scans/Wcf/ConvertVosToResults.php',
|
314 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\FileScanner' => $baseDir . '/src/Scans/Wcf/FileScanner.php',
|
315 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\Repair' => $baseDir . '/src/Scans/Wcf/Repair.php',
|
@@ -319,18 +331,12 @@ return array(
|
|
319 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanActionVO' => $baseDir . '/src/Scans/Wcf/ScanActionVO.php',
|
320 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanFromFileMap' => $baseDir . '/src/Scans/Wcf/ScanFromFileMap.php',
|
321 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\BuildScanAction' => $baseDir . '/src/Scans/Wpv/BuildScanAction.php',
|
322 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertResultsToVos' => $baseDir . '/src/Scans/Wpv/ConvertResultsToVos.php',
|
323 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertVosToResults' => $baseDir . '/src/Scans/Wpv/ConvertVosToResults.php',
|
324 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ItemScanner' => $baseDir . '/src/Scans/Wpv/ItemScanner.php',
|
325 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\PluginScanner' => $baseDir . '/src/Scans/Wpv/PluginScanner.php',
|
326 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Repair' => $baseDir . '/src/Scans/Wpv/Repair.php',
|
327 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultItem' => $baseDir . '/src/Scans/Wpv/ResultItem.php',
|
328 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultsSet' => $baseDir . '/src/Scans/Wpv/ResultsSet.php',
|
329 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scan' => $baseDir . '/src/Scans/Wpv/Scan.php',
|
330 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ScanActionVO' => $baseDir . '/src/Scans/Wpv/ScanActionVO.php',
|
331 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scanner' => $baseDir . '/src/Scans/Wpv/Scanner.php',
|
332 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ThemeScanner' => $baseDir . '/src/Scans/Wpv/ThemeScanner.php',
|
333 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\RetrieveForItem' => $baseDir . '/src/Scans/Wpv/WpVulnDb/RetrieveForItem.php',
|
334 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\WpVulnVO' => $baseDir . '/src/Scans/Wpv/WpVulnDb/WpVulnVO.php',
|
335 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AdminNotes' => $baseDir . '/src/Tables/Build/AdminNotes.php',
|
336 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AuditTrail' => $baseDir . '/src/Tables/Build/AuditTrail.php',
|
@@ -413,6 +419,23 @@ return array(
|
|
413 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Html' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Html.php',
|
414 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpRequest' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/HttpRequest.php',
|
415 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpUtil' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/HttpUtil.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\IpUtils' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/IpUtils.php',
|
417 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Iterators\\WpUserIterator' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Iterators/WpUserIterator.php',
|
418 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Licenses\\EddLicenseVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Licenses/EddLicenseVO.php',
|
@@ -429,12 +452,6 @@ return array(
|
|
429 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Files' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Files.php',
|
430 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Repo' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Repo.php',
|
431 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Versions' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Versions.php',
|
432 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Base.php',
|
433 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\ClassicPress' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/ClassicPress.php',
|
434 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\HashesRequestVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/HashesRequestVO.php',
|
435 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Ping' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Ping.php',
|
436 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Plugin' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Plugin.php',
|
437 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\WordPress' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/WordPress.php',
|
438 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Api' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php',
|
439 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Base.php',
|
440 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Download' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Download.php',
|
@@ -455,7 +472,6 @@ return array(
|
|
455 |
'ICWP_Plugin_Upgrader' => $baseDir . '/../common/icwp-wpupgrades.php',
|
456 |
'ICWP_Theme_Upgrader' => $baseDir . '/../common/icwp-wpupgrades.php',
|
457 |
'ICWP_Upgrader_Skin' => $baseDir . '/../common/icwp-wpupgrades.php',
|
458 |
-
'ICWP_WPSF_AuditTrail_Auditor_Base' => $baseDir . '/../processors/audit_trail_auditor_base.php',
|
459 |
'ICWP_WPSF_BaseDbProcessor' => $baseDir . '/../processors/basedb.php',
|
460 |
'ICWP_WPSF_DataProcessor' => $baseDir . '/../common/icwp-data.php',
|
461 |
'ICWP_WPSF_Edd' => $baseDir . '/../common/icwp-edd.php',
|
@@ -488,23 +504,13 @@ return array(
|
|
488 |
'ICWP_WPSF_Processor_AuditTrail' => $baseDir . '/../processors/audit_trail.php',
|
489 |
'ICWP_WPSF_Processor_AuditTrail_Auditor' => $baseDir . '/../processors/audit_trail_auditor.php',
|
490 |
'ICWP_WPSF_Processor_AuditTrail_ChangeTracking' => $baseDir . '/../processors/audit_trail_changetracking.php',
|
491 |
-
'ICWP_WPSF_Processor_AuditTrail_Emails' => $baseDir . '/../processors/audit_trail_emails.php',
|
492 |
-
'ICWP_WPSF_Processor_AuditTrail_Plugins' => $baseDir . '/../processors/audit_trail_plugins.php',
|
493 |
-
'ICWP_WPSF_Processor_AuditTrail_Posts' => $baseDir . '/../processors/audit_trail_posts.php',
|
494 |
-
'ICWP_WPSF_Processor_AuditTrail_Themes' => $baseDir . '/../processors/audit_trail_themes.php',
|
495 |
-
'ICWP_WPSF_Processor_AuditTrail_Users' => $baseDir . '/../processors/audit_trail_users.php',
|
496 |
-
'ICWP_WPSF_Processor_AuditTrail_Wordpress' => $baseDir . '/../processors/audit_trail_wordpress.php',
|
497 |
-
'ICWP_WPSF_Processor_AuditTrail_Wpsf' => $baseDir . '/../processors/audit_trail_wpsf.php',
|
498 |
'ICWP_WPSF_Processor_Autoupdates' => $baseDir . '/../processors/autoupdates.php',
|
499 |
'ICWP_WPSF_Processor_Base' => $baseDir . '/../processors/base.php',
|
500 |
'ICWP_WPSF_Processor_BasePlugin' => $baseDir . '/../processors/base_plugin.php',
|
501 |
'ICWP_WPSF_Processor_BaseWpsf' => $baseDir . '/../processors/base_wpsf.php',
|
502 |
'ICWP_WPSF_Processor_CommentsFilter' => $baseDir . '/../processors/comments_filter.php',
|
503 |
-
'ICWP_WPSF_Processor_CommentsFilter_AntiBotSpam' => $baseDir . '/../processors/commentsfilter_antibotspam.php',
|
504 |
-
'ICWP_WPSF_Processor_CommentsFilter_Base' => $baseDir . '/../processors/base_commentsfilter.php',
|
505 |
'ICWP_WPSF_Processor_CommentsFilter_BotSpam' => $baseDir . '/../processors/commentsfilter_botspam.php',
|
506 |
'ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha' => $baseDir . '/../processors/commentsfilter_googlerecaptcha.php',
|
507 |
-
'ICWP_WPSF_Processor_CommentsFilter_HumanSpam' => $baseDir . '/../processors/commentsfilter_humanspam.php',
|
508 |
'ICWP_WPSF_Processor_Email' => $baseDir . '/../processors/email.php',
|
509 |
'ICWP_WPSF_Processor_Events' => $baseDir . '/../processors/events.php',
|
510 |
'ICWP_WPSF_Processor_Firewall' => $baseDir . '/../processors/firewall.php',
|
@@ -538,18 +544,12 @@ return array(
|
|
538 |
'ICWP_WPSF_Processor_LoginProtect_WpLogin' => $baseDir . '/../processors/loginprotect_wplogin.php',
|
539 |
'ICWP_WPSF_Processor_LoginProtect_Yubikey' => $baseDir . '/../processors/loginprotect_intentprovider_yubikey.php',
|
540 |
'ICWP_WPSF_Processor_Plugin' => $baseDir . '/../processors/plugin.php',
|
541 |
-
'ICWP_WPSF_Processor_Plugin_Badge' => $baseDir . '/../processors/plugin_badge.php',
|
542 |
-
'ICWP_WPSF_Processor_Plugin_BadgeWidget' => $baseDir . '/../processors/plugin_badgewidget.php',
|
543 |
'ICWP_WPSF_Processor_Plugin_CronDaily' => $baseDir . '/../processors/plugin_crondaily.php',
|
544 |
'ICWP_WPSF_Processor_Plugin_CronHourly' => $baseDir . '/../processors/plugin_cronhourly.php',
|
545 |
-
'ICWP_WPSF_Processor_Plugin_Geoip' => $baseDir . '/../processors/plugin_geoip.php',
|
546 |
'ICWP_WPSF_Processor_Plugin_ImportExport' => $baseDir . '/../processors/plugin_importexport.php',
|
547 |
-
'ICWP_WPSF_Processor_Plugin_Notes' => $baseDir . '/../processors/plugin_notes.php',
|
548 |
'ICWP_WPSF_Processor_Plugin_Tracking' => $baseDir . '/../processors/plugin_tracking.php',
|
549 |
'ICWP_WPSF_Processor_ScanBase' => $baseDir . '/../processors/hackprotect_scan_base.php',
|
550 |
'ICWP_WPSF_Processor_Sessions' => $baseDir . '/../processors/sessions.php',
|
551 |
-
'ICWP_WPSF_Processor_Statistics' => $baseDir . '/../processors/statistics.php',
|
552 |
-
'ICWP_WPSF_Processor_Statistics_Tally' => $baseDir . '/../processors/statistics_tally.php',
|
553 |
'ICWP_WPSF_Processor_Traffic' => $baseDir . '/../processors/traffic.php',
|
554 |
'ICWP_WPSF_Processor_TrafficLogger' => $baseDir . '/../processors/traffic_logger.php',
|
555 |
'ICWP_WPSF_Processor_UserManagement' => $baseDir . '/../processors/user_management.php',
|
@@ -557,7 +557,6 @@ return array(
|
|
557 |
'ICWP_WPSF_Processor_UserManagement_Sessions' => $baseDir . '/../processors/usermanagement_sessions.php',
|
558 |
'ICWP_WPSF_Processor_UserManagement_Suspend' => $baseDir . '/../processors/usermanagement_suspend.php',
|
559 |
'ICWP_WPSF_Query_Statistics_Base' => $baseDir . '/../query/base/statistics_base.php',
|
560 |
-
'ICWP_WPSF_Query_Statistics_Consolidation' => $baseDir . '/../query/statistics/consolidation.php',
|
561 |
'ICWP_WPSF_Query_Statistics_Reporting' => $baseDir . '/../query/statistics/reporting.php',
|
562 |
'ICWP_WPSF_Render' => $baseDir . '/../common/icwp-render.php',
|
563 |
'ICWP_WPSF_Request' => $baseDir . '/../common/icwp-request.php',
|
102 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Insert' => $baseDir . '/src/Databases/IPs/Insert.php',
|
103 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Select' => $baseDir . '/src/Databases/IPs/Select.php',
|
104 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Update' => $baseDir . '/src/Databases/IPs/Update.php',
|
105 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Common' => $baseDir . '/src/Databases/ScanQueue/Common.php',
|
106 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Delete' => $baseDir . '/src/Databases/ScanQueue/Delete.php',
|
107 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\EntryVO' => $baseDir . '/src/Databases/ScanQueue/EntryVO.php',
|
108 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Handler' => $baseDir . '/src/Databases/ScanQueue/Handler.php',
|
109 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Insert' => $baseDir . '/src/Databases/ScanQueue/Insert.php',
|
110 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Select' => $baseDir . '/src/Databases/ScanQueue/Select.php',
|
111 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Update' => $baseDir . '/src/Databases/ScanQueue/Update.php',
|
112 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Delete' => $baseDir . '/src/Databases/Scanner/Delete.php',
|
113 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\EntryVO' => $baseDir . '/src/Databases/Scanner/EntryVO.php',
|
114 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Handler' => $baseDir . '/src/Databases/Scanner/Handler.php',
|
175 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\GeoIp\\Lookup' => $baseDir . '/src/Modules/GeoIp/Lookup.php',
|
176 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\AjaxHandler' => $baseDir . '/src/Modules/HackGuard/AjaxHandler.php',
|
177 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Options' => $baseDir . '/src/Modules/HackGuard/Options.php',
|
178 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\BuildScanAction' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/BuildScanAction.php',
|
179 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Build\\QueueBuilder' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilder.php',
|
180 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Build\\QueueBuilderConsumer' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilderConsumer.php',
|
181 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\CollateResults' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/CollateResults.php',
|
182 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\CompleteQueue' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/CompleteQueue.php',
|
183 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Controller' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/Controller.php',
|
184 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ConvertBetweenTypes' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/ConvertBetweenTypes.php',
|
185 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\IsScanEnqueued' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/IsScanEnqueued.php',
|
186 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\QueueProcessor' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/QueueProcessor.php',
|
187 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\QueueProcessorConsumer' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/QueueProcessorConsumer.php',
|
188 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanEnqueue' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/ScanEnqueue.php',
|
189 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanExecute' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/ScanExecute.php',
|
190 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanInitiate' => $baseDir . '/src/Modules/HackGuard/Scan/Queue/ScanInitiate.php',
|
191 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\Clean' => $baseDir . '/src/Modules/HackGuard/Scan/Results/Clean.php',
|
192 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ConvertBetweenTypes' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ConvertBetweenTypes.php',
|
193 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsDelete' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsDelete.php',
|
194 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsRetrieve' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsRetrieve.php',
|
195 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsStore' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsStore.php',
|
196 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => $baseDir . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
|
197 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => $baseDir . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
|
198 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => $baseDir . '/src/Modules/HackGuard/Strings.php',
|
199 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => $baseDir . '/src/Modules/Headers/Options.php',
|
200 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => $baseDir . '/src/Modules/Headers/Strings.php',
|
253 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => $baseDir . '/src/Modules/UserManagement/Suspend/Suspended.php',
|
254 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => $baseDir . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
|
255 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => $baseDir . '/src/Scans/Apc/BuildScanAction.php',
|
|
|
256 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => $baseDir . '/src/Scans/Apc/ConvertVosToResults.php',
|
257 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => $baseDir . '/src/Scans/Apc/PluginScanner.php',
|
258 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultItem' => $baseDir . '/src/Scans/Apc/ResultItem.php',
|
259 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultsSet' => $baseDir . '/src/Scans/Apc/ResultsSet.php',
|
260 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\Scan' => $baseDir . '/src/Scans/Apc/Scan.php',
|
261 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ScanActionVO' => $baseDir . '/src/Scans/Apc/ScanActionVO.php',
|
|
|
262 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseBuildScanAction' => $baseDir . '/src/Scans/Base/BaseBuildScanAction.php',
|
|
|
263 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertVosToResults' => $baseDir . '/src/Scans/Base/BaseConvertVosToResults.php',
|
264 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseMergeItems' => $baseDir . '/src/Scans/Base/BaseMergeItems.php',
|
265 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseRepair' => $baseDir . '/src/Scans/Base/BaseRepair.php',
|
271 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileMapScan' => $baseDir . '/src/Scans/Base/Files/BaseFileMapScan.php',
|
272 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileScanner' => $baseDir . '/src/Scans/Base/Files/BaseFileScanner.php',
|
273 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseScanFromFileMap' => $baseDir . '/src/Scans/Base/Files/BaseScanFromFileMap.php',
|
|
|
|
|
274 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfile' => $baseDir . '/src/Scans/Base/ScannerProfile.php',
|
|
|
|
|
275 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanActionConsumer' => $baseDir . '/src/Scans/Common/ScanActionConsumer.php',
|
|
|
|
|
276 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromApi' => $baseDir . '/src/Scans/Helpers/BuildHashesFromApi.php',
|
277 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromDir' => $baseDir . '/src/Scans/Helpers/BuildHashesFromDir.php',
|
278 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\CopyResultsSets' => $baseDir . '/src/Scans/Helpers/CopyResultsSets.php',
|
282 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\WpCoreFile' => $baseDir . '/src/Scans/Helpers/WpCoreFile.php',
|
283 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildFileMap' => $baseDir . '/src/Scans/Mal/BuildFileMap.php',
|
284 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildScanAction' => $baseDir . '/src/Scans/Mal/BuildScanAction.php',
|
|
|
|
|
285 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\FileScanner' => $baseDir . '/src/Scans/Mal/FileScanner.php',
|
286 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\Repair' => $baseDir . '/src/Scans/Mal/Repair.php',
|
287 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ResultItem' => $baseDir . '/src/Scans/Mal/ResultItem.php',
|
290 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanActionVO' => $baseDir . '/src/Scans/Mal/ScanActionVO.php',
|
291 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanFromFileMap' => $baseDir . '/src/Scans/Mal/ScanFromFileMap.php',
|
292 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\BuildScanAction' => $baseDir . '/src/Scans/Ptg/BuildScanAction.php',
|
|
|
|
|
293 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\DiffHashes' => $baseDir . '/src/Scans/Ptg/DiffHashes.php',
|
294 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ItemScanner' => $baseDir . '/src/Scans/Ptg/ItemScanner.php',
|
295 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\PluginWporgScanner' => $baseDir . '/src/Scans/Ptg/PluginWporgScanner.php',
|
312 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Realtime\\Files\\Verify' => $baseDir . '/src/Scans/Realtime/Files/Verify.php',
|
313 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildFileMap' => $baseDir . '/src/Scans/Ufc/BuildFileMap.php',
|
314 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildScanAction' => $baseDir . '/src/Scans/Ufc/BuildScanAction.php',
|
|
|
315 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertVosToResults' => $baseDir . '/src/Scans/Ufc/ConvertVosToResults.php',
|
316 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\FileScanner' => $baseDir . '/src/Scans/Ufc/FileScanner.php',
|
317 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\Repair' => $baseDir . '/src/Scans/Ufc/Repair.php',
|
322 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ScanFromFileMap' => $baseDir . '/src/Scans/Ufc/ScanFromFileMap.php',
|
323 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildFileMap' => $baseDir . '/src/Scans/Wcf/BuildFileMap.php',
|
324 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildScanAction' => $baseDir . '/src/Scans/Wcf/BuildScanAction.php',
|
|
|
325 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertVosToResults' => $baseDir . '/src/Scans/Wcf/ConvertVosToResults.php',
|
326 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\FileScanner' => $baseDir . '/src/Scans/Wcf/FileScanner.php',
|
327 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\Repair' => $baseDir . '/src/Scans/Wcf/Repair.php',
|
331 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanActionVO' => $baseDir . '/src/Scans/Wcf/ScanActionVO.php',
|
332 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanFromFileMap' => $baseDir . '/src/Scans/Wcf/ScanFromFileMap.php',
|
333 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\BuildScanAction' => $baseDir . '/src/Scans/Wpv/BuildScanAction.php',
|
|
|
334 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertVosToResults' => $baseDir . '/src/Scans/Wpv/ConvertVosToResults.php',
|
|
|
|
|
335 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Repair' => $baseDir . '/src/Scans/Wpv/Repair.php',
|
336 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultItem' => $baseDir . '/src/Scans/Wpv/ResultItem.php',
|
337 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultsSet' => $baseDir . '/src/Scans/Wpv/ResultsSet.php',
|
338 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scan' => $baseDir . '/src/Scans/Wpv/Scan.php',
|
339 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ScanActionVO' => $baseDir . '/src/Scans/Wpv/ScanActionVO.php',
|
|
|
|
|
|
|
340 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\WpVulnVO' => $baseDir . '/src/Scans/Wpv/WpVulnDb/WpVulnVO.php',
|
341 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AdminNotes' => $baseDir . '/src/Tables/Build/AdminNotes.php',
|
342 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AuditTrail' => $baseDir . '/src/Tables/Build/AuditTrail.php',
|
419 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Html' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Html.php',
|
420 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpRequest' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/HttpRequest.php',
|
421 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpUtil' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/HttpUtil.php',
|
422 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\RequestVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/RequestVO.php',
|
423 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\ApiBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiBase.php',
|
424 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\ApiPing' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiPing.php',
|
425 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Base.php',
|
426 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\ClassicPress' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/ClassicPress.php',
|
427 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\Plugin' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Plugin.php',
|
428 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\RequestVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/RequestVO.php',
|
429 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\WordPress' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/WordPress.php',
|
430 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/Base.php',
|
431 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\RequestVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/RequestVO.php',
|
432 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\WhitelistRetrieve' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/WhitelistRetrieve.php',
|
433 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Base.php',
|
434 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\BasePluginTheme' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/BasePluginTheme.php',
|
435 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Plugin' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Plugin.php',
|
436 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\RequestVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/RequestVO.php',
|
437 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Theme' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Theme.php',
|
438 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\WordPress' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/WordPress.php',
|
439 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\IpUtils' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/IpUtils.php',
|
440 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Iterators\\WpUserIterator' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Iterators/WpUserIterator.php',
|
441 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Licenses\\EddLicenseVO' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Licenses/EddLicenseVO.php',
|
452 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Files' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Files.php',
|
453 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Repo' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Repo.php',
|
454 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Versions' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Versions.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Api' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php',
|
456 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Base' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Base.php',
|
457 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Download' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Download.php',
|
472 |
'ICWP_Plugin_Upgrader' => $baseDir . '/../common/icwp-wpupgrades.php',
|
473 |
'ICWP_Theme_Upgrader' => $baseDir . '/../common/icwp-wpupgrades.php',
|
474 |
'ICWP_Upgrader_Skin' => $baseDir . '/../common/icwp-wpupgrades.php',
|
|
|
475 |
'ICWP_WPSF_BaseDbProcessor' => $baseDir . '/../processors/basedb.php',
|
476 |
'ICWP_WPSF_DataProcessor' => $baseDir . '/../common/icwp-data.php',
|
477 |
'ICWP_WPSF_Edd' => $baseDir . '/../common/icwp-edd.php',
|
504 |
'ICWP_WPSF_Processor_AuditTrail' => $baseDir . '/../processors/audit_trail.php',
|
505 |
'ICWP_WPSF_Processor_AuditTrail_Auditor' => $baseDir . '/../processors/audit_trail_auditor.php',
|
506 |
'ICWP_WPSF_Processor_AuditTrail_ChangeTracking' => $baseDir . '/../processors/audit_trail_changetracking.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
'ICWP_WPSF_Processor_Autoupdates' => $baseDir . '/../processors/autoupdates.php',
|
508 |
'ICWP_WPSF_Processor_Base' => $baseDir . '/../processors/base.php',
|
509 |
'ICWP_WPSF_Processor_BasePlugin' => $baseDir . '/../processors/base_plugin.php',
|
510 |
'ICWP_WPSF_Processor_BaseWpsf' => $baseDir . '/../processors/base_wpsf.php',
|
511 |
'ICWP_WPSF_Processor_CommentsFilter' => $baseDir . '/../processors/comments_filter.php',
|
|
|
|
|
512 |
'ICWP_WPSF_Processor_CommentsFilter_BotSpam' => $baseDir . '/../processors/commentsfilter_botspam.php',
|
513 |
'ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha' => $baseDir . '/../processors/commentsfilter_googlerecaptcha.php',
|
|
|
514 |
'ICWP_WPSF_Processor_Email' => $baseDir . '/../processors/email.php',
|
515 |
'ICWP_WPSF_Processor_Events' => $baseDir . '/../processors/events.php',
|
516 |
'ICWP_WPSF_Processor_Firewall' => $baseDir . '/../processors/firewall.php',
|
544 |
'ICWP_WPSF_Processor_LoginProtect_WpLogin' => $baseDir . '/../processors/loginprotect_wplogin.php',
|
545 |
'ICWP_WPSF_Processor_LoginProtect_Yubikey' => $baseDir . '/../processors/loginprotect_intentprovider_yubikey.php',
|
546 |
'ICWP_WPSF_Processor_Plugin' => $baseDir . '/../processors/plugin.php',
|
|
|
|
|
547 |
'ICWP_WPSF_Processor_Plugin_CronDaily' => $baseDir . '/../processors/plugin_crondaily.php',
|
548 |
'ICWP_WPSF_Processor_Plugin_CronHourly' => $baseDir . '/../processors/plugin_cronhourly.php',
|
|
|
549 |
'ICWP_WPSF_Processor_Plugin_ImportExport' => $baseDir . '/../processors/plugin_importexport.php',
|
|
|
550 |
'ICWP_WPSF_Processor_Plugin_Tracking' => $baseDir . '/../processors/plugin_tracking.php',
|
551 |
'ICWP_WPSF_Processor_ScanBase' => $baseDir . '/../processors/hackprotect_scan_base.php',
|
552 |
'ICWP_WPSF_Processor_Sessions' => $baseDir . '/../processors/sessions.php',
|
|
|
|
|
553 |
'ICWP_WPSF_Processor_Traffic' => $baseDir . '/../processors/traffic.php',
|
554 |
'ICWP_WPSF_Processor_TrafficLogger' => $baseDir . '/../processors/traffic_logger.php',
|
555 |
'ICWP_WPSF_Processor_UserManagement' => $baseDir . '/../processors/user_management.php',
|
557 |
'ICWP_WPSF_Processor_UserManagement_Sessions' => $baseDir . '/../processors/usermanagement_sessions.php',
|
558 |
'ICWP_WPSF_Processor_UserManagement_Suspend' => $baseDir . '/../processors/usermanagement_suspend.php',
|
559 |
'ICWP_WPSF_Query_Statistics_Base' => $baseDir . '/../query/base/statistics_base.php',
|
|
|
560 |
'ICWP_WPSF_Query_Statistics_Reporting' => $baseDir . '/../query/statistics/reporting.php',
|
561 |
'ICWP_WPSF_Render' => $baseDir . '/../common/icwp-render.php',
|
562 |
'ICWP_WPSF_Request' => $baseDir . '/../common/icwp-request.php',
|
src/lib/vendor/composer/autoload_static.php
CHANGED
@@ -251,6 +251,13 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
251 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Insert' => __DIR__ . '/../..' . '/src/Databases/IPs/Insert.php',
|
252 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Select' => __DIR__ . '/../..' . '/src/Databases/IPs/Select.php',
|
253 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Update' => __DIR__ . '/../..' . '/src/Databases/IPs/Update.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Delete' => __DIR__ . '/../..' . '/src/Databases/Scanner/Delete.php',
|
255 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\EntryVO' => __DIR__ . '/../..' . '/src/Databases/Scanner/EntryVO.php',
|
256 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Handler' => __DIR__ . '/../..' . '/src/Databases/Scanner/Handler.php',
|
@@ -317,6 +324,26 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
317 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\GeoIp\\Lookup' => __DIR__ . '/../..' . '/src/Modules/GeoIp/Lookup.php',
|
318 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/HackGuard/AjaxHandler.php',
|
319 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Options' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Options.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Strings.php',
|
321 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => __DIR__ . '/../..' . '/src/Modules/Headers/Options.php',
|
322 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => __DIR__ . '/../..' . '/src/Modules/Headers/Strings.php',
|
@@ -375,16 +402,13 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
375 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/Suspended.php',
|
376 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => __DIR__ . '/../..' . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
|
377 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Apc/BuildScanAction.php',
|
378 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Apc/ConvertResultsToVos.php',
|
379 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Apc/ConvertVosToResults.php',
|
380 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => __DIR__ . '/../..' . '/src/Scans/Apc/PluginScanner.php',
|
381 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Apc/ResultItem.php',
|
382 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultsSet' => __DIR__ . '/../..' . '/src/Scans/Apc/ResultsSet.php',
|
383 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\Scan' => __DIR__ . '/../..' . '/src/Scans/Apc/Scan.php',
|
384 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Apc/ScanActionVO.php',
|
385 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ActionStore' => __DIR__ . '/../..' . '/src/Scans/Base/ActionStore.php',
|
386 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseBuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Base/BaseBuildScanAction.php',
|
387 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Base/BaseConvertResultsToVos.php',
|
388 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Base/BaseConvertVosToResults.php',
|
389 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseMergeItems' => __DIR__ . '/../..' . '/src/Scans/Base/BaseMergeItems.php',
|
390 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseRepair' => __DIR__ . '/../..' . '/src/Scans/Base/BaseRepair.php',
|
@@ -396,14 +420,8 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
396 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileMapScan' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseFileMapScan.php',
|
397 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileScanner' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseFileScanner.php',
|
398 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseScanFromFileMap.php',
|
399 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScanActionQuery' => __DIR__ . '/../..' . '/src/Scans/Base/ScanActionQuery.php',
|
400 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScanResults\\Clean' => __DIR__ . '/../..' . '/src/Scans/Base/ScanResults/Clean.php',
|
401 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfile' => __DIR__ . '/../..' . '/src/Scans/Base/ScannerProfile.php',
|
402 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfileConsumer' => __DIR__ . '/../..' . '/src/Scans/Base/ScannerProfileConsumer.php',
|
403 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\AsyncScansController' => __DIR__ . '/../..' . '/src/Scans/Common/AsyncScansController.php',
|
404 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanActionConsumer' => __DIR__ . '/../..' . '/src/Scans/Common/ScanActionConsumer.php',
|
405 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanLauncher' => __DIR__ . '/../..' . '/src/Scans/Common/ScanLauncher.php',
|
406 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScansJobVO' => __DIR__ . '/../..' . '/src/Scans/Common/ScansJobVO.php',
|
407 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromApi' => __DIR__ . '/../..' . '/src/Scans/Helpers/BuildHashesFromApi.php',
|
408 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromDir' => __DIR__ . '/../..' . '/src/Scans/Helpers/BuildHashesFromDir.php',
|
409 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\CopyResultsSets' => __DIR__ . '/../..' . '/src/Scans/Helpers/CopyResultsSets.php',
|
@@ -413,8 +431,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
413 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\WpCoreFile' => __DIR__ . '/../..' . '/src/Scans/Helpers/WpCoreFile.php',
|
414 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Mal/BuildFileMap.php',
|
415 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Mal/BuildScanAction.php',
|
416 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Mal/ConvertResultsToVos.php',
|
417 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Mal/ConvertVosToResults.php',
|
418 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Mal/FileScanner.php',
|
419 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\Repair' => __DIR__ . '/../..' . '/src/Scans/Mal/Repair.php',
|
420 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Mal/ResultItem.php',
|
@@ -423,8 +439,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
423 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Mal/ScanActionVO.php',
|
424 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Mal/ScanFromFileMap.php',
|
425 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Ptg/BuildScanAction.php',
|
426 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Ptg/ConvertResultsToVos.php',
|
427 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Ptg/ConvertVosToResults.php',
|
428 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\DiffHashes' => __DIR__ . '/../..' . '/src/Scans/Ptg/DiffHashes.php',
|
429 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ItemScanner' => __DIR__ . '/../..' . '/src/Scans/Ptg/ItemScanner.php',
|
430 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\PluginWporgScanner' => __DIR__ . '/../..' . '/src/Scans/Ptg/PluginWporgScanner.php',
|
@@ -447,7 +461,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
447 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Realtime\\Files\\Verify' => __DIR__ . '/../..' . '/src/Scans/Realtime/Files/Verify.php',
|
448 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Ufc/BuildFileMap.php',
|
449 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Ufc/BuildScanAction.php',
|
450 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Ufc/ConvertResultsToVos.php',
|
451 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Ufc/ConvertVosToResults.php',
|
452 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Ufc/FileScanner.php',
|
453 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\Repair' => __DIR__ . '/../..' . '/src/Scans/Ufc/Repair.php',
|
@@ -458,7 +471,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
458 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Ufc/ScanFromFileMap.php',
|
459 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Wcf/BuildFileMap.php',
|
460 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Wcf/BuildScanAction.php',
|
461 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Wcf/ConvertResultsToVos.php',
|
462 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Wcf/ConvertVosToResults.php',
|
463 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Wcf/FileScanner.php',
|
464 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\Repair' => __DIR__ . '/../..' . '/src/Scans/Wcf/Repair.php',
|
@@ -468,18 +480,12 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
468 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Wcf/ScanActionVO.php',
|
469 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Wcf/ScanFromFileMap.php',
|
470 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Wpv/BuildScanAction.php',
|
471 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertResultsToVos' => __DIR__ . '/../..' . '/src/Scans/Wpv/ConvertResultsToVos.php',
|
472 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Wpv/ConvertVosToResults.php',
|
473 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ItemScanner' => __DIR__ . '/../..' . '/src/Scans/Wpv/ItemScanner.php',
|
474 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\PluginScanner' => __DIR__ . '/../..' . '/src/Scans/Wpv/PluginScanner.php',
|
475 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Repair' => __DIR__ . '/../..' . '/src/Scans/Wpv/Repair.php',
|
476 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Wpv/ResultItem.php',
|
477 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultsSet' => __DIR__ . '/../..' . '/src/Scans/Wpv/ResultsSet.php',
|
478 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scan' => __DIR__ . '/../..' . '/src/Scans/Wpv/Scan.php',
|
479 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Wpv/ScanActionVO.php',
|
480 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scanner' => __DIR__ . '/../..' . '/src/Scans/Wpv/Scanner.php',
|
481 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ThemeScanner' => __DIR__ . '/../..' . '/src/Scans/Wpv/ThemeScanner.php',
|
482 |
-
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\RetrieveForItem' => __DIR__ . '/../..' . '/src/Scans/Wpv/WpVulnDb/RetrieveForItem.php',
|
483 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\WpVulnVO' => __DIR__ . '/../..' . '/src/Scans/Wpv/WpVulnDb/WpVulnVO.php',
|
484 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AdminNotes' => __DIR__ . '/../..' . '/src/Tables/Build/AdminNotes.php',
|
485 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AuditTrail' => __DIR__ . '/../..' . '/src/Tables/Build/AuditTrail.php',
|
@@ -562,6 +568,23 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
562 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Html' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Html.php',
|
563 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpRequest' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/HttpRequest.php',
|
564 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpUtil' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/HttpUtil.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\IpUtils' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/IpUtils.php',
|
566 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Iterators\\WpUserIterator' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Iterators/WpUserIterator.php',
|
567 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Licenses\\EddLicenseVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Licenses/EddLicenseVO.php',
|
@@ -578,12 +601,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
578 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Files' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Files.php',
|
579 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Repo' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Repo.php',
|
580 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Versions' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Versions.php',
|
581 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Base.php',
|
582 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\ClassicPress' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/ClassicPress.php',
|
583 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\HashesRequestVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/HashesRequestVO.php',
|
584 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Ping' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Ping.php',
|
585 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\Plugin' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Plugin.php',
|
586 |
-
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Hashes\\WordPress' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/WordPress.php',
|
587 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Api' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php',
|
588 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Base.php',
|
589 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Download' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Download.php',
|
@@ -604,7 +621,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
604 |
'ICWP_Plugin_Upgrader' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
605 |
'ICWP_Theme_Upgrader' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
606 |
'ICWP_Upgrader_Skin' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
607 |
-
'ICWP_WPSF_AuditTrail_Auditor_Base' => __DIR__ . '/../..' . '/../processors/audit_trail_auditor_base.php',
|
608 |
'ICWP_WPSF_BaseDbProcessor' => __DIR__ . '/../..' . '/../processors/basedb.php',
|
609 |
'ICWP_WPSF_DataProcessor' => __DIR__ . '/../..' . '/../common/icwp-data.php',
|
610 |
'ICWP_WPSF_Edd' => __DIR__ . '/../..' . '/../common/icwp-edd.php',
|
@@ -637,23 +653,13 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
637 |
'ICWP_WPSF_Processor_AuditTrail' => __DIR__ . '/../..' . '/../processors/audit_trail.php',
|
638 |
'ICWP_WPSF_Processor_AuditTrail_Auditor' => __DIR__ . '/../..' . '/../processors/audit_trail_auditor.php',
|
639 |
'ICWP_WPSF_Processor_AuditTrail_ChangeTracking' => __DIR__ . '/../..' . '/../processors/audit_trail_changetracking.php',
|
640 |
-
'ICWP_WPSF_Processor_AuditTrail_Emails' => __DIR__ . '/../..' . '/../processors/audit_trail_emails.php',
|
641 |
-
'ICWP_WPSF_Processor_AuditTrail_Plugins' => __DIR__ . '/../..' . '/../processors/audit_trail_plugins.php',
|
642 |
-
'ICWP_WPSF_Processor_AuditTrail_Posts' => __DIR__ . '/../..' . '/../processors/audit_trail_posts.php',
|
643 |
-
'ICWP_WPSF_Processor_AuditTrail_Themes' => __DIR__ . '/../..' . '/../processors/audit_trail_themes.php',
|
644 |
-
'ICWP_WPSF_Processor_AuditTrail_Users' => __DIR__ . '/../..' . '/../processors/audit_trail_users.php',
|
645 |
-
'ICWP_WPSF_Processor_AuditTrail_Wordpress' => __DIR__ . '/../..' . '/../processors/audit_trail_wordpress.php',
|
646 |
-
'ICWP_WPSF_Processor_AuditTrail_Wpsf' => __DIR__ . '/../..' . '/../processors/audit_trail_wpsf.php',
|
647 |
'ICWP_WPSF_Processor_Autoupdates' => __DIR__ . '/../..' . '/../processors/autoupdates.php',
|
648 |
'ICWP_WPSF_Processor_Base' => __DIR__ . '/../..' . '/../processors/base.php',
|
649 |
'ICWP_WPSF_Processor_BasePlugin' => __DIR__ . '/../..' . '/../processors/base_plugin.php',
|
650 |
'ICWP_WPSF_Processor_BaseWpsf' => __DIR__ . '/../..' . '/../processors/base_wpsf.php',
|
651 |
'ICWP_WPSF_Processor_CommentsFilter' => __DIR__ . '/../..' . '/../processors/comments_filter.php',
|
652 |
-
'ICWP_WPSF_Processor_CommentsFilter_AntiBotSpam' => __DIR__ . '/../..' . '/../processors/commentsfilter_antibotspam.php',
|
653 |
-
'ICWP_WPSF_Processor_CommentsFilter_Base' => __DIR__ . '/../..' . '/../processors/base_commentsfilter.php',
|
654 |
'ICWP_WPSF_Processor_CommentsFilter_BotSpam' => __DIR__ . '/../..' . '/../processors/commentsfilter_botspam.php',
|
655 |
'ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha' => __DIR__ . '/../..' . '/../processors/commentsfilter_googlerecaptcha.php',
|
656 |
-
'ICWP_WPSF_Processor_CommentsFilter_HumanSpam' => __DIR__ . '/../..' . '/../processors/commentsfilter_humanspam.php',
|
657 |
'ICWP_WPSF_Processor_Email' => __DIR__ . '/../..' . '/../processors/email.php',
|
658 |
'ICWP_WPSF_Processor_Events' => __DIR__ . '/../..' . '/../processors/events.php',
|
659 |
'ICWP_WPSF_Processor_Firewall' => __DIR__ . '/../..' . '/../processors/firewall.php',
|
@@ -687,18 +693,12 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
687 |
'ICWP_WPSF_Processor_LoginProtect_WpLogin' => __DIR__ . '/../..' . '/../processors/loginprotect_wplogin.php',
|
688 |
'ICWP_WPSF_Processor_LoginProtect_Yubikey' => __DIR__ . '/../..' . '/../processors/loginprotect_intentprovider_yubikey.php',
|
689 |
'ICWP_WPSF_Processor_Plugin' => __DIR__ . '/../..' . '/../processors/plugin.php',
|
690 |
-
'ICWP_WPSF_Processor_Plugin_Badge' => __DIR__ . '/../..' . '/../processors/plugin_badge.php',
|
691 |
-
'ICWP_WPSF_Processor_Plugin_BadgeWidget' => __DIR__ . '/../..' . '/../processors/plugin_badgewidget.php',
|
692 |
'ICWP_WPSF_Processor_Plugin_CronDaily' => __DIR__ . '/../..' . '/../processors/plugin_crondaily.php',
|
693 |
'ICWP_WPSF_Processor_Plugin_CronHourly' => __DIR__ . '/../..' . '/../processors/plugin_cronhourly.php',
|
694 |
-
'ICWP_WPSF_Processor_Plugin_Geoip' => __DIR__ . '/../..' . '/../processors/plugin_geoip.php',
|
695 |
'ICWP_WPSF_Processor_Plugin_ImportExport' => __DIR__ . '/../..' . '/../processors/plugin_importexport.php',
|
696 |
-
'ICWP_WPSF_Processor_Plugin_Notes' => __DIR__ . '/../..' . '/../processors/plugin_notes.php',
|
697 |
'ICWP_WPSF_Processor_Plugin_Tracking' => __DIR__ . '/../..' . '/../processors/plugin_tracking.php',
|
698 |
'ICWP_WPSF_Processor_ScanBase' => __DIR__ . '/../..' . '/../processors/hackprotect_scan_base.php',
|
699 |
'ICWP_WPSF_Processor_Sessions' => __DIR__ . '/../..' . '/../processors/sessions.php',
|
700 |
-
'ICWP_WPSF_Processor_Statistics' => __DIR__ . '/../..' . '/../processors/statistics.php',
|
701 |
-
'ICWP_WPSF_Processor_Statistics_Tally' => __DIR__ . '/../..' . '/../processors/statistics_tally.php',
|
702 |
'ICWP_WPSF_Processor_Traffic' => __DIR__ . '/../..' . '/../processors/traffic.php',
|
703 |
'ICWP_WPSF_Processor_TrafficLogger' => __DIR__ . '/../..' . '/../processors/traffic_logger.php',
|
704 |
'ICWP_WPSF_Processor_UserManagement' => __DIR__ . '/../..' . '/../processors/user_management.php',
|
@@ -706,7 +706,6 @@ class ComposerStaticInitfcf2fe1888f1f5fc092770cdc8ef3cf4
|
|
706 |
'ICWP_WPSF_Processor_UserManagement_Sessions' => __DIR__ . '/../..' . '/../processors/usermanagement_sessions.php',
|
707 |
'ICWP_WPSF_Processor_UserManagement_Suspend' => __DIR__ . '/../..' . '/../processors/usermanagement_suspend.php',
|
708 |
'ICWP_WPSF_Query_Statistics_Base' => __DIR__ . '/../..' . '/../query/base/statistics_base.php',
|
709 |
-
'ICWP_WPSF_Query_Statistics_Consolidation' => __DIR__ . '/../..' . '/../query/statistics/consolidation.php',
|
710 |
'ICWP_WPSF_Query_Statistics_Reporting' => __DIR__ . '/../..' . '/../query/statistics/reporting.php',
|
711 |
'ICWP_WPSF_Render' => __DIR__ . '/../..' . '/../common/icwp-render.php',
|
712 |
'ICWP_WPSF_Request' => __DIR__ . '/../..' . '/../common/icwp-request.php',
|
251 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Insert' => __DIR__ . '/../..' . '/src/Databases/IPs/Insert.php',
|
252 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Select' => __DIR__ . '/../..' . '/src/Databases/IPs/Select.php',
|
253 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\IPs\\Update' => __DIR__ . '/../..' . '/src/Databases/IPs/Update.php',
|
254 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Common' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Common.php',
|
255 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Delete' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Delete.php',
|
256 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\EntryVO' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/EntryVO.php',
|
257 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Handler' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Handler.php',
|
258 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Insert' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Insert.php',
|
259 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Select' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Select.php',
|
260 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\ScanQueue\\Update' => __DIR__ . '/../..' . '/src/Databases/ScanQueue/Update.php',
|
261 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Delete' => __DIR__ . '/../..' . '/src/Databases/Scanner/Delete.php',
|
262 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\EntryVO' => __DIR__ . '/../..' . '/src/Databases/Scanner/EntryVO.php',
|
263 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Databases\\Scanner\\Handler' => __DIR__ . '/../..' . '/src/Databases/Scanner/Handler.php',
|
324 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\GeoIp\\Lookup' => __DIR__ . '/../..' . '/src/Modules/GeoIp/Lookup.php',
|
325 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\AjaxHandler' => __DIR__ . '/../..' . '/src/Modules/HackGuard/AjaxHandler.php',
|
326 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Options' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Options.php',
|
327 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\BuildScanAction' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/BuildScanAction.php',
|
328 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Build\\QueueBuilder' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilder.php',
|
329 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Build\\QueueBuilderConsumer' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/Build/QueueBuilderConsumer.php',
|
330 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\CollateResults' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/CollateResults.php',
|
331 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\CompleteQueue' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/CompleteQueue.php',
|
332 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\Controller' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/Controller.php',
|
333 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ConvertBetweenTypes' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/ConvertBetweenTypes.php',
|
334 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\IsScanEnqueued' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/IsScanEnqueued.php',
|
335 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\QueueProcessor' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/QueueProcessor.php',
|
336 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\QueueProcessorConsumer' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/QueueProcessorConsumer.php',
|
337 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanEnqueue' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/ScanEnqueue.php',
|
338 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanExecute' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/ScanExecute.php',
|
339 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Queue\\ScanInitiate' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Queue/ScanInitiate.php',
|
340 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\Clean' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/Clean.php',
|
341 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ConvertBetweenTypes' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ConvertBetweenTypes.php',
|
342 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsDelete' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsDelete.php',
|
343 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsRetrieve' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsRetrieve.php',
|
344 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsStore' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsStore.php',
|
345 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\Results\\ResultsUpdate' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/Results/ResultsUpdate.php',
|
346 |
+
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Scan\\ScanActionFromSlug' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Scan/ScanActionFromSlug.php',
|
347 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\HackGuard\\Strings' => __DIR__ . '/../..' . '/src/Modules/HackGuard/Strings.php',
|
348 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Options' => __DIR__ . '/../..' . '/src/Modules/Headers/Options.php',
|
349 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\Headers\\Strings' => __DIR__ . '/../..' . '/src/Modules/Headers/Strings.php',
|
402 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\Suspend\\Suspended' => __DIR__ . '/../..' . '/src/Modules/UserManagement/Suspend/Suspended.php',
|
403 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Modules\\UserManagement\\UpdateUserPasswordMeta' => __DIR__ . '/../..' . '/src/Modules/UserManagement/UpdateUserPasswordMeta.php',
|
404 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Apc/BuildScanAction.php',
|
|
|
405 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Apc/ConvertVosToResults.php',
|
406 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\PluginScanner' => __DIR__ . '/../..' . '/src/Scans/Apc/PluginScanner.php',
|
407 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Apc/ResultItem.php',
|
408 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ResultsSet' => __DIR__ . '/../..' . '/src/Scans/Apc/ResultsSet.php',
|
409 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\Scan' => __DIR__ . '/../..' . '/src/Scans/Apc/Scan.php',
|
410 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Apc\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Apc/ScanActionVO.php',
|
|
|
411 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseBuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Base/BaseBuildScanAction.php',
|
|
|
412 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Base/BaseConvertVosToResults.php',
|
413 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseMergeItems' => __DIR__ . '/../..' . '/src/Scans/Base/BaseMergeItems.php',
|
414 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\BaseRepair' => __DIR__ . '/../..' . '/src/Scans/Base/BaseRepair.php',
|
420 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileMapScan' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseFileMapScan.php',
|
421 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseFileScanner' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseFileScanner.php',
|
422 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\Files\\BaseScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Base/Files/BaseScanFromFileMap.php',
|
|
|
|
|
423 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Base\\ScannerProfile' => __DIR__ . '/../..' . '/src/Scans/Base/ScannerProfile.php',
|
|
|
|
|
424 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Common\\ScanActionConsumer' => __DIR__ . '/../..' . '/src/Scans/Common/ScanActionConsumer.php',
|
|
|
|
|
425 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromApi' => __DIR__ . '/../..' . '/src/Scans/Helpers/BuildHashesFromApi.php',
|
426 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\BuildHashesFromDir' => __DIR__ . '/../..' . '/src/Scans/Helpers/BuildHashesFromDir.php',
|
427 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\CopyResultsSets' => __DIR__ . '/../..' . '/src/Scans/Helpers/CopyResultsSets.php',
|
431 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Helpers\\WpCoreFile' => __DIR__ . '/../..' . '/src/Scans/Helpers/WpCoreFile.php',
|
432 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Mal/BuildFileMap.php',
|
433 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Mal/BuildScanAction.php',
|
|
|
|
|
434 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Mal/FileScanner.php',
|
435 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\Repair' => __DIR__ . '/../..' . '/src/Scans/Mal/Repair.php',
|
436 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Mal/ResultItem.php',
|
439 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Mal/ScanActionVO.php',
|
440 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Mal\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Mal/ScanFromFileMap.php',
|
441 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Ptg/BuildScanAction.php',
|
|
|
|
|
442 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\DiffHashes' => __DIR__ . '/../..' . '/src/Scans/Ptg/DiffHashes.php',
|
443 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\ItemScanner' => __DIR__ . '/../..' . '/src/Scans/Ptg/ItemScanner.php',
|
444 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ptg\\PluginWporgScanner' => __DIR__ . '/../..' . '/src/Scans/Ptg/PluginWporgScanner.php',
|
461 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Realtime\\Files\\Verify' => __DIR__ . '/../..' . '/src/Scans/Realtime/Files/Verify.php',
|
462 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Ufc/BuildFileMap.php',
|
463 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Ufc/BuildScanAction.php',
|
|
|
464 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Ufc/ConvertVosToResults.php',
|
465 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Ufc/FileScanner.php',
|
466 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\Repair' => __DIR__ . '/../..' . '/src/Scans/Ufc/Repair.php',
|
471 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Ufc\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Ufc/ScanFromFileMap.php',
|
472 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildFileMap' => __DIR__ . '/../..' . '/src/Scans/Wcf/BuildFileMap.php',
|
473 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Wcf/BuildScanAction.php',
|
|
|
474 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Wcf/ConvertVosToResults.php',
|
475 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\FileScanner' => __DIR__ . '/../..' . '/src/Scans/Wcf/FileScanner.php',
|
476 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\Repair' => __DIR__ . '/../..' . '/src/Scans/Wcf/Repair.php',
|
480 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Wcf/ScanActionVO.php',
|
481 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wcf\\ScanFromFileMap' => __DIR__ . '/../..' . '/src/Scans/Wcf/ScanFromFileMap.php',
|
482 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\BuildScanAction' => __DIR__ . '/../..' . '/src/Scans/Wpv/BuildScanAction.php',
|
|
|
483 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ConvertVosToResults' => __DIR__ . '/../..' . '/src/Scans/Wpv/ConvertVosToResults.php',
|
|
|
|
|
484 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Repair' => __DIR__ . '/../..' . '/src/Scans/Wpv/Repair.php',
|
485 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultItem' => __DIR__ . '/../..' . '/src/Scans/Wpv/ResultItem.php',
|
486 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ResultsSet' => __DIR__ . '/../..' . '/src/Scans/Wpv/ResultsSet.php',
|
487 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\Scan' => __DIR__ . '/../..' . '/src/Scans/Wpv/Scan.php',
|
488 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\ScanActionVO' => __DIR__ . '/../..' . '/src/Scans/Wpv/ScanActionVO.php',
|
|
|
|
|
|
|
489 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Scans\\Wpv\\WpVulnDb\\WpVulnVO' => __DIR__ . '/../..' . '/src/Scans/Wpv/WpVulnDb/WpVulnVO.php',
|
490 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AdminNotes' => __DIR__ . '/../..' . '/src/Tables/Build/AdminNotes.php',
|
491 |
'FernleafSystems\\Wordpress\\Plugin\\Shield\\Tables\\Build\\AuditTrail' => __DIR__ . '/../..' . '/src/Tables/Build/AuditTrail.php',
|
568 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Html' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Html.php',
|
569 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpRequest' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/HttpRequest.php',
|
570 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\HttpUtil' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/HttpUtil.php',
|
571 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\RequestVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/RequestVO.php',
|
572 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\ApiBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiBase.php',
|
573 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\ApiPing' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiPing.php',
|
574 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Base.php',
|
575 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\ClassicPress' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/ClassicPress.php',
|
576 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\Plugin' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Plugin.php',
|
577 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\RequestVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/RequestVO.php',
|
578 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Hashes\\WordPress' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/WordPress.php',
|
579 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/Base.php',
|
580 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\RequestVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/RequestVO.php',
|
581 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Malware\\WhitelistRetrieve' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/WhitelistRetrieve.php',
|
582 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Base.php',
|
583 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\BasePluginTheme' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/BasePluginTheme.php',
|
584 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Plugin' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Plugin.php',
|
585 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\RequestVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/RequestVO.php',
|
586 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\Theme' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Theme.php',
|
587 |
+
'FernleafSystems\\Wordpress\\Services\\Utilities\\Integrations\\WpHashes\\Vulnerabilities\\WordPress' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/WordPress.php',
|
588 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\IpUtils' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/IpUtils.php',
|
589 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Iterators\\WpUserIterator' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Iterators/WpUserIterator.php',
|
590 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\Licenses\\EddLicenseVO' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Licenses/EddLicenseVO.php',
|
601 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Files' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Files.php',
|
602 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Repo' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Repo.php',
|
603 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Cp\\Versions' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Cp/Versions.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Api' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php',
|
605 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Base' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Base.php',
|
606 |
'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Plugin\\Download' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Download.php',
|
621 |
'ICWP_Plugin_Upgrader' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
622 |
'ICWP_Theme_Upgrader' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
623 |
'ICWP_Upgrader_Skin' => __DIR__ . '/../..' . '/../common/icwp-wpupgrades.php',
|
|
|
624 |
'ICWP_WPSF_BaseDbProcessor' => __DIR__ . '/../..' . '/../processors/basedb.php',
|
625 |
'ICWP_WPSF_DataProcessor' => __DIR__ . '/../..' . '/../common/icwp-data.php',
|
626 |
'ICWP_WPSF_Edd' => __DIR__ . '/../..' . '/../common/icwp-edd.php',
|
653 |
'ICWP_WPSF_Processor_AuditTrail' => __DIR__ . '/../..' . '/../processors/audit_trail.php',
|
654 |
'ICWP_WPSF_Processor_AuditTrail_Auditor' => __DIR__ . '/../..' . '/../processors/audit_trail_auditor.php',
|
655 |
'ICWP_WPSF_Processor_AuditTrail_ChangeTracking' => __DIR__ . '/../..' . '/../processors/audit_trail_changetracking.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
'ICWP_WPSF_Processor_Autoupdates' => __DIR__ . '/../..' . '/../processors/autoupdates.php',
|
657 |
'ICWP_WPSF_Processor_Base' => __DIR__ . '/../..' . '/../processors/base.php',
|
658 |
'ICWP_WPSF_Processor_BasePlugin' => __DIR__ . '/../..' . '/../processors/base_plugin.php',
|
659 |
'ICWP_WPSF_Processor_BaseWpsf' => __DIR__ . '/../..' . '/../processors/base_wpsf.php',
|
660 |
'ICWP_WPSF_Processor_CommentsFilter' => __DIR__ . '/../..' . '/../processors/comments_filter.php',
|
|
|
|
|
661 |
'ICWP_WPSF_Processor_CommentsFilter_BotSpam' => __DIR__ . '/../..' . '/../processors/commentsfilter_botspam.php',
|
662 |
'ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha' => __DIR__ . '/../..' . '/../processors/commentsfilter_googlerecaptcha.php',
|
|
|
663 |
'ICWP_WPSF_Processor_Email' => __DIR__ . '/../..' . '/../processors/email.php',
|
664 |
'ICWP_WPSF_Processor_Events' => __DIR__ . '/../..' . '/../processors/events.php',
|
665 |
'ICWP_WPSF_Processor_Firewall' => __DIR__ . '/../..' . '/../processors/firewall.php',
|
693 |
'ICWP_WPSF_Processor_LoginProtect_WpLogin' => __DIR__ . '/../..' . '/../processors/loginprotect_wplogin.php',
|
694 |
'ICWP_WPSF_Processor_LoginProtect_Yubikey' => __DIR__ . '/../..' . '/../processors/loginprotect_intentprovider_yubikey.php',
|
695 |
'ICWP_WPSF_Processor_Plugin' => __DIR__ . '/../..' . '/../processors/plugin.php',
|
|
|
|
|
696 |
'ICWP_WPSF_Processor_Plugin_CronDaily' => __DIR__ . '/../..' . '/../processors/plugin_crondaily.php',
|
697 |
'ICWP_WPSF_Processor_Plugin_CronHourly' => __DIR__ . '/../..' . '/../processors/plugin_cronhourly.php',
|
|
|
698 |
'ICWP_WPSF_Processor_Plugin_ImportExport' => __DIR__ . '/../..' . '/../processors/plugin_importexport.php',
|
|
|
699 |
'ICWP_WPSF_Processor_Plugin_Tracking' => __DIR__ . '/../..' . '/../processors/plugin_tracking.php',
|
700 |
'ICWP_WPSF_Processor_ScanBase' => __DIR__ . '/../..' . '/../processors/hackprotect_scan_base.php',
|
701 |
'ICWP_WPSF_Processor_Sessions' => __DIR__ . '/../..' . '/../processors/sessions.php',
|
|
|
|
|
702 |
'ICWP_WPSF_Processor_Traffic' => __DIR__ . '/../..' . '/../processors/traffic.php',
|
703 |
'ICWP_WPSF_Processor_TrafficLogger' => __DIR__ . '/../..' . '/../processors/traffic_logger.php',
|
704 |
'ICWP_WPSF_Processor_UserManagement' => __DIR__ . '/../..' . '/../processors/user_management.php',
|
706 |
'ICWP_WPSF_Processor_UserManagement_Sessions' => __DIR__ . '/../..' . '/../processors/usermanagement_sessions.php',
|
707 |
'ICWP_WPSF_Processor_UserManagement_Suspend' => __DIR__ . '/../..' . '/../processors/usermanagement_suspend.php',
|
708 |
'ICWP_WPSF_Query_Statistics_Base' => __DIR__ . '/../..' . '/../query/base/statistics_base.php',
|
|
|
709 |
'ICWP_WPSF_Query_Statistics_Reporting' => __DIR__ . '/../..' . '/../query/statistics/reporting.php',
|
710 |
'ICWP_WPSF_Render' => __DIR__ . '/../..' . '/../common/icwp-render.php',
|
711 |
'ICWP_WPSF_Request' => __DIR__ . '/../..' . '/../common/icwp-request.php',
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Core/General.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
namespace FernleafSystems\Wordpress\Services\Core;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
-
use FernleafSystems\Wordpress\Services\Utilities\
|
7 |
|
8 |
class General {
|
9 |
|
3 |
namespace FernleafSystems\Wordpress\Services\Core;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
7 |
|
8 |
class General {
|
9 |
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/RequestVO.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations;
|
4 |
+
|
5 |
+
use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class RequestVO
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations
|
10 |
+
*/
|
11 |
+
class RequestVO {
|
12 |
+
|
13 |
+
use StdClassAdapter;
|
14 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiBase.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\HttpRequest;
|
6 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\RequestVO;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ApiBase
|
10 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes
|
11 |
+
*/
|
12 |
+
abstract class ApiBase {
|
13 |
+
|
14 |
+
const API_URL = 'https://wphashes.com/api/apto-wphashes/v1/';
|
15 |
+
const API_ENDPOINT = '';
|
16 |
+
const RESPONSE_DATA_KEY = '';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var RequestVO
|
20 |
+
*/
|
21 |
+
private $oReq;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
protected function getApiUrl() {
|
27 |
+
return trailingslashit( static::API_URL.static::API_ENDPOINT );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @return array
|
32 |
+
*/
|
33 |
+
protected function getQueryData() {
|
34 |
+
return [];
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @return RequestVO|mixed
|
39 |
+
*/
|
40 |
+
protected function getRequestVO() {
|
41 |
+
if ( !isset( $this->oReq ) ) {
|
42 |
+
$this->oReq = $this->newReqVO();
|
43 |
+
}
|
44 |
+
return $this->oReq;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @return RequestVO
|
49 |
+
*/
|
50 |
+
protected function newReqVO() {
|
51 |
+
return new RequestVO();
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return array|mixed|null
|
56 |
+
*/
|
57 |
+
public function query() {
|
58 |
+
$sUrl = add_query_arg( array_map( 'strtolower', $this->getQueryData() ), $this->getApiUrl() );
|
59 |
+
$sResponse = ( new HttpRequest() )->getContent( $sUrl );
|
60 |
+
$aData = empty( $sResponse ) ? null : json_decode( $sResponse, true );
|
61 |
+
return is_array( $aData ) ? $aData[ static::RESPONSE_DATA_KEY ] : null;
|
62 |
+
}
|
63 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/ApiPing.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class ApiPing
|
7 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes
|
8 |
+
*/
|
9 |
+
class ApiPing extends ApiBase {
|
10 |
+
|
11 |
+
const API_ENDPOINT = 'ping';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @return bool
|
15 |
+
*/
|
16 |
+
public function ping() {
|
17 |
+
$aR = $this->query();
|
18 |
+
return ( is_array( $aR ) && isset( $aR[ 'pong' ] ) ) ? ( $aR[ 'pong' ] == 'ping' ) : false;
|
19 |
+
}
|
20 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/Base.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
6 |
+
|
7 |
+
abstract class Base extends WpHashes\ApiBase {
|
8 |
+
|
9 |
+
const DEFAULT_HASH_ALGO = 'md5';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @return array
|
13 |
+
*/
|
14 |
+
protected function getQueryData() {
|
15 |
+
return $this->getRequestVO()->getRawDataAsArray();
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @return RequestVO
|
20 |
+
*/
|
21 |
+
protected function newReqVO() {
|
22 |
+
return new RequestVO();
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @return string[]|null
|
27 |
+
*/
|
28 |
+
public function query() {
|
29 |
+
$oReq = $this->getRequestVO();
|
30 |
+
if ( empty( $oReq->hash ) ) {
|
31 |
+
$oReq->hash = static::DEFAULT_HASH_ALGO;
|
32 |
+
}
|
33 |
+
return parent::query();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @param string $sHashAlgo
|
38 |
+
* @return $this
|
39 |
+
*/
|
40 |
+
public function setHashAlgo( $sHashAlgo ) {
|
41 |
+
$this->getRequestVO()->hash = $sHashAlgo;
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/ClassicPress.php
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services;
|
6 |
|
7 |
/**
|
8 |
* Class ClassicPress
|
9 |
-
* @package FernleafSystems\Wordpress\Services\Utilities\
|
10 |
*/
|
11 |
class ClassicPress extends Base {
|
12 |
|
@@ -18,17 +18,16 @@ class ClassicPress extends Base {
|
|
18 |
* @return string[]|null
|
19 |
*/
|
20 |
public function getHashes( $sVersion, $sHashAlgo = null ) {
|
21 |
-
$oReq =
|
22 |
$oReq->version = $sVersion;
|
23 |
$oReq->hash = $sHashAlgo;
|
24 |
-
return $this->
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
* @return string[]|null
|
29 |
*/
|
30 |
public function getCurrent() {
|
31 |
-
$
|
32 |
-
return $this->getHashes( $oWp->getVersion(), $this->getHashAlgo() );
|
33 |
}
|
34 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services;
|
6 |
|
7 |
/**
|
8 |
* Class ClassicPress
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes
|
10 |
*/
|
11 |
class ClassicPress extends Base {
|
12 |
|
18 |
* @return string[]|null
|
19 |
*/
|
20 |
public function getHashes( $sVersion, $sHashAlgo = null ) {
|
21 |
+
$oReq = $this->getRequestVO();
|
22 |
$oReq->version = $sVersion;
|
23 |
$oReq->hash = $sHashAlgo;
|
24 |
+
return $this->query();
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
* @return string[]|null
|
29 |
*/
|
30 |
public function getCurrent() {
|
31 |
+
return $this->getHashes( Services\Services::WpGeneral()->getVersion() );
|
|
|
32 |
}
|
33 |
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/Plugin.php
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services;
|
6 |
|
7 |
/**
|
8 |
* Class Plugin
|
9 |
-
* @package FernleafSystems\Wordpress\Services\Utilities\
|
10 |
*/
|
11 |
class Plugin extends Base {
|
12 |
|
@@ -19,11 +19,11 @@ class Plugin extends Base {
|
|
19 |
* @return array|null
|
20 |
*/
|
21 |
public function getHashes( $sSlug, $sVersion, $sHashAlgo = null ) {
|
22 |
-
$oReq =
|
23 |
$oReq->version = $sVersion;
|
24 |
$oReq->hash = $sHashAlgo;
|
25 |
$oReq->slug = $sSlug;
|
26 |
-
return $this->
|
27 |
}
|
28 |
|
29 |
/**
|
@@ -31,6 +31,6 @@ class Plugin extends Base {
|
|
31 |
* @return array|null
|
32 |
*/
|
33 |
public function getHashesFromVO( Services\Core\VOs\WpPluginVo $oPluginVO ) {
|
34 |
-
return $this->getHashes( $oPluginVO->slug, $oPluginVO->Version
|
35 |
}
|
36 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services;
|
6 |
|
7 |
/**
|
8 |
* Class Plugin
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes
|
10 |
*/
|
11 |
class Plugin extends Base {
|
12 |
|
19 |
* @return array|null
|
20 |
*/
|
21 |
public function getHashes( $sSlug, $sVersion, $sHashAlgo = null ) {
|
22 |
+
$oReq = $this->getRequestVO();
|
23 |
$oReq->version = $sVersion;
|
24 |
$oReq->hash = $sHashAlgo;
|
25 |
$oReq->slug = $sSlug;
|
26 |
+
return $this->query();
|
27 |
}
|
28 |
|
29 |
/**
|
31 |
* @return array|null
|
32 |
*/
|
33 |
public function getHashesFromVO( Services\Core\VOs\WpPluginVo $oPluginVO ) {
|
34 |
+
return $this->getHashes( $oPluginVO->slug, $oPluginVO->Version );
|
35 |
}
|
36 |
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Hashes/RequestVO.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class RequestVO
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes
|
10 |
+
* @property string $version
|
11 |
+
* @property string $hash
|
12 |
+
* @property string $slug
|
13 |
+
* @property string $locale
|
14 |
+
*/
|
15 |
+
class RequestVO extends Integrations\RequestVO {
|
16 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/{WpOrg → Integrations/WpHashes}/Hashes/WordPress.php
RENAMED
@@ -1,16 +1,16 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
/**
|
8 |
* Class WordPress
|
9 |
-
* @package FernleafSystems\Wordpress\Services\Utilities\
|
10 |
*/
|
11 |
class WordPress extends Base {
|
12 |
|
13 |
-
const API_ENDPOINT = '
|
14 |
|
15 |
/**
|
16 |
* @param string $sVersion
|
@@ -19,11 +19,11 @@ class WordPress extends Base {
|
|
19 |
* @return string[]|null
|
20 |
*/
|
21 |
public function getHashes( $sVersion, $sLocale = null, $sHashAlgo = null ) {
|
22 |
-
$oReq =
|
23 |
$oReq->version = $sVersion;
|
24 |
$oReq->hash = $sHashAlgo;
|
25 |
$oReq->locale = strtolower( empty( $sLocale ) ? Services::WpGeneral()->getLocaleForChecksums() : $sLocale );
|
26 |
-
return $this->
|
27 |
}
|
28 |
|
29 |
/**
|
@@ -31,6 +31,6 @@ class WordPress extends Base {
|
|
31 |
*/
|
32 |
public function getCurrent() {
|
33 |
$oWp = Services::WpGeneral();
|
34 |
-
return $this->getHashes( $oWp->getVersion(), $oWp->getLocaleForChecksums()
|
35 |
}
|
36 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes;
|
4 |
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
/**
|
8 |
* Class WordPress
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes
|
10 |
*/
|
11 |
class WordPress extends Base {
|
12 |
|
13 |
+
const API_ENDPOINT = 'wordpress';
|
14 |
|
15 |
/**
|
16 |
* @param string $sVersion
|
19 |
* @return string[]|null
|
20 |
*/
|
21 |
public function getHashes( $sVersion, $sLocale = null, $sHashAlgo = null ) {
|
22 |
+
$oReq = $this->getRequestVO();
|
23 |
$oReq->version = $sVersion;
|
24 |
$oReq->hash = $sHashAlgo;
|
25 |
$oReq->locale = strtolower( empty( $sLocale ) ? Services::WpGeneral()->getLocaleForChecksums() : $sLocale );
|
26 |
+
return $this->query();
|
27 |
}
|
28 |
|
29 |
/**
|
31 |
*/
|
32 |
public function getCurrent() {
|
33 |
$oWp = Services::WpGeneral();
|
34 |
+
return $this->getHashes( $oWp->getVersion(), $oWp->getLocaleForChecksums() );
|
35 |
}
|
36 |
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/Base.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
6 |
+
|
7 |
+
abstract class Base extends WpHashes\ApiBase {
|
8 |
+
|
9 |
+
const API_ENDPOINT = 'malware/';
|
10 |
+
const RESPONSE_DATA_KEY = 'hashes';
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @return array[]|null
|
14 |
+
*/
|
15 |
+
public function query() {
|
16 |
+
return parent::query();
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return RequestVO
|
21 |
+
*/
|
22 |
+
protected function newReqVO() {
|
23 |
+
return new RequestVO();
|
24 |
+
}
|
25 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/RequestVO.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class RequestVO
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware
|
10 |
+
*/
|
11 |
+
class RequestVO extends Integrations\RequestVO {
|
12 |
+
|
13 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Malware/WhitelistRetrieve.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class WhitelistRetrieve
|
7 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware
|
8 |
+
*/
|
9 |
+
class WhitelistRetrieve extends Base {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @return array[]|null
|
13 |
+
*/
|
14 |
+
public function getFiles() {
|
15 |
+
return $this->query();
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
protected function getApiUrl() {
|
22 |
+
return sprintf( '%s%s', parent::getApiUrl(), 'whitelist/files' );
|
23 |
+
}
|
24 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Base.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes;
|
6 |
+
|
7 |
+
abstract class Base extends WpHashes\ApiBase {
|
8 |
+
|
9 |
+
const API_ENDPOINT = 'vulnerabilities/';
|
10 |
+
const ASSET_TYPE = '';
|
11 |
+
const RESPONSE_DATA_KEY = 'vulnerabilities';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @return array[]|null
|
15 |
+
*/
|
16 |
+
public function query() {
|
17 |
+
return parent::query();
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
protected function getApiUrl() {
|
24 |
+
return parent::getApiUrl().$this->getRequestVO()->type.'/';
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @return RequestVO
|
29 |
+
*/
|
30 |
+
protected function getRequestVO() {
|
31 |
+
$oReq = parent::getRequestVO();
|
32 |
+
$oReq->type = static::ASSET_TYPE;
|
33 |
+
return $oReq;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @return RequestVO
|
38 |
+
*/
|
39 |
+
protected function newReqVO() {
|
40 |
+
return new RequestVO();
|
41 |
+
}
|
42 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/BasePluginTheme.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class BasePluginTheme
|
7 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities
|
8 |
+
*/
|
9 |
+
abstract class BasePluginTheme extends Base {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @param string $sSlug
|
13 |
+
* @param string $sVersion
|
14 |
+
* @return array[]|null
|
15 |
+
*/
|
16 |
+
public function getVulnerabilities( $sSlug, $sVersion ) {
|
17 |
+
$oReq = $this->getRequestVO();
|
18 |
+
$oReq->slug = $sSlug;
|
19 |
+
$oReq->version = $sVersion;
|
20 |
+
return $this->query();
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
protected function getApiUrl() {
|
27 |
+
$oReq = $this->getRequestVO();
|
28 |
+
return sprintf( '%s%s/%s', parent::getApiUrl(), $oReq->slug, $oReq->version );
|
29 |
+
}
|
30 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Plugin.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Plugin
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities
|
10 |
+
*/
|
11 |
+
class Plugin extends BasePluginTheme {
|
12 |
+
|
13 |
+
const ASSET_TYPE = 'plugin';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @param Services\Core\VOs\WpPluginVo $oPluginVO
|
17 |
+
* @return array[]|null
|
18 |
+
*/
|
19 |
+
public function getFromVO( Services\Core\VOs\WpPluginVo $oPluginVO ) {
|
20 |
+
return $this->getVulnerabilities( $oPluginVO->slug, $oPluginVO->Version );
|
21 |
+
}
|
22 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/RequestVO.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Utilities\Integrations;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class RequestVO
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities
|
10 |
+
* @property string $type
|
11 |
+
* @property string $version
|
12 |
+
* @property string $slug
|
13 |
+
*/
|
14 |
+
class RequestVO extends Integrations\RequestVO {
|
15 |
+
|
16 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/Theme.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Class Theme
|
7 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities
|
8 |
+
*/
|
9 |
+
class Theme extends BasePluginTheme {
|
10 |
+
|
11 |
+
const ASSET_TYPE = 'theme';
|
12 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/Integrations/WpHashes/Vulnerabilities/WordPress.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Vulnerabilities;
|
4 |
+
|
5 |
+
use FernleafSystems\Wordpress\Services\Services;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class WordPress
|
9 |
+
* @package FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Hashes
|
10 |
+
*/
|
11 |
+
class WordPress extends Base {
|
12 |
+
|
13 |
+
const ASSET_TYPE = 'wordpress';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @param string $sVersion
|
17 |
+
* @return array[]|null
|
18 |
+
*/
|
19 |
+
public function getVulnerabilities( $sVersion ) {
|
20 |
+
if ( empty( $sVersion ) ) {
|
21 |
+
$sVersion = Services::WpGeneral()->getVersion( true );
|
22 |
+
}
|
23 |
+
$oReq = $this->getRequestVO();
|
24 |
+
$oReq->version = $sVersion;
|
25 |
+
return $this->query();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
protected function getApiUrl() {
|
32 |
+
return sprintf( '%s/%s', parent::getApiUrl(), $this->getRequestVO()->version );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @return array[]|null
|
37 |
+
*/
|
38 |
+
public function getCurrent() {
|
39 |
+
$oWp = Services::WpGeneral();
|
40 |
+
return $this->getVulnerabilities( $oWp->getVersion( true ) );
|
41 |
+
}
|
42 |
+
}
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Base.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Services\Utilities\HttpRequest;
|
6 |
-
use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes\HashesRequestVO;
|
7 |
-
|
8 |
-
abstract class Base {
|
9 |
-
|
10 |
-
const API_URL = 'https://wphashes.com/api/apto-wphashes/v1/';
|
11 |
-
const API_ENDPOINT = '';
|
12 |
-
const DEFAULT_HASH_ALGO = 'md5';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
protected $sHash;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @param HashesRequestVO $oReq
|
21 |
-
* @return string[]|null
|
22 |
-
*/
|
23 |
-
public function queryHashes( HashesRequestVO $oReq ) {
|
24 |
-
if ( empty( $oReq->hash ) ) {
|
25 |
-
$oReq->hash = $this->getHashAlgo();
|
26 |
-
}
|
27 |
-
$sUrl = add_query_arg( array_map( 'strtolower', $oReq->getRawDataAsArray() ), $this->getApiUrl() );
|
28 |
-
$sResponse = ( new HttpRequest() )->getContent( $sUrl );
|
29 |
-
$aData = empty( $sResponse ) ? null : json_decode( $sResponse, true );
|
30 |
-
return is_array( $aData ) ? $aData[ 'hashes' ] : null;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
protected function getApiUrl() {
|
37 |
-
return static::API_URL.static::API_ENDPOINT;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
public function getHashAlgo() {
|
44 |
-
return empty( $this->sHash ) ? static::DEFAULT_HASH_ALGO : $this->sHash;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* @param string $sHashAlgo
|
49 |
-
* @return $this
|
50 |
-
*/
|
51 |
-
public function setHashAlgo( $sHashAlgo ) {
|
52 |
-
$this->sHash = $sHashAlgo;
|
53 |
-
return $this;
|
54 |
-
}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/HashesRequestVO.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes;
|
4 |
-
|
5 |
-
use FernleafSystems\Utilities\Data\Adapter\StdClassAdapter;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class HashesRequestVO
|
9 |
-
* @package FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes
|
10 |
-
* @property string $version
|
11 |
-
* @property string $hash
|
12 |
-
* @property string $slug
|
13 |
-
* @property string $locale
|
14 |
-
*/
|
15 |
-
class HashesRequestVO {
|
16 |
-
|
17 |
-
use StdClassAdapter;
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Hashes/Ping.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes;
|
4 |
-
|
5 |
-
use FernleafSystems\Wordpress\Services\Utilities\HttpRequest;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class Ping
|
9 |
-
* @package FernleafSystems\Wordpress\Services\Utilities\WpOrg\Hashes
|
10 |
-
*/
|
11 |
-
class Ping extends Base {
|
12 |
-
|
13 |
-
const API_ENDPOINT = 'ping';
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @return bool
|
17 |
-
*/
|
18 |
-
public function ping() {
|
19 |
-
$sResponse = ( new HttpRequest() )->getContent( $this->getApiUrl() );
|
20 |
-
$aR = empty( $sResponse ) ? null : json_decode( $sResponse, true );
|
21 |
-
return ( is_array( $aR ) && isset( $aR[ 'pong' ] ) ) ? ( $aR[ 'pong' ] == 'ping' ) : false;
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/admin_access_restriction.php
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_AdminAccessRestriction extends
|
6 |
|
7 |
/**
|
8 |
* @var string
|
@@ -10,13 +12,13 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
10 |
protected $sOptionRegexPattern;
|
11 |
|
12 |
public function run() {
|
13 |
-
/** @var
|
14 |
-
$
|
15 |
|
16 |
-
add_filter( $
|
17 |
|
18 |
-
if ( $
|
19 |
-
$this->getSubProWhitelabel()->
|
20 |
}
|
21 |
}
|
22 |
|
@@ -25,7 +27,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
25 |
* @return bool
|
26 |
*/
|
27 |
public function adjustUserAdminPermissions( $bHasPermission = true ) {
|
28 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oFO */
|
29 |
$oFO = $this->getMod();
|
30 |
return $bHasPermission && ( $oFO->isRegisteredSecAdminUser() || $oFO->isSecAdminSessionValid()
|
31 |
|| $oFO->testSecAccessKeyRequest() );
|
@@ -35,14 +37,16 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
35 |
parent::onWpInit();
|
36 |
|
37 |
if ( !$this->getCon()->isPluginAdmin() ) {
|
38 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
39 |
$oMod = $this->getMod();
|
|
|
|
|
40 |
|
41 |
if ( !$oMod->isUpgrading() && !Services::WpGeneral()->isLoginRequest() ) {
|
42 |
add_filter( 'pre_update_option', [ $this, 'blockOptionsSaves' ], 1, 3 );
|
43 |
}
|
44 |
|
45 |
-
if ( $
|
46 |
add_filter( 'editable_roles', [ $this, 'restrictEditableRoles' ], 100, 1 );
|
47 |
add_filter( 'user_has_cap', [ $this, 'restrictAdminUserChanges' ], 100, 3 );
|
48 |
add_action( 'delete_user', [ $this, 'restrictAdminUserDelete' ], 100, 1 );
|
@@ -51,17 +55,17 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
51 |
add_action( 'set_user_role', [ $this, 'restrictSetUserRole' ], 100, 3 );
|
52 |
}
|
53 |
|
54 |
-
$aPluginRestrictions = $
|
55 |
if ( !empty( $aPluginRestrictions ) ) {
|
56 |
add_filter( 'user_has_cap', [ $this, 'disablePluginManipulation' ], 0, 3 );
|
57 |
}
|
58 |
|
59 |
-
$aThemeRestrictions = $
|
60 |
if ( !empty( $aThemeRestrictions ) ) {
|
61 |
add_filter( 'user_has_cap', [ $this, 'disableThemeManipulation' ], 0, 3 );
|
62 |
}
|
63 |
|
64 |
-
$aPostRestrictions = $
|
65 |
if ( !empty( $aPostRestrictions ) ) {
|
66 |
add_filter( 'user_has_cap', [ $this, 'disablePostsManipulation' ], 0, 3 );
|
67 |
}
|
@@ -73,7 +77,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
-
* @return ICWP_WPSF_Processor_AdminAccess_Whitelabel|mixed
|
77 |
*/
|
78 |
protected function getSubProWhitelabel() {
|
79 |
return $this->getSubPro( 'wl' );
|
@@ -310,12 +314,15 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
310 |
*/
|
311 |
protected function isOptionRestricted( $sOptionKey ) {
|
312 |
$bRestricted = false;
|
313 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $
|
314 |
-
$
|
315 |
-
|
|
|
|
|
|
|
316 |
$bRestricted = in_array(
|
317 |
$sOptionKey,
|
318 |
-
$
|
319 |
);
|
320 |
}
|
321 |
return $bRestricted;
|
@@ -328,8 +335,8 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
328 |
* @return array
|
329 |
*/
|
330 |
public function disablePluginManipulation( $aAllCaps, $cap, $aArgs ) {
|
331 |
-
/** @var
|
332 |
-
$
|
333 |
$oReq = Services::Request();
|
334 |
|
335 |
/** @var string $sRequestedCapability */
|
@@ -347,7 +354,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
347 |
$aEditCapabilities = [ 'activate_plugins', 'delete_plugins', 'install_plugins', 'update_plugins' ];
|
348 |
|
349 |
if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
|
350 |
-
$aAreaRestrictions = $
|
351 |
if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
|
352 |
$aAllCaps[ $sRequestedCapability ] = false;
|
353 |
}
|
@@ -368,8 +375,8 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
368 |
return $aAllCaps;
|
369 |
}
|
370 |
|
371 |
-
/** @var
|
372 |
-
$
|
373 |
|
374 |
/** @var string $sRequestedCapability */
|
375 |
$sRequestedCapability = $aArgs[ 0 ];
|
@@ -382,7 +389,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
382 |
];
|
383 |
|
384 |
if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
|
385 |
-
$aAreaRestrictions = $
|
386 |
if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
|
387 |
$aAllCaps[ $sRequestedCapability ] = false;
|
388 |
}
|
@@ -402,8 +409,8 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
402 |
return $aAllCaps;
|
403 |
}
|
404 |
|
405 |
-
/** @var
|
406 |
-
$
|
407 |
|
408 |
/** @var string $sRequestedCapability */
|
409 |
$sRequestedCapability = $aArgs[ 0 ];
|
@@ -428,7 +435,7 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
428 |
'_post',
|
429 |
'_page'
|
430 |
], '', $sRequestedCapability ); //Order of items in this array is important!
|
431 |
-
$aAreaRestrictions = $
|
432 |
if ( in_array( $sRequestedCapabilityTrimmed, $aAreaRestrictions ) ) {
|
433 |
$aAllCaps[ $sRequestedCapability ] = false;
|
434 |
}
|
@@ -449,26 +456,28 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
449 |
}
|
450 |
|
451 |
public function printAdminAccessAjaxForm() {
|
452 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $
|
453 |
-
$
|
|
|
|
|
454 |
|
455 |
$aRenderData = [
|
456 |
'flags' => [
|
457 |
-
'restrict_options' => $
|
458 |
],
|
459 |
'strings' => [
|
460 |
'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
|
461 |
'unlock_link' => $this->getUnlockLinkHtml(),
|
462 |
],
|
463 |
'js_snippets' => [
|
464 |
-
'options_to_restrict' => "'".implode( "','", $
|
465 |
],
|
466 |
'ajax' => [
|
467 |
-
'sec_admin_login_box' => $
|
468 |
]
|
469 |
];
|
470 |
add_thickbox();
|
471 |
-
echo $
|
472 |
}
|
473 |
|
474 |
/**
|
@@ -486,22 +495,4 @@ class ICWP_WPSF_Processor_AdminAccessRestriction extends ICWP_WPSF_Processor_Bas
|
|
486 |
$sLinkText
|
487 |
);
|
488 |
}
|
489 |
-
|
490 |
-
/**
|
491 |
-
* @param array $aNoticeAttributes
|
492 |
-
* @throws \Exception
|
493 |
-
* @deprecated
|
494 |
-
*/
|
495 |
-
public function addNotice_certain_options_restricted( $aNoticeAttributes ) {
|
496 |
-
return;
|
497 |
-
}
|
498 |
-
|
499 |
-
/**
|
500 |
-
* @param array $aNoticeAttributes
|
501 |
-
* @throws \Exception
|
502 |
-
* @deprecated
|
503 |
-
*/
|
504 |
-
public function addNotice_admin_users_restricted( $aNoticeAttributes ) {
|
505 |
-
return;
|
506 |
-
}
|
507 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\SecurityAdmin;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_AdminAccessRestriction extends Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
/**
|
10 |
* @var string
|
12 |
protected $sOptionRegexPattern;
|
13 |
|
14 |
public function run() {
|
15 |
+
/** @var SecurityAdmin\Options $oOpts */
|
16 |
+
$oOpts = $this->getMod()->getOptions();
|
17 |
|
18 |
+
add_filter( $this->getCon()->prefix( 'is_plugin_admin' ), [ $this, 'adjustUserAdminPermissions' ] );
|
19 |
|
20 |
+
if ( $oOpts->isEnabledWhitelabel() ) {
|
21 |
+
$this->getSubProWhitelabel()->execute();
|
22 |
}
|
23 |
}
|
24 |
|
27 |
* @return bool
|
28 |
*/
|
29 |
public function adjustUserAdminPermissions( $bHasPermission = true ) {
|
30 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oFO */
|
31 |
$oFO = $this->getMod();
|
32 |
return $bHasPermission && ( $oFO->isRegisteredSecAdminUser() || $oFO->isSecAdminSessionValid()
|
33 |
|| $oFO->testSecAccessKeyRequest() );
|
37 |
parent::onWpInit();
|
38 |
|
39 |
if ( !$this->getCon()->isPluginAdmin() ) {
|
40 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
41 |
$oMod = $this->getMod();
|
42 |
+
/** @var SecurityAdmin\Options $oOpts */
|
43 |
+
$oOpts = $oMod->getOptions();
|
44 |
|
45 |
if ( !$oMod->isUpgrading() && !Services::WpGeneral()->isLoginRequest() ) {
|
46 |
add_filter( 'pre_update_option', [ $this, 'blockOptionsSaves' ], 1, 3 );
|
47 |
}
|
48 |
|
49 |
+
if ( $oOpts->isSecAdminRestrictUsersEnabled() ) {
|
50 |
add_filter( 'editable_roles', [ $this, 'restrictEditableRoles' ], 100, 1 );
|
51 |
add_filter( 'user_has_cap', [ $this, 'restrictAdminUserChanges' ], 100, 3 );
|
52 |
add_action( 'delete_user', [ $this, 'restrictAdminUserDelete' ], 100, 1 );
|
55 |
add_action( 'set_user_role', [ $this, 'restrictSetUserRole' ], 100, 3 );
|
56 |
}
|
57 |
|
58 |
+
$aPluginRestrictions = $oOpts->getAdminAccessArea_Plugins();
|
59 |
if ( !empty( $aPluginRestrictions ) ) {
|
60 |
add_filter( 'user_has_cap', [ $this, 'disablePluginManipulation' ], 0, 3 );
|
61 |
}
|
62 |
|
63 |
+
$aThemeRestrictions = $oOpts->getAdminAccessArea_Themes();
|
64 |
if ( !empty( $aThemeRestrictions ) ) {
|
65 |
add_filter( 'user_has_cap', [ $this, 'disableThemeManipulation' ], 0, 3 );
|
66 |
}
|
67 |
|
68 |
+
$aPostRestrictions = $oOpts->getAdminAccessArea_Posts();
|
69 |
if ( !empty( $aPostRestrictions ) ) {
|
70 |
add_filter( 'user_has_cap', [ $this, 'disablePostsManipulation' ], 0, 3 );
|
71 |
}
|
77 |
}
|
78 |
|
79 |
/**
|
80 |
+
* @return \ICWP_WPSF_Processor_AdminAccess_Whitelabel|mixed
|
81 |
*/
|
82 |
protected function getSubProWhitelabel() {
|
83 |
return $this->getSubPro( 'wl' );
|
314 |
*/
|
315 |
protected function isOptionRestricted( $sOptionKey ) {
|
316 |
$bRestricted = false;
|
317 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
318 |
+
$oMod = $this->getMod();
|
319 |
+
/** @var SecurityAdmin\Options $oOpts */
|
320 |
+
$oOpts = $oMod->getOptions();
|
321 |
+
|
322 |
+
if ( $oOpts->getAdminAccessArea_Options() ) {
|
323 |
$bRestricted = in_array(
|
324 |
$sOptionKey,
|
325 |
+
$oOpts->getOptionsToRestrict()
|
326 |
);
|
327 |
}
|
328 |
return $bRestricted;
|
335 |
* @return array
|
336 |
*/
|
337 |
public function disablePluginManipulation( $aAllCaps, $cap, $aArgs ) {
|
338 |
+
/** @var SecurityAdmin\Options $oOpts */
|
339 |
+
$oOpts = $this->getMod()->getOptions();
|
340 |
$oReq = Services::Request();
|
341 |
|
342 |
/** @var string $sRequestedCapability */
|
354 |
$aEditCapabilities = [ 'activate_plugins', 'delete_plugins', 'install_plugins', 'update_plugins' ];
|
355 |
|
356 |
if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
|
357 |
+
$aAreaRestrictions = $oOpts->getAdminAccessArea_Plugins();
|
358 |
if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
|
359 |
$aAllCaps[ $sRequestedCapability ] = false;
|
360 |
}
|
375 |
return $aAllCaps;
|
376 |
}
|
377 |
|
378 |
+
/** @var SecurityAdmin\Options $oOpts */
|
379 |
+
$oOpts = $this->getMod()->getOptions();
|
380 |
|
381 |
/** @var string $sRequestedCapability */
|
382 |
$sRequestedCapability = $aArgs[ 0 ];
|
389 |
];
|
390 |
|
391 |
if ( in_array( $sRequestedCapability, $aEditCapabilities ) ) {
|
392 |
+
$aAreaRestrictions = $oOpts->getAdminAccessArea_Themes();
|
393 |
if ( in_array( $sRequestedCapability, $aAreaRestrictions ) ) {
|
394 |
$aAllCaps[ $sRequestedCapability ] = false;
|
395 |
}
|
409 |
return $aAllCaps;
|
410 |
}
|
411 |
|
412 |
+
/** @var SecurityAdmin\Options $oOpts */
|
413 |
+
$oOpts = $this->getMod()->getOptions();
|
414 |
|
415 |
/** @var string $sRequestedCapability */
|
416 |
$sRequestedCapability = $aArgs[ 0 ];
|
435 |
'_post',
|
436 |
'_page'
|
437 |
], '', $sRequestedCapability ); //Order of items in this array is important!
|
438 |
+
$aAreaRestrictions = $oOpts->getAdminAccessArea_Posts();
|
439 |
if ( in_array( $sRequestedCapabilityTrimmed, $aAreaRestrictions ) ) {
|
440 |
$aAllCaps[ $sRequestedCapability ] = false;
|
441 |
}
|
456 |
}
|
457 |
|
458 |
public function printAdminAccessAjaxForm() {
|
459 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
460 |
+
$oMod = $this->getMod();
|
461 |
+
/** @var SecurityAdmin\Options $oOpts */
|
462 |
+
$oOpts = $oMod->getOptions();
|
463 |
|
464 |
$aRenderData = [
|
465 |
'flags' => [
|
466 |
+
'restrict_options' => $oOpts->getAdminAccessArea_Options()
|
467 |
],
|
468 |
'strings' => [
|
469 |
'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
|
470 |
'unlock_link' => $this->getUnlockLinkHtml(),
|
471 |
],
|
472 |
'js_snippets' => [
|
473 |
+
'options_to_restrict' => "'".implode( "','", $oOpts->getOptionsToRestrict() )."'",
|
474 |
],
|
475 |
'ajax' => [
|
476 |
+
'sec_admin_login_box' => $oMod->getAjaxActionData( 'sec_admin_login_box', true )
|
477 |
]
|
478 |
];
|
479 |
add_thickbox();
|
480 |
+
echo $oMod->renderTemplate( 'snippets/admin_access_login_box.php', $aRenderData );
|
481 |
}
|
482 |
|
483 |
/**
|
495 |
$sLinkText
|
496 |
);
|
497 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
}
|
src/processors/adminaccess_whitelabel.php
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_AdminAccess_Whitelabel extends
|
6 |
|
7 |
/**
|
8 |
*/
|
9 |
public function run() {
|
10 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
11 |
$oMod = $this->getMod();
|
12 |
add_filter( $oMod->prefix( 'is_relabelled' ), '__return_true' );
|
13 |
add_filter( $oMod->prefix( 'plugin_labels' ), [ $this, 'doRelabelPlugin' ] );
|
@@ -18,11 +19,9 @@ class ICWP_WPSF_Processor_AdminAccess_Whitelabel extends ICWP_WPSF_Processor_Bas
|
|
18 |
public function onWpInit() {
|
19 |
parent::onWpInit();
|
20 |
|
21 |
-
/** @var
|
22 |
-
$
|
23 |
-
$
|
24 |
-
|
25 |
-
if ( $oFO->isWlHideUpdates() && $this->isNeedToHideUpdates() && !$oCon->isPluginAdmin() ) {
|
26 |
$this->hideUpdates();
|
27 |
}
|
28 |
}
|
@@ -67,7 +66,7 @@ class ICWP_WPSF_Processor_AdminAccess_Whitelabel extends ICWP_WPSF_Processor_Bas
|
|
67 |
* @return array
|
68 |
*/
|
69 |
public function doRelabelPlugin( $aPluginLabels ) {
|
70 |
-
/** @var ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oFO */
|
71 |
$oFO = $this->getMod();
|
72 |
|
73 |
$aWhiteLabels = $oFO->getWhitelabelOptions();
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_AdminAccess_Whitelabel extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oMod */
|
12 |
$oMod = $this->getMod();
|
13 |
add_filter( $oMod->prefix( 'is_relabelled' ), '__return_true' );
|
14 |
add_filter( $oMod->prefix( 'plugin_labels' ), [ $this, 'doRelabelPlugin' ] );
|
19 |
public function onWpInit() {
|
20 |
parent::onWpInit();
|
21 |
|
22 |
+
/** @var Modules\SecurityAdmin\Options $oOpts */
|
23 |
+
$oOpts = $this->getMod()->getOptions();
|
24 |
+
if ( $oOpts->isWlHideUpdates() && $this->isNeedToHideUpdates() && !$this->getCon()->isPluginAdmin() ) {
|
|
|
|
|
25 |
$this->hideUpdates();
|
26 |
}
|
27 |
}
|
66 |
* @return array
|
67 |
*/
|
68 |
public function doRelabelPlugin( $aPluginLabels ) {
|
69 |
+
/** @var \ICWP_WPSF_FeatureHandler_AdminAccessRestriction $oFO */
|
70 |
$oFO = $this->getMod();
|
71 |
|
72 |
$aWhiteLabels = $oFO->getWhitelabelOptions();
|
src/processors/audit_trail.php
CHANGED
@@ -1,17 +1,19 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_AuditTrail extends
|
6 |
|
7 |
public function run() {
|
8 |
-
/** @var
|
9 |
-
$
|
10 |
-
if ( $
|
11 |
-
$this->getSubProAuditor()->
|
12 |
}
|
13 |
-
if ( $
|
14 |
-
$this->getSubProChangeTracking()->
|
15 |
}
|
16 |
}
|
17 |
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_AuditTrail extends Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
public function run() {
|
10 |
+
/** @var AuditTrail\Options $oOpts */
|
11 |
+
$oOpts = $this->getMod()->getOptions();
|
12 |
+
if ( $oOpts->isEnabledAuditing() ) {
|
13 |
+
$this->getSubProAuditor()->execute();
|
14 |
}
|
15 |
+
if ( $oOpts->isEnabledChangeTracking() ) {
|
16 |
+
$this->getSubProChangeTracking()->execute();
|
17 |
}
|
18 |
}
|
19 |
|
src/processors/audit_trail_auditor.php
CHANGED
@@ -3,22 +3,15 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\AuditTrail;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Auditors;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Options;
|
|
|
6 |
|
7 |
-
|
8 |
-
class ICWP_WPSF_Processor_AuditTrail_Auditor extends ICWP_WPSF_BaseDbProcessor {
|
9 |
|
10 |
/**
|
11 |
* @var bool
|
12 |
*/
|
13 |
private $bAudit = false;
|
14 |
|
15 |
-
/**
|
16 |
-
* @param ICWP_WPSF_FeatureHandler_AuditTrail $oModCon
|
17 |
-
*/
|
18 |
-
public function __construct( ICWP_WPSF_FeatureHandler_AuditTrail $oModCon ) {
|
19 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'audit_trail_table_name' ) );
|
20 |
-
}
|
21 |
-
|
22 |
/**
|
23 |
*/
|
24 |
public function run() {
|
@@ -27,7 +20,7 @@ class ICWP_WPSF_Processor_AuditTrail_Auditor extends ICWP_WPSF_BaseDbProcessor {
|
|
27 |
}
|
28 |
$this->bAudit = true;
|
29 |
|
30 |
-
/** @var ICWP_WPSF_FeatureHandler_AuditTrail $oMod */
|
31 |
$oMod = $this->getMod();
|
32 |
/** @var Options $oOpts */
|
33 |
$oOpts = $oMod->getOptions();
|
@@ -75,21 +68,6 @@ class ICWP_WPSF_Processor_AuditTrail_Auditor extends ICWP_WPSF_BaseDbProcessor {
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
-
/**
|
79 |
-
* @param string $sContext
|
80 |
-
* @return array|bool
|
81 |
-
*/
|
82 |
-
public function countAuditEntriesForContext( $sContext = 'all' ) {
|
83 |
-
/** @var ICWP_WPSF_FeatureHandler_AuditTrail $oFO */
|
84 |
-
$oFO = $this->getMod();
|
85 |
-
/** @var AuditTrail\Select $oCounter */
|
86 |
-
$oCounter = $oFO->getDbHandler()->getQuerySelector();
|
87 |
-
if ( $sContext != 'all' ) {
|
88 |
-
$oCounter->filterByContext( $sContext );
|
89 |
-
}
|
90 |
-
return $oCounter->count();
|
91 |
-
}
|
92 |
-
|
93 |
/**
|
94 |
* @CENTRAL
|
95 |
* @param string $sContext
|
@@ -109,76 +87,6 @@ class ICWP_WPSF_Processor_AuditTrail_Auditor extends ICWP_WPSF_BaseDbProcessor {
|
|
109 |
->setOrderBy( $sOrderBy, $sOrder )
|
110 |
->setLimit( $nLimit )
|
111 |
->setPage( $nPage );
|
112 |
-
if ( $sContext != 'all' ) {
|
113 |
-
$oSelect->filterByContext( $sContext );
|
114 |
-
}
|
115 |
-
|
116 |
return $oSelect->query();
|
117 |
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* @return string
|
121 |
-
*/
|
122 |
-
protected function getCreateTableSql() {
|
123 |
-
return "CREATE TABLE %s (
|
124 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
125 |
-
rid varchar(10) NOT NULL DEFAULT '' COMMENT 'Request ID',
|
126 |
-
ip varchar(40) NOT NULL DEFAULT 0 COMMENT 'Visitor IP Address',
|
127 |
-
wp_username varchar(255) NOT NULL DEFAULT '-' COMMENT 'WP User',
|
128 |
-
context varchar(32) NOT NULL DEFAULT 'none' COMMENT 'Audit Context',
|
129 |
-
event varchar(50) NOT NULL DEFAULT 'none' COMMENT 'Specific Audit Event',
|
130 |
-
category int(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Severity',
|
131 |
-
message text COMMENT 'Audit Event Description',
|
132 |
-
meta text COMMENT 'Audit Event Data',
|
133 |
-
immutable tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'May Be Deleted',
|
134 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
135 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
136 |
-
PRIMARY KEY (id)
|
137 |
-
) %s;";
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* @return array
|
142 |
-
*/
|
143 |
-
protected function getTableColumnsByDefinition() {
|
144 |
-
$aDef = $this->getMod()->getDef( 'audit_trail_table_columns' );
|
145 |
-
return ( is_array( $aDef ) ? $aDef : [] );
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* override and do not delete
|
150 |
-
*/
|
151 |
-
public function deleteTable() {
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* @return int|null
|
156 |
-
*/
|
157 |
-
protected function getAutoExpirePeriod() {
|
158 |
-
/** @var \ICWP_WPSF_FeatureHandler_AuditTrail $oFO */
|
159 |
-
$oFO = $this->getMod();
|
160 |
-
return $oFO->getAutoCleanDays()*DAY_IN_SECONDS;
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* @return AuditTrail\Handler
|
165 |
-
* @deprecated 8
|
166 |
-
*/
|
167 |
-
protected function createDbHandler() {
|
168 |
-
return new AuditTrail\Handler();
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* @param AuditTrail\EntryVO $oEntryVo
|
173 |
-
* @deprecated 8
|
174 |
-
*/
|
175 |
-
public function addAuditTrialEntry( $oEntryVo ) {
|
176 |
-
return;
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* @deprecated
|
181 |
-
*/
|
182 |
-
protected function trimTable() {
|
183 |
-
}
|
184 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\AuditTrail;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Auditors;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Options;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
7 |
|
8 |
+
class ICWP_WPSF_Processor_AuditTrail_Auditor extends ShieldProcessor {
|
|
|
9 |
|
10 |
/**
|
11 |
* @var bool
|
12 |
*/
|
13 |
private $bAudit = false;
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
*/
|
17 |
public function run() {
|
20 |
}
|
21 |
$this->bAudit = true;
|
22 |
|
23 |
+
/** @var \ICWP_WPSF_FeatureHandler_AuditTrail $oMod */
|
24 |
$oMod = $this->getMod();
|
25 |
/** @var Options $oOpts */
|
26 |
$oOpts = $oMod->getOptions();
|
68 |
}
|
69 |
}
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/**
|
72 |
* @CENTRAL
|
73 |
* @param string $sContext
|
87 |
->setOrderBy( $sOrderBy, $sOrder )
|
88 |
->setLimit( $nLimit )
|
89 |
->setPage( $nPage );
|
|
|
|
|
|
|
|
|
90 |
return $oSelect->query();
|
91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
src/processors/audit_trail_auditor_base.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_AuditTrail_Auditor_Base
|
5 |
-
* @deprecated 8
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_AuditTrail_Auditor_Base extends \FernleafSystems\Wordpress\Plugin\Shield\Deprecated\Foundation {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* @param string $sContext
|
11 |
-
* @param string $sEvent
|
12 |
-
* @param int $nCategory
|
13 |
-
* @param string $sMessage
|
14 |
-
* @param array $aData
|
15 |
-
* @deprecated
|
16 |
-
*/
|
17 |
-
public function add( $sContext, $sEvent, $nCategory, $sMessage = '', $aData = [] ) {
|
18 |
-
}
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_changetracking.php
CHANGED
@@ -2,23 +2,25 @@
|
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\ChangeTrack;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\ChangeTracking;
|
|
|
|
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
-
class ICWP_WPSF_Processor_AuditTrail_ChangeTracking extends
|
8 |
|
9 |
/**
|
10 |
-
* @param ICWP_WPSF_FeatureHandler_AuditTrail $oModCon
|
11 |
-
* @throws \Exception
|
12 |
*/
|
13 |
-
public function
|
14 |
-
|
|
|
|
|
15 |
}
|
16 |
|
17 |
public function runHourlyCron() {
|
18 |
-
/** @var
|
19 |
-
$
|
20 |
-
if ( $
|
21 |
-
$
|
22 |
$this->runSnapshot();
|
23 |
}
|
24 |
}
|
@@ -52,41 +54,4 @@ class ICWP_WPSF_Processor_AuditTrail_ChangeTracking extends ICWP_WPSF_BaseDbProc
|
|
52 |
$oInsert->insert( $oVo );
|
53 |
return $oVo;
|
54 |
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
*/
|
58 |
-
public function run() {
|
59 |
-
if ( !$this->isReadyToRun() ) {
|
60 |
-
return;
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* @return string
|
66 |
-
*/
|
67 |
-
protected function getCreateTableSql() {
|
68 |
-
return "CREATE TABLE %s (
|
69 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
70 |
-
data BLOB NOT NULL DEFAULT '' COMMENT 'Snapshot Data',
|
71 |
-
meta TEXT NOT NULL DEFAULT '' COMMENT 'Snapshot Meta',
|
72 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
73 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
74 |
-
PRIMARY KEY (id)
|
75 |
-
) %s;";
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* @return array
|
80 |
-
*/
|
81 |
-
protected function getTableColumnsByDefinition() {
|
82 |
-
$aDef = $this->getMod()->getDef( 'table_columns_changetracking' );
|
83 |
-
return ( is_array( $aDef ) ? $aDef : [] );
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* @return ChangeTracking\Handler
|
88 |
-
*/
|
89 |
-
protected function createDbHandler() {
|
90 |
-
return new ChangeTracking\Handler();
|
91 |
-
}
|
92 |
}
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\ChangeTrack;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\ChangeTracking;
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\AuditTrail\Options;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
9 |
+
class ICWP_WPSF_Processor_AuditTrail_ChangeTracking extends ShieldProcessor {
|
10 |
|
11 |
/**
|
|
|
|
|
12 |
*/
|
13 |
+
public function run() {
|
14 |
+
if ( !$this->isReadyToRun() ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
}
|
18 |
|
19 |
public function runHourlyCron() {
|
20 |
+
/** @var Options $oOpts */
|
21 |
+
$oOpts = $this->getMod()->getOptions();
|
22 |
+
if ( $oOpts->isCTSnapshotDue() && $this->isReadyToRun() ) {
|
23 |
+
$oOpts->updateCTLastSnapshotAt();
|
24 |
$this->runSnapshot();
|
25 |
}
|
26 |
}
|
54 |
$oInsert->insert( $oVo );
|
55 |
return $oVo;
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
src/processors/audit_trail_emails.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Services\Services;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Emails
|
7 |
-
* @deprecated 8
|
8 |
-
*/
|
9 |
-
class ICWP_WPSF_Processor_AuditTrail_Emails extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
10 |
-
|
11 |
-
/**
|
12 |
-
*/
|
13 |
-
public function run() {
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param array $aEmail
|
18 |
-
* @return array
|
19 |
-
*/
|
20 |
-
public function auditEmailSend( $aEmail ) {
|
21 |
-
return $aEmail;
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param array $aHeaders
|
26 |
-
* @return array
|
27 |
-
* @deprecated 8
|
28 |
-
*/
|
29 |
-
private function extractCcFromHeaders( $aHeaders ) {
|
30 |
-
return [];
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @return array
|
35 |
-
*/
|
36 |
-
private function findEmailSenderBacktrace() {
|
37 |
-
return [];
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_plugins.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Plugins
|
5 |
-
* @deprecated
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_AuditTrail_Plugins extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
8 |
-
|
9 |
-
/**
|
10 |
-
*/
|
11 |
-
public function run() {
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param string $sPlugin
|
16 |
-
* @deprecated 8
|
17 |
-
*/
|
18 |
-
public function auditActivatedPlugin( $sPlugin ) {
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @param string $sPlugin
|
23 |
-
* @deprecated 8
|
24 |
-
*/
|
25 |
-
public function auditDeactivatedPlugin( $sPlugin ) {
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @param string $sAction
|
30 |
-
* @param bool $bResult
|
31 |
-
* @deprecated 8
|
32 |
-
*/
|
33 |
-
public function auditEditedPluginFile( $sAction, $bResult ) {
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_posts.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Posts
|
5 |
-
* @deprecated 8
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_AuditTrail_Posts extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
8 |
-
|
9 |
-
/**
|
10 |
-
*/
|
11 |
-
public function run() {
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param string $nPostId
|
16 |
-
* @deprecated 8
|
17 |
-
*/
|
18 |
-
public function auditDeletedPost( $nPostId ) {
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @param string $sNewStatus
|
23 |
-
* @param string $sOldStatus
|
24 |
-
* @param \WP_Post $oPost
|
25 |
-
* @deprecated 8
|
26 |
-
*/
|
27 |
-
public function auditPostStatus( $sNewStatus, $sOldStatus, $oPost ) {
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @param WP_Post $oPost
|
32 |
-
* @return bool
|
33 |
-
* @deprecated 8
|
34 |
-
*/
|
35 |
-
protected function isIgnoredPostType( $oPost ) {
|
36 |
-
return true;
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_themes.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Themes
|
5 |
-
* @deprecated
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_AuditTrail_Themes extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
8 |
-
|
9 |
-
/**
|
10 |
-
*/
|
11 |
-
public function run() {
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param string $sThemeName
|
16 |
-
* @deprecated 8
|
17 |
-
*/
|
18 |
-
public function auditSwitchTheme( $sThemeName ) {
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @param string $sAction
|
23 |
-
* @param bool $bResult
|
24 |
-
* @deprecated 8
|
25 |
-
*/
|
26 |
-
public function auditEditedThemeFile( $sAction, $bResult ) {
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_users.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Users
|
5 |
-
* @deprecated
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_AuditTrail_Users extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
8 |
-
|
9 |
-
/**
|
10 |
-
*/
|
11 |
-
public function run() {
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @param string $sUsername
|
16 |
-
* @deprecated 8
|
17 |
-
*/
|
18 |
-
public function auditUserLoginSuccess( $sUsername ) {
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @param int $nUserId
|
23 |
-
* @deprecated 8
|
24 |
-
*/
|
25 |
-
public function auditNewUserRegistered( $nUserId ) {
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @param int $nUserId
|
30 |
-
* @param int $nReassigned
|
31 |
-
* @deprecated 8
|
32 |
-
*/
|
33 |
-
public function auditDeleteUser( $nUserId, $nReassigned ) {
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_wordpress.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Services\Services;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class ICWP_WPSF_Processor_AuditTrail_Wordpress
|
7 |
-
* @deprecated
|
8 |
-
*/
|
9 |
-
class ICWP_WPSF_Processor_AuditTrail_Wordpress extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
10 |
-
|
11 |
-
/**
|
12 |
-
*/
|
13 |
-
public function run() {
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $sNewCoreVersion
|
18 |
-
* @deprecated 8
|
19 |
-
*/
|
20 |
-
public function auditCoreUpdated( $sNewCoreVersion ) {
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param string $sOld
|
25 |
-
* @param string $sNew
|
26 |
-
* @deprecated 8
|
27 |
-
*/
|
28 |
-
public function auditPermalinkStructure( $sOld, $sNew ) {
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/audit_trail_wpsf.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class ICWP_WPSF_Processor_AuditTrail_Wpsf extends ICWP_WPSF_AuditTrail_Auditor_Base {
|
4 |
-
|
5 |
-
/**
|
6 |
-
*/
|
7 |
-
public function run() {
|
8 |
-
}
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/autoupdates.php
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_Autoupdates extends
|
6 |
|
7 |
/**
|
8 |
-
* @var
|
9 |
*/
|
10 |
protected $bDoForceRunAutoupdates = false;
|
11 |
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Autoupdates extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
+
* @var bool
|
10 |
*/
|
11 |
protected $bDoForceRunAutoupdates = false;
|
12 |
|
src/processors/base.php
CHANGED
@@ -3,10 +3,13 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
|
|
|
|
|
|
|
|
6 |
abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
7 |
|
8 |
-
use Shield\Modules\ModConsumer
|
9 |
-
Shield\AuditTrail\Auditor;
|
10 |
|
11 |
/**
|
12 |
* @var int
|
@@ -24,7 +27,7 @@ abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
|
24 |
private $bLoginCaptured;
|
25 |
|
26 |
/**
|
27 |
-
* @param ICWP_WPSF_FeatureHandler_Base $oModCon
|
28 |
*/
|
29 |
public function __construct( $oModCon ) {
|
30 |
$this->setMod( $oModCon );
|
@@ -41,7 +44,6 @@ abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
|
41 |
add_action( $oModCon->prefix( 'daily_cron' ), [ $this, 'runDailyCron' ] );
|
42 |
add_action( $oModCon->prefix( 'hourly_cron' ), [ $this, 'runHourlyCron' ] );
|
43 |
add_action( $oModCon->prefix( 'deactivate_plugin' ), [ $this, 'deactivatePlugin' ] );
|
44 |
-
add_action( $oModCon->prefix( 'generate_admin_notices' ), [ $this, 'autoAddToAdminNotices' ] );
|
45 |
|
46 |
/**
|
47 |
* 2019-04-19:
|
@@ -123,32 +125,6 @@ abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
|
123 |
return $this;
|
124 |
}
|
125 |
|
126 |
-
/**
|
127 |
-
* @param array $aAttrs
|
128 |
-
* @return bool
|
129 |
-
*/
|
130 |
-
protected function getIfDisplayAdminNotice( $aAttrs ) {
|
131 |
-
$bDisplay = true;
|
132 |
-
$oCon = $this->getCon();
|
133 |
-
$oWpNotices = $this->loadWpNotices();
|
134 |
-
|
135 |
-
if ( $aAttrs[ 'valid_admin' ] && !( $oCon->isValidAdminArea() && $oCon->isPluginAdmin() ) ) {
|
136 |
-
$bDisplay = false;
|
137 |
-
}
|
138 |
-
else if ( $aAttrs[ 'plugin_page_only' ] && !$this->getCon()->isModulePage() ) {
|
139 |
-
$bDisplay = false;
|
140 |
-
}
|
141 |
-
else if ( $aAttrs[ 'schedule' ] == 'once'
|
142 |
-
&& ( !Services::WpUsers()->canSaveMeta() || $oWpNotices->isDismissed( $aAttrs[ 'id' ] ) ) ) {
|
143 |
-
$bDisplay = false;
|
144 |
-
}
|
145 |
-
else if ( $aAttrs[ 'type' ] == 'promo' && Services::WpGeneral()->isMobile() ) {
|
146 |
-
$bDisplay = false;
|
147 |
-
}
|
148 |
-
|
149 |
-
return $bDisplay;
|
150 |
-
}
|
151 |
-
|
152 |
public function onModuleShutdown() {
|
153 |
}
|
154 |
|
@@ -263,35 +239,27 @@ abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
|
263 |
}
|
264 |
|
265 |
/**
|
266 |
-
*
|
267 |
-
* @param string $sSuffix
|
268 |
-
* @param string $sGlue
|
269 |
-
* @return string
|
270 |
-
* @deprecated
|
271 |
*/
|
272 |
-
|
273 |
-
return $this->getMod()->prefix( $sSuffix, $sGlue );
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
* @return string
|
278 |
-
* @deprecated
|
279 |
*/
|
280 |
protected function ip() {
|
281 |
return Services::IP()->getRequestIp();
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
-
*
|
286 |
-
* @
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* @deprecated
|
294 |
*/
|
295 |
-
|
|
|
296 |
}
|
297 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
/**
|
7 |
+
* Class ICWP_WPSF_Processor_Base
|
8 |
+
* @deprecated 8.1
|
9 |
+
*/
|
10 |
abstract class ICWP_WPSF_Processor_Base extends Shield\Deprecated\Foundation {
|
11 |
|
12 |
+
use Shield\Modules\ModConsumer;
|
|
|
13 |
|
14 |
/**
|
15 |
* @var int
|
27 |
private $bLoginCaptured;
|
28 |
|
29 |
/**
|
30 |
+
* @param \ICWP_WPSF_FeatureHandler_Base $oModCon
|
31 |
*/
|
32 |
public function __construct( $oModCon ) {
|
33 |
$this->setMod( $oModCon );
|
44 |
add_action( $oModCon->prefix( 'daily_cron' ), [ $this, 'runDailyCron' ] );
|
45 |
add_action( $oModCon->prefix( 'hourly_cron' ), [ $this, 'runHourlyCron' ] );
|
46 |
add_action( $oModCon->prefix( 'deactivate_plugin' ), [ $this, 'deactivatePlugin' ] );
|
|
|
47 |
|
48 |
/**
|
49 |
* 2019-04-19:
|
125 |
return $this;
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
public function onModuleShutdown() {
|
129 |
}
|
130 |
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
+
* @deprecated 8.1
|
|
|
|
|
|
|
|
|
243 |
*/
|
244 |
+
public function autoAddToAdminNotices() {
|
|
|
245 |
}
|
246 |
|
247 |
/**
|
248 |
* @return string
|
249 |
+
* @deprecated 8.1
|
250 |
*/
|
251 |
protected function ip() {
|
252 |
return Services::IP()->getRequestIp();
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
+
* Will prefix and return any string with the unique plugin prefix.
|
257 |
+
* @param string $sSuffix
|
258 |
+
* @param string $sGlue
|
259 |
+
* @return string
|
260 |
+
* @deprecated 8.1
|
|
|
|
|
|
|
|
|
261 |
*/
|
262 |
+
protected function prefix( $sSuffix = '', $sGlue = '-' ) {
|
263 |
+
return $this->getCon()->prefix( $sSuffix, $sGlue );
|
264 |
}
|
265 |
}
|
src/processors/base_commentsfilter.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_CommentsFilter_Base
|
5 |
-
* @deprecated 7.5
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_CommentsFilter_Base extends ICWP_WPSF_Processor_BaseWpsf {
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/base_plugin.php
CHANGED
@@ -2,96 +2,9 @@
|
|
2 |
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
|
|
|
|
|
|
|
|
5 |
class ICWP_WPSF_Processor_BasePlugin extends ICWP_WPSF_Processor_BaseWpsf {
|
6 |
-
|
7 |
-
/**
|
8 |
-
*/
|
9 |
-
public function init() {
|
10 |
-
parent::init();
|
11 |
-
$oFO = $this->getMod();
|
12 |
-
|
13 |
-
$sFunc = $oFO->isOpt( 'delete_on_deactivate', 'Y' ) ? '__return_true' : '__return_false';
|
14 |
-
add_filter( $oFO->prefix( 'delete_on_deactivate' ), $sFunc );
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
*/
|
19 |
-
public function run() {
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Override the original collection to then add plugin statistics to the mix
|
24 |
-
* @param $aData
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public function tracking_DataCollect( $aData ) {
|
28 |
-
$aData = parent::tracking_DataCollect( $aData );
|
29 |
-
/** @var ICWP_WPSF_FeatureHandler_Plugin $oFO */
|
30 |
-
$oFO = $this->getMod();
|
31 |
-
$sSlug = $oFO->getSlug();
|
32 |
-
if ( empty( $aData[ $sSlug ][ 'options' ][ 'unique_installation_id' ] ) ) {
|
33 |
-
$aData[ $sSlug ][ 'options' ][ 'unique_installation_id' ] = $oFO->getPluginInstallationId();
|
34 |
-
}
|
35 |
-
return $aData;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @param array $aAttrs
|
40 |
-
* @return bool
|
41 |
-
*/
|
42 |
-
protected function getIfDisplayAdminNotice( $aAttrs ) {
|
43 |
-
|
44 |
-
if ( !parent::getIfDisplayAdminNotice( $aAttrs ) ) {
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
if ( isset( $aAttrs[ 'delay_days' ] ) && is_int( $aAttrs[ 'delay_days' ] )
|
48 |
-
&& ( $this->getInstallationDays() < $aAttrs[ 'delay_days' ] ) ) {
|
49 |
-
return false;
|
50 |
-
}
|
51 |
-
return true;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @return bool
|
56 |
-
* @deprecated 8
|
57 |
-
*/
|
58 |
-
protected function getIfShowAdminNotices() {
|
59 |
-
return $this->getMod()->isOpt( 'enable_upgrade_admin_notice', 'Y' );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* @param array $aNoticeAttributes
|
64 |
-
* @throws \Exception
|
65 |
-
* @deprecated
|
66 |
-
*/
|
67 |
-
public function addNotice_rate_plugin() {
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @param array $aNoticeAttributes
|
73 |
-
* @throws \Exception
|
74 |
-
* @deprecated
|
75 |
-
*/
|
76 |
-
public function addNotice_wizard_welcome() {
|
77 |
-
return;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param array $aNoticeAttributes
|
82 |
-
* @throws \Exception
|
83 |
-
* @deprecated
|
84 |
-
*/
|
85 |
-
public function addNotice_plugin_update_available() {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @param array $aNoticeAttributes
|
91 |
-
* @throws \Exception
|
92 |
-
* @deprecated
|
93 |
-
*/
|
94 |
-
public function addNotice_translate_plugin() {
|
95 |
-
return;
|
96 |
-
}
|
97 |
}
|
2 |
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
+
/**
|
6 |
+
* Class ICWP_WPSF_Processor_BasePlugin
|
7 |
+
* @deprecated 8.1
|
8 |
+
*/
|
9 |
class ICWP_WPSF_Processor_BasePlugin extends ICWP_WPSF_Processor_BaseWpsf {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
src/processors/base_wpsf.php
CHANGED
@@ -3,6 +3,10 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
|
|
|
|
|
|
|
|
6 |
abstract class ICWP_WPSF_Processor_BaseWpsf extends ICWP_WPSF_Processor_Base {
|
7 |
|
8 |
const RECAPTCHA_JS_HANDLE = 'icwp-google-recaptcha';
|
@@ -36,12 +40,12 @@ abstract class ICWP_WPSF_Processor_BaseWpsf extends ICWP_WPSF_Processor_Base {
|
|
36 |
*/
|
37 |
protected function getInstallationDays() {
|
38 |
$nTimeInstalled = $this->getCon()
|
39 |
-
->
|
40 |
->getInstallDate();
|
41 |
if ( empty( $nTimeInstalled ) ) {
|
42 |
return 0;
|
43 |
}
|
44 |
-
return (int)round( (
|
45 |
}
|
46 |
|
47 |
/**
|
@@ -191,74 +195,4 @@ abstract class ICWP_WPSF_Processor_BaseWpsf extends ICWP_WPSF_Processor_Base {
|
|
191 |
self::$bRecaptchaEnqueue = true;
|
192 |
return $this;
|
193 |
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* @param string $sMsg
|
197 |
-
* @param int $nCategory
|
198 |
-
* @param string $sEvent
|
199 |
-
* @param array $aData
|
200 |
-
* @return $this
|
201 |
-
* @deprecated 7.5
|
202 |
-
*/
|
203 |
-
public function addToAuditEntry( $sMsg = '', $nCategory = 1, $sEvent = '', $aData = [] ) {
|
204 |
-
return $this;
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* @param string $sEvent
|
209 |
-
* @param array $aData
|
210 |
-
* @return $this
|
211 |
-
* @deprecated 8
|
212 |
-
*/
|
213 |
-
public function auditEvent( $sEvent = '', $aData = [] ) {
|
214 |
-
return $this;
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* This is the preferred method over $this->stat_Increment() since it handles the parent stat key
|
219 |
-
*
|
220 |
-
* @param string $sStatKey
|
221 |
-
* @param string $sParentStatKey
|
222 |
-
* @return $this
|
223 |
-
* @deprecated 8
|
224 |
-
*/
|
225 |
-
protected function doStatIncrement( $sStatKey, $sParentStatKey = '' ) {
|
226 |
-
if ( empty( $sParentStatKey ) ) {
|
227 |
-
$sParentStatKey = $this->getMod()->getSlug();
|
228 |
-
}
|
229 |
-
return $this->stats_Increment( $sStatKey.':'.$sParentStatKey );
|
230 |
-
}
|
231 |
-
|
232 |
-
/**
|
233 |
-
* A filter used to collect all the stats gathered in the plugin.
|
234 |
-
*
|
235 |
-
* @param array $aStats
|
236 |
-
* @return array
|
237 |
-
* @deprecated 8
|
238 |
-
*/
|
239 |
-
public function stats_Collect( $aStats ) {
|
240 |
-
if ( !is_array( $aStats ) ) {
|
241 |
-
$aStats = [];
|
242 |
-
}
|
243 |
-
$aThisStats = $this->stats_Get();
|
244 |
-
if ( !empty( $aThisStats ) && is_array( $aThisStats ) ) {
|
245 |
-
$aStats[] = $aThisStats;
|
246 |
-
}
|
247 |
-
return $aStats;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* @param string $sStatKey
|
252 |
-
* @return $this
|
253 |
-
* @deprecated 8
|
254 |
-
*/
|
255 |
-
private function stats_Increment( $sStatKey ) {
|
256 |
-
$aStats = $this->stats_Get();
|
257 |
-
if ( !isset( $aStats[ $sStatKey ] ) ) {
|
258 |
-
$aStats[ $sStatKey ] = 0;
|
259 |
-
}
|
260 |
-
$aStats[ $sStatKey ] = $aStats[ $sStatKey ] + 1;
|
261 |
-
$this->aStatistics = $aStats;
|
262 |
-
return $this;
|
263 |
-
}
|
264 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
/**
|
7 |
+
* Class ICWP_WPSF_Processor_BaseWpsf
|
8 |
+
* @deprecated 8.1
|
9 |
+
*/
|
10 |
abstract class ICWP_WPSF_Processor_BaseWpsf extends ICWP_WPSF_Processor_Base {
|
11 |
|
12 |
const RECAPTCHA_JS_HANDLE = 'icwp-google-recaptcha';
|
40 |
*/
|
41 |
protected function getInstallationDays() {
|
42 |
$nTimeInstalled = $this->getCon()
|
43 |
+
->getModule_Plugin()
|
44 |
->getInstallDate();
|
45 |
if ( empty( $nTimeInstalled ) ) {
|
46 |
return 0;
|
47 |
}
|
48 |
+
return (int)round( ( Services::Request()->ts() - $nTimeInstalled )/DAY_IN_SECONDS );
|
49 |
}
|
50 |
|
51 |
/**
|
195 |
self::$bRecaptchaEnqueue = true;
|
196 |
return $this;
|
197 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
src/processors/basedb.php
CHANGED
@@ -3,7 +3,11 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* @var \FernleafSystems\Wordpress\Plugin\Shield\Databases\Base\Handler
|
@@ -15,32 +19,6 @@ abstract class ICWP_WPSF_BaseDbProcessor extends ICWP_WPSF_Processor_BaseWpsf {
|
|
15 |
*/
|
16 |
protected $nAutoExpirePeriod = null;
|
17 |
|
18 |
-
/**
|
19 |
-
* ICWP_WPSF_BaseDbProcessor constructor.
|
20 |
-
* @param ICWP_WPSF_FeatureHandler_Base $oModCon
|
21 |
-
* @param string $sTableName
|
22 |
-
* @throws \Exception
|
23 |
-
*/
|
24 |
-
public function __construct( $oModCon, $sTableName = null ) {
|
25 |
-
parent::__construct( $oModCon );
|
26 |
-
$this->initializeTable( $sTableName );
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @param string $sTableName
|
31 |
-
* @throws \Exception
|
32 |
-
*/
|
33 |
-
protected function initializeTable( $sTableName ) {
|
34 |
-
if ( empty( $sTableName ) ) {
|
35 |
-
throw new \Exception( 'Table name is empty' );
|
36 |
-
}
|
37 |
-
$this->getDbHandler()
|
38 |
-
->setTable( $this->getCon()->prefixOption( $sTableName ) )
|
39 |
-
->setColumnsDefinition( $this->getTableColumnsByDefinition() )
|
40 |
-
->setSqlCreate( $this->getCreateTableSql() )
|
41 |
-
->tableInit();
|
42 |
-
}
|
43 |
-
|
44 |
/**
|
45 |
* @return bool
|
46 |
*/
|
@@ -53,11 +31,6 @@ abstract class ICWP_WPSF_BaseDbProcessor extends ICWP_WPSF_Processor_BaseWpsf {
|
|
53 |
}
|
54 |
}
|
55 |
|
56 |
-
/**
|
57 |
-
* @return Shield\Databases\Base\Handler
|
58 |
-
*/
|
59 |
-
abstract protected function createDbHandler();
|
60 |
-
|
61 |
/**
|
62 |
* @return Shield\Databases\Base\Handler
|
63 |
*/
|
@@ -71,12 +44,14 @@ abstract class ICWP_WPSF_BaseDbProcessor extends ICWP_WPSF_Processor_BaseWpsf {
|
|
71 |
/**
|
72 |
* @return string
|
73 |
*/
|
74 |
-
|
|
|
75 |
|
76 |
/**
|
77 |
* @return array
|
78 |
*/
|
79 |
-
|
|
|
80 |
|
81 |
public function runDailyCron() {
|
82 |
try {
|
@@ -117,4 +92,12 @@ abstract class ICWP_WPSF_BaseDbProcessor extends ICWP_WPSF_Processor_BaseWpsf {
|
|
117 |
protected function getAutoExpirePeriod() {
|
118 |
return null;
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
/**
|
7 |
+
* Class ICWP_WPSF_BaseDbProcessor
|
8 |
+
* @deprecated 8.1
|
9 |
+
*/
|
10 |
+
class ICWP_WPSF_BaseDbProcessor extends ICWP_WPSF_Processor_BaseWpsf {
|
11 |
|
12 |
/**
|
13 |
* @var \FernleafSystems\Wordpress\Plugin\Shield\Databases\Base\Handler
|
19 |
*/
|
20 |
protected $nAutoExpirePeriod = null;
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* @return bool
|
24 |
*/
|
31 |
}
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* @return Shield\Databases\Base\Handler
|
36 |
*/
|
44 |
/**
|
45 |
* @return string
|
46 |
*/
|
47 |
+
protected function getCreateTableSql() {
|
48 |
+
}
|
49 |
|
50 |
/**
|
51 |
* @return array
|
52 |
*/
|
53 |
+
protected function getTableColumnsByDefinition() {
|
54 |
+
}
|
55 |
|
56 |
public function runDailyCron() {
|
57 |
try {
|
92 |
protected function getAutoExpirePeriod() {
|
93 |
return null;
|
94 |
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @param string $sTableName
|
98 |
+
* @throws \Exception
|
99 |
+
* @deprecated 8.1
|
100 |
+
*/
|
101 |
+
protected function initializeTable( $sTableName ) {
|
102 |
+
}
|
103 |
}
|
src/processors/comments_filter.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Modules
|
4 |
-
use FernleafSystems\Wordpress\Services\Services;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\CommentsFilter;
|
|
|
6 |
|
7 |
-
class ICWP_WPSF_Processor_CommentsFilter extends
|
8 |
|
9 |
/**
|
10 |
*/
|
@@ -18,7 +18,7 @@ class ICWP_WPSF_Processor_CommentsFilter extends ICWP_WPSF_Processor_BaseWpsf {
|
|
18 |
$oWpUsers = Services::WpUsers();
|
19 |
|
20 |
$bLoadComProc = !$oWpUsers->isUserLoggedIn() ||
|
21 |
-
!( new IsEmailTrusted() )->trusted(
|
22 |
$oWpUsers->getCurrentWpUser()->user_email,
|
23 |
$oMod->getApprovedMinimum(),
|
24 |
$oMod->getTrustedRoles()
|
@@ -27,7 +27,7 @@ class ICWP_WPSF_Processor_CommentsFilter extends ICWP_WPSF_Processor_BaseWpsf {
|
|
27 |
if ( $bLoadComProc ) {
|
28 |
|
29 |
if ( $oMod->isGoogleRecaptchaEnabled() ) {
|
30 |
-
$this->getSubProRecaptcha()->
|
31 |
}
|
32 |
|
33 |
if ( Services::Request()->isPost() ) {
|
@@ -38,7 +38,7 @@ class ICWP_WPSF_Processor_CommentsFilter extends ICWP_WPSF_Processor_BaseWpsf {
|
|
38 |
}
|
39 |
else {
|
40 |
if ( $oMod->isEnabledGaspCheck() ) {
|
41 |
-
$this->getSubProGasp()->
|
42 |
}
|
43 |
}
|
44 |
}
|
@@ -70,7 +70,7 @@ class ICWP_WPSF_Processor_CommentsFilter extends ICWP_WPSF_Processor_BaseWpsf {
|
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
-
* @return ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha
|
74 |
*/
|
75 |
private function getSubProRecaptcha() {
|
76 |
return $this->getSubPro( 'recaptcha' );
|
@@ -89,13 +89,4 @@ class ICWP_WPSF_Processor_CommentsFilter extends ICWP_WPSF_Processor_BaseWpsf {
|
|
89 |
}
|
90 |
return $aEmails;
|
91 |
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* @param array $aNoticeAttributes
|
95 |
-
* @throws \Exception
|
96 |
-
* @deprecated
|
97 |
-
*/
|
98 |
-
public function addNotice_akismet_running( $aNoticeAttributes ) {
|
99 |
-
return;
|
100 |
-
}
|
101 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
|
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\CommentsFilter;
|
5 |
+
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_CommentsFilter extends Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
/**
|
10 |
*/
|
18 |
$oWpUsers = Services::WpUsers();
|
19 |
|
20 |
$bLoadComProc = !$oWpUsers->isUserLoggedIn() ||
|
21 |
+
!( new CommentsFilter\Scan\IsEmailTrusted() )->trusted(
|
22 |
$oWpUsers->getCurrentWpUser()->user_email,
|
23 |
$oMod->getApprovedMinimum(),
|
24 |
$oMod->getTrustedRoles()
|
27 |
if ( $bLoadComProc ) {
|
28 |
|
29 |
if ( $oMod->isGoogleRecaptchaEnabled() ) {
|
30 |
+
$this->getSubProRecaptcha()->execute();
|
31 |
}
|
32 |
|
33 |
if ( Services::Request()->isPost() ) {
|
38 |
}
|
39 |
else {
|
40 |
if ( $oMod->isEnabledGaspCheck() ) {
|
41 |
+
$this->getSubProGasp()->execute();
|
42 |
}
|
43 |
}
|
44 |
}
|
70 |
}
|
71 |
|
72 |
/**
|
73 |
+
* @return \ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha
|
74 |
*/
|
75 |
private function getSubProRecaptcha() {
|
76 |
return $this->getSubPro( 'recaptcha' );
|
89 |
}
|
90 |
return $aEmails;
|
91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
src/processors/commentsfilter_antibotspam.php
DELETED
@@ -1,250 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Comments;
|
4 |
-
use FernleafSystems\Wordpress\Services\Services;
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Class ICWP_WPSF_Processor_CommentsFilter_AntiBotSpam
|
8 |
-
* @deprecated
|
9 |
-
*/
|
10 |
-
class ICWP_WPSF_Processor_CommentsFilter_AntiBotSpam extends ICWP_WPSF_BaseDbProcessor {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The unique comment token assigned to this page
|
14 |
-
* @var string
|
15 |
-
*/
|
16 |
-
protected $sFormId;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @param ICWP_WPSF_FeatureHandler_CommentsFilter $oModCon
|
20 |
-
*/
|
21 |
-
public function __construct( ICWP_WPSF_FeatureHandler_CommentsFilter $oModCon ) {
|
22 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'spambot_comments_filter_table_name' ) );
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
*/
|
27 |
-
public function run() {
|
28 |
-
if ( $this->isReadyToRun() && !Services::Request()->isPost() ) {
|
29 |
-
// Add GASP checking to the comment form.
|
30 |
-
add_action( 'comment_form', [ $this, 'printGaspFormItems' ], 1 );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
|
34 |
-
public function printGaspFormItems() {
|
35 |
-
$oToken = $this->initCommentFormToken();
|
36 |
-
echo $this->getGaspCommentsHookHtml( $oToken );
|
37 |
-
echo $this->getGaspCommentsHtml();
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
protected function initCommentFormToken() {
|
44 |
-
/** @var \ICWP_WPSF_FeatureHandler_CommentsFilter $oMod */
|
45 |
-
$oMod = $this->getMod();
|
46 |
-
|
47 |
-
$nTs = Services::Request()->ts();
|
48 |
-
$nPostId = Services::WpPost()->getCurrentPostId();
|
49 |
-
|
50 |
-
$sToken = $this->getToken( $nTs, $nPostId );
|
51 |
-
Services::WpGeneral()->setTransient(
|
52 |
-
$oMod->prefix( 'comtok-'.md5( sprintf( '%s-%s-%s', $nPostId, $nTs, Services::IP()->getRequestIp() ) ) ),
|
53 |
-
$sToken,
|
54 |
-
$oMod->getTokenExpireInterval()
|
55 |
-
);
|
56 |
-
|
57 |
-
return $sToken;
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @param int $nTs
|
62 |
-
* @param string $nPostId
|
63 |
-
* @return string
|
64 |
-
*/
|
65 |
-
protected function getToken( $nTs, $nPostId ) {
|
66 |
-
$oMod = $this->getCon()->getModule_Plugin();
|
67 |
-
return hash_hmac( 'sha1',
|
68 |
-
$nPostId.Services::IP()->getRequestIp().$nTs,
|
69 |
-
$oMod->getPluginInstallationId()
|
70 |
-
);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @param string $sToken
|
75 |
-
* @return string
|
76 |
-
*/
|
77 |
-
protected function getGaspCommentsHookHtml( $sToken ) {
|
78 |
-
/** @var ICWP_WPSF_FeatureHandler_CommentsFilter $oFO */
|
79 |
-
$oFO = $this->getMod();
|
80 |
-
$aHtml = [
|
81 |
-
'<p id="'.$this->getUniqueFormId().'"></p>', // we use this unique <p> to hook onto using javascript
|
82 |
-
'<input type="hidden" id="_sugar_sweet_email" name="sugar_sweet_email" value="" />',
|
83 |
-
sprintf( '<input type="hidden" id="_botts" name="botts" value="%s" />', Services::Request()->ts() ),
|
84 |
-
sprintf( '<input type="hidden" id="_comment_token" name="comment_token" value="%s" />', $sToken )
|
85 |
-
];
|
86 |
-
return implode( '', $aHtml );
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @return string
|
91 |
-
*/
|
92 |
-
protected function getGaspCommentsHtml() {
|
93 |
-
/** @var ICWP_WPSF_FeatureHandler_CommentsFilter $oFO */
|
94 |
-
$oFO = $this->getMod();
|
95 |
-
|
96 |
-
$sId = $this->getUniqueFormId();
|
97 |
-
$sConfirm = $oFO->getTextOpt( 'custom_message_checkbox' );
|
98 |
-
$sAlert = $oFO->getTextOpt( 'custom_message_alert' );
|
99 |
-
$sCommentWait = $oFO->getTextOpt( 'custom_message_comment_wait' );
|
100 |
-
$sCommentReload = $oFO->getTextOpt( 'custom_message_comment_reload' );
|
101 |
-
|
102 |
-
$nCooldown = $oFO->getTokenCooldown();
|
103 |
-
$nExpire = $oFO->getTokenExpireInterval();
|
104 |
-
|
105 |
-
$sJsCommentWait = '"'.str_replace( '%s', '"+nRemaining+"', $sCommentWait ).'"';
|
106 |
-
$sCommentWait = str_replace( '%s', $nCooldown, $sCommentWait ); // don't use sprintf for errors.
|
107 |
-
|
108 |
-
$sReturn = "
|
109 |
-
<script type=\"text/javascript\">
|
110 |
-
|
111 |
-
function cb_click$sId() {
|
112 |
-
cb_name$sId.value=cb$sId.name;
|
113 |
-
}
|
114 |
-
function check$sId() {
|
115 |
-
if( cb$sId.checked != true ) {
|
116 |
-
alert( \"$sAlert\" ); return false;
|
117 |
-
}
|
118 |
-
return true;
|
119 |
-
}
|
120 |
-
function reenableButton$sId() {
|
121 |
-
nTimerCounter{$sId}++;
|
122 |
-
nRemaining = $nCooldown - nTimerCounter$sId;
|
123 |
-
subbutton$sId.value = $sJsCommentWait;
|
124 |
-
if ( nTimerCounter$sId >= $nCooldown ) {
|
125 |
-
subbutton$sId.value = origButtonValue$sId;
|
126 |
-
subbutton$sId.disabled = false;
|
127 |
-
clearInterval( sCountdownTimer$sId );
|
128 |
-
}
|
129 |
-
}
|
130 |
-
function redisableButton$sId() {
|
131 |
-
subbutton$sId.value = \"$sCommentReload\";
|
132 |
-
subbutton$sId.disabled = true;
|
133 |
-
}
|
134 |
-
|
135 |
-
var $sId = document.getElementById('$sId');
|
136 |
-
var cb$sId = document.createElement('input');
|
137 |
-
cb$sId.type = 'checkbox';
|
138 |
-
cb$sId.id = 'checkbox$sId';
|
139 |
-
cb$sId.name = 'checkbox$sId';
|
140 |
-
cb$sId.style.width = '25px';
|
141 |
-
cb$sId.onclick = cb_click$sId;
|
142 |
-
|
143 |
-
var label$sId = document.createElement( 'label' );
|
144 |
-
var labelspan$sId = document.createElement( 'span' );
|
145 |
-
label$sId.htmlFor = 'checkbox$sId';
|
146 |
-
labelspan$sId.innerHTML = \"$sConfirm\";
|
147 |
-
|
148 |
-
var cb_name$sId = document.createElement('input');
|
149 |
-
cb_name$sId.type = 'hidden';
|
150 |
-
cb_name$sId.name = 'cb_nombre';
|
151 |
-
|
152 |
-
$sId.appendChild( label$sId );
|
153 |
-
label$sId.appendChild( cb$sId );
|
154 |
-
label$sId.appendChild( labelspan$sId );
|
155 |
-
$sId.appendChild( cb_name$sId );
|
156 |
-
|
157 |
-
var frm$sId = cb$sId.form;
|
158 |
-
frm$sId.onsubmit = check$sId;
|
159 |
-
|
160 |
-
".(
|
161 |
-
( $nCooldown > 0 || $nExpire > 0 ) ?
|
162 |
-
"
|
163 |
-
var subbuttonList$sId = frm$sId.querySelectorAll( 'input[type=\"submit\"]' );
|
164 |
-
|
165 |
-
if ( typeof( subbuttonList$sId ) != \"undefined\" ) {
|
166 |
-
subbutton$sId = subbuttonList{$sId}[0];
|
167 |
-
if ( typeof( subbutton$sId ) != \"undefined\" ) {
|
168 |
-
|
169 |
-
".(
|
170 |
-
( $nCooldown > 0 ) ?
|
171 |
-
"
|
172 |
-
subbutton$sId.disabled = true;
|
173 |
-
origButtonValue$sId = subbutton$sId.value;
|
174 |
-
subbutton$sId.value = \"$sCommentWait\";
|
175 |
-
nTimerCounter$sId = 0;
|
176 |
-
sCountdownTimer$sId = setInterval( reenableButton$sId, 1000 );
|
177 |
-
"
|
178 |
-
: ''
|
179 |
-
).(
|
180 |
-
( $nExpire > 0 ) ? "sTimeoutTimer$sId = setTimeout( redisableButton$sId, ".( 1000*$nExpire - 1000 )." );" : ''
|
181 |
-
)."
|
182 |
-
}
|
183 |
-
}
|
184 |
-
" : ''
|
185 |
-
)."
|
186 |
-
</script>
|
187 |
-
";
|
188 |
-
return $sReturn;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* @return string
|
193 |
-
*/
|
194 |
-
protected function getUniqueFormId() {
|
195 |
-
if ( !isset( $this->sFormId ) ) {
|
196 |
-
$oDp = Services::Data();
|
197 |
-
$sId = $oDp->generateRandomLetter().$oDp->generateRandomString( rand( 7, 23 ), 7 );
|
198 |
-
$this->sFormId = preg_replace(
|
199 |
-
'#[^a-zA-Z0-9]#', '',
|
200 |
-
apply_filters( 'icwp_shield_cf_gasp_uniqid', $sId ) );
|
201 |
-
}
|
202 |
-
return $this->sFormId;
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* @return string
|
207 |
-
*/
|
208 |
-
public function getCreateTableSql() {
|
209 |
-
return "CREATE TABLE %s (
|
210 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
211 |
-
post_id int(11) NOT NULL DEFAULT 0,
|
212 |
-
unique_token VARCHAR(32) NOT NULL DEFAULT '',
|
213 |
-
ip varchar(40) NOT NULL DEFAULT '0',
|
214 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
215 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
216 |
-
PRIMARY KEY (id)
|
217 |
-
) %s;";
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* @return array
|
222 |
-
*/
|
223 |
-
protected function getTableColumnsByDefinition() {
|
224 |
-
$aDef = $this->getMod()->getDef( 'spambot_comments_filter_table_columns' );
|
225 |
-
return is_array( $aDef ) ? $aDef : [];
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* @return int
|
230 |
-
*/
|
231 |
-
protected function getAutoExpirePeriod() {
|
232 |
-
/** @var ICWP_WPSF_FeatureHandler_CommentsFilter $oFO */
|
233 |
-
$oFO = $this->getMod();
|
234 |
-
return $oFO->getTokenExpireInterval();
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* @return Comments\Handler
|
239 |
-
*/
|
240 |
-
protected function createDbHandler() {
|
241 |
-
return new Comments\Handler();
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* @return bool|int
|
246 |
-
*/
|
247 |
-
public function cleanupDatabase() {
|
248 |
-
return false;
|
249 |
-
}
|
250 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/commentsfilter_botspam.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_CommentsFilter_BotSpam extends
|
7 |
|
8 |
/**
|
9 |
* The unique comment token assigned to this page
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_CommentsFilter_BotSpam extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* The unique comment token assigned to this page
|
src/processors/commentsfilter_googlerecaptcha.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha extends
|
6 |
|
7 |
/**
|
8 |
*/
|
9 |
public function run() {
|
10 |
-
parent::run();
|
11 |
add_action( 'wp', [ $this, 'setup' ] );
|
12 |
}
|
13 |
|
@@ -21,14 +21,6 @@ class ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha extends ICWP_WPSF_Proce
|
|
21 |
}
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public function printGoogleRecaptchaCheck_Filter() {
|
28 |
-
$this->setRecaptchaToEnqueue();
|
29 |
-
return $this->getGoogleRecaptchaHtml();
|
30 |
-
}
|
31 |
-
|
32 |
/**
|
33 |
*/
|
34 |
public function printGoogleRecaptchaCheck() {
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_CommentsFilter_GoogleRecaptcha extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
|
|
11 |
add_action( 'wp', [ $this, 'setup' ] );
|
12 |
}
|
13 |
|
21 |
}
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
*/
|
26 |
public function printGoogleRecaptchaCheck() {
|
src/processors/commentsfilter_humanspam.php
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class ICWP_WPSF_Processor_CommentsFilter_HumanSpam extends ICWP_WPSF_Processor_BaseWpsf {
|
4 |
-
}
|
|
|
|
|
|
|
|
src/processors/email.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_Email extends
|
6 |
|
7 |
const Slug = 'email';
|
8 |
|
@@ -36,13 +37,6 @@ class ICWP_WPSF_Processor_Email extends ICWP_WPSF_Processor_BaseWpsf {
|
|
36 |
*/
|
37 |
protected $bEmailIsThrottled;
|
38 |
|
39 |
-
/**
|
40 |
-
* @param ICWP_WPSF_FeatureHandler_Email $oModCon
|
41 |
-
*/
|
42 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Email $oModCon ) {
|
43 |
-
parent::__construct( $oModCon );
|
44 |
-
}
|
45 |
-
|
46 |
public function init() {
|
47 |
parent::init();
|
48 |
self::$sModeFile_EmailThrottled = path_join( __DIR__, '/../mode.email_throttled' );
|
@@ -198,7 +192,7 @@ class ICWP_WPSF_Processor_Email extends ICWP_WPSF_Processor_BaseWpsf {
|
|
198 |
* Whether we're throttled is dependent on 2 signals. The time interval has changed, or the there's a file
|
199 |
* system object telling us we're throttled.
|
200 |
* The file system object takes precedence.
|
201 |
-
* @return
|
202 |
*/
|
203 |
protected function updateEmailThrottle() {
|
204 |
$nNow = Services::Request()->ts();
|
@@ -239,6 +233,7 @@ class ICWP_WPSF_Processor_Email extends ICWP_WPSF_Processor_BaseWpsf {
|
|
239 |
else {
|
240 |
$this->nEmailThrottleCount++;
|
241 |
}
|
|
|
242 |
}
|
243 |
|
244 |
public function setThrottledFile( $infOn = false ) {
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Email extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
const Slug = 'email';
|
9 |
|
37 |
*/
|
38 |
protected $bEmailIsThrottled;
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
public function init() {
|
41 |
parent::init();
|
42 |
self::$sModeFile_EmailThrottled = path_join( __DIR__, '/../mode.email_throttled' );
|
192 |
* Whether we're throttled is dependent on 2 signals. The time interval has changed, or the there's a file
|
193 |
* system object telling us we're throttled.
|
194 |
* The file system object takes precedence.
|
195 |
+
* @return bool
|
196 |
*/
|
197 |
protected function updateEmailThrottle() {
|
198 |
$nNow = Services::Request()->ts();
|
233 |
else {
|
234 |
$this->nEmailThrottleCount++;
|
235 |
}
|
236 |
+
return true;
|
237 |
}
|
238 |
|
239 |
public function setThrottledFile( $infOn = false ) {
|
src/processors/events.php
CHANGED
@@ -4,7 +4,7 @@ use FernleafSystems\Wordpress\Plugin\Shield;
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Events;
|
6 |
|
7 |
-
class ICWP_WPSF_Processor_Events extends
|
8 |
|
9 |
/**
|
10 |
* @var bool
|
@@ -23,9 +23,9 @@ class ICWP_WPSF_Processor_Events extends ICWP_WPSF_Processor_BaseWpsf {
|
|
23 |
* @return string[]
|
24 |
*/
|
25 |
public function statsWidget( $aContent ) {
|
26 |
-
/** @var
|
27 |
$oDbhEvents = $this->getCon()->getModule_Events()->getDbHandler();
|
28 |
-
/** @var
|
29 |
$oSelEvents = $oDbhEvents->getQuerySelector();
|
30 |
|
31 |
$aKeyStats = [
|
@@ -85,9 +85,9 @@ class ICWP_WPSF_Processor_Events extends ICWP_WPSF_Processor_BaseWpsf {
|
|
85 |
* @return array
|
86 |
*/
|
87 |
public function tracking_DataCollect( $aData ) {
|
88 |
-
/** @var
|
89 |
$oDbhEvents = $this->getMod()->getDbHandler();
|
90 |
-
/** @var
|
91 |
$oSelEvents = $oDbhEvents->getQuerySelector();
|
92 |
|
93 |
$aData = parent::tracking_DataCollect( $aData );
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Events;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_Events extends Shield\Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
/**
|
10 |
* @var bool
|
23 |
* @return string[]
|
24 |
*/
|
25 |
public function statsWidget( $aContent ) {
|
26 |
+
/** @var Events\Handler $oDbhEvents */
|
27 |
$oDbhEvents = $this->getCon()->getModule_Events()->getDbHandler();
|
28 |
+
/** @var Events\Select $oSelEvents */
|
29 |
$oSelEvents = $oDbhEvents->getQuerySelector();
|
30 |
|
31 |
$aKeyStats = [
|
85 |
* @return array
|
86 |
*/
|
87 |
public function tracking_DataCollect( $aData ) {
|
88 |
+
/** @var Events\Handler $oDbhEvents */
|
89 |
$oDbhEvents = $this->getMod()->getDbHandler();
|
90 |
+
/** @var Events\Select $oSelEvents */
|
91 |
$oSelEvents = $oDbhEvents->getQuerySelector();
|
92 |
|
93 |
$aData = parent::tracking_DataCollect( $aData );
|
src/processors/firewall.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_Firewall extends
|
6 |
|
7 |
/**
|
8 |
* @var array
|
@@ -262,11 +263,12 @@ class ICWP_WPSF_Processor_Firewall extends ICWP_WPSF_Processor_BaseWpsf {
|
|
262 |
/**
|
263 |
*/
|
264 |
private function doFirewallBlock() {
|
265 |
-
/** @var ICWP_WPSF_FeatureHandler_Firewall $
|
266 |
-
$
|
267 |
|
268 |
-
switch ( $
|
269 |
case 'redirect_die':
|
|
|
270 |
break;
|
271 |
case 'redirect_die_message':
|
272 |
Services::WpGeneral()->wpDie( $this->getFirewallDieMessageForDisplay() );
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Firewall extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* @var array
|
263 |
/**
|
264 |
*/
|
265 |
private function doFirewallBlock() {
|
266 |
+
/** @var \ICWP_WPSF_FeatureHandler_Firewall $oMod */
|
267 |
+
$oMod = $this->getMod();
|
268 |
|
269 |
+
switch ( $oMod->getBlockResponse() ) {
|
270 |
case 'redirect_die':
|
271 |
+
Services::WpGeneral()->wpDie();
|
272 |
break;
|
273 |
case 'redirect_die_message':
|
274 |
Services::WpGeneral()->wpDie( $this->getFirewallDieMessageForDisplay() );
|
src/processors/hack_protect.php
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\
|
|
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
|
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_HackProtect extends
|
7 |
|
8 |
public function run() {
|
9 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
@@ -15,9 +17,9 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
15 |
$this->revSliderPatch_AFU();
|
16 |
}
|
17 |
|
18 |
-
$this->getSubProScanner()->
|
19 |
if ( $oMod->isRtEnabledWpConfig() ) {
|
20 |
-
$this->getSubProRealtime()->
|
21 |
}
|
22 |
}
|
23 |
|
@@ -45,21 +47,6 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
45 |
];
|
46 |
}
|
47 |
|
48 |
-
/**
|
49 |
-
* Addresses this vulnerability: http://klikki.fi/adv/wordpress2.html
|
50 |
-
*
|
51 |
-
* @param string $sCommentContent
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public function secXss64kb( $sCommentContent ) {
|
55 |
-
// Comments shouldn't be any longer than 64KB
|
56 |
-
if ( strlen( $sCommentContent ) >= ( 64*1024 ) ) {
|
57 |
-
$sCommentContent = sprintf( __( '%s escaped HTML the following comment due to its size: %s', 'wp-simple-firewall' ), $this->getCon()
|
58 |
-
->getHumanName(), esc_html( $sCommentContent ) );
|
59 |
-
}
|
60 |
-
return $sCommentContent;
|
61 |
-
}
|
62 |
-
|
63 |
protected function revSliderPatch_LFI() {
|
64 |
$oReq = Services::Request();
|
65 |
|
@@ -86,8 +73,10 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
86 |
* @return array
|
87 |
*/
|
88 |
public function buildInsightsVars() {
|
89 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
90 |
$oMod = $this->getMod();
|
|
|
|
|
91 |
|
92 |
$aLatestScans = array_map(
|
93 |
function ( $nTime ) {
|
@@ -103,10 +92,11 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
103 |
|
104 |
$aUiTrack = $oMod->getUiTrack();
|
105 |
if ( empty( $aUiTrack[ 'selected_scans' ] ) ) {
|
106 |
-
$aUiTrack[ 'selected_scans' ] = $
|
107 |
}
|
108 |
|
109 |
$oScannerMain = $this->getSubProScanner();
|
|
|
110 |
$aData = [
|
111 |
'ajax' => [
|
112 |
'scans_start' => $oMod->getAjaxActionData( 'scans_start', true ),
|
@@ -144,7 +134,7 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
144 |
'scan_progress' => __( 'Scan Progress', 'wp-simple-firewall' ),
|
145 |
],
|
146 |
'vars' => [
|
147 |
-
'initial_check' => $
|
148 |
],
|
149 |
'scans' => [
|
150 |
'apc' => [
|
@@ -230,8 +220,6 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
230 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
231 |
$oMod = $this->getMod();
|
232 |
$oReq = Services::Request();
|
233 |
-
/** @var HackGuard\Options $oOpts */
|
234 |
-
$oOpts = $oMod->getOptions();
|
235 |
|
236 |
/** @var ICWP_WPSF_Processor_HackProtect $oPro */
|
237 |
$oPro = $oMod->getProcessor();
|
@@ -243,8 +231,10 @@ class ICWP_WPSF_Processor_HackProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
243 |
$aPtgResults = $oSelector->filterByNotIgnored()
|
244 |
->filterByScan( 'ptg' )
|
245 |
->query();
|
246 |
-
|
247 |
-
|
|
|
|
|
248 |
|
249 |
// Process Plugins
|
250 |
$aPlugins = $oFullResults->getAllResultsSetsForPluginsContext();
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
5 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
6 |
+
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
+
class ICWP_WPSF_Processor_HackProtect extends Modules\BaseShield\ShieldProcessor {
|
9 |
|
10 |
public function run() {
|
11 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
17 |
$this->revSliderPatch_AFU();
|
18 |
}
|
19 |
|
20 |
+
$this->getSubProScanner()->execute();
|
21 |
if ( $oMod->isRtEnabledWpConfig() ) {
|
22 |
+
$this->getSubProRealtime()->execute();
|
23 |
}
|
24 |
}
|
25 |
|
47 |
];
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
protected function revSliderPatch_LFI() {
|
51 |
$oReq = Services::Request();
|
52 |
|
73 |
* @return array
|
74 |
*/
|
75 |
public function buildInsightsVars() {
|
76 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
77 |
$oMod = $this->getMod();
|
78 |
+
/** @var HackGuard\Options $oOpts */
|
79 |
+
$oOpts = $this->getOptions();
|
80 |
|
81 |
$aLatestScans = array_map(
|
82 |
function ( $nTime ) {
|
92 |
|
93 |
$aUiTrack = $oMod->getUiTrack();
|
94 |
if ( empty( $aUiTrack[ 'selected_scans' ] ) ) {
|
95 |
+
$aUiTrack[ 'selected_scans' ] = $oOpts->getScanSlugs();
|
96 |
}
|
97 |
|
98 |
$oScannerMain = $this->getSubProScanner();
|
99 |
+
$oQueCon = $oMod->getScanController();
|
100 |
$aData = [
|
101 |
'ajax' => [
|
102 |
'scans_start' => $oMod->getAjaxActionData( 'scans_start', true ),
|
134 |
'scan_progress' => __( 'Scan Progress', 'wp-simple-firewall' ),
|
135 |
],
|
136 |
'vars' => [
|
137 |
+
'initial_check' => $oQueCon->hasRunningScans()
|
138 |
],
|
139 |
'scans' => [
|
140 |
'apc' => [
|
220 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
221 |
$oMod = $this->getMod();
|
222 |
$oReq = Services::Request();
|
|
|
|
|
223 |
|
224 |
/** @var ICWP_WPSF_Processor_HackProtect $oPro */
|
225 |
$oPro = $oMod->getProcessor();
|
231 |
$aPtgResults = $oSelector->filterByNotIgnored()
|
232 |
->filterByScan( 'ptg' )
|
233 |
->query();
|
234 |
+
/** @var Shield\Scans\Ptg\ResultsSet $oFullResults */
|
235 |
+
$oFullResults = ( new HackGuard\Scan\Results\ConvertBetweenTypes() )
|
236 |
+
->setScanActionVO( ( new HackGuard\Scan\ScanActionFromSlug() )->getAction( 'ptg' ) )
|
237 |
+
->fromVOsToResultsSet( $aPtgResults );
|
238 |
|
239 |
// Process Plugins
|
240 |
$aPlugins = $oFullResults->getAllResultsSetsForPluginsContext();
|
src/processors/hackprotect_integrity.php
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_HackProtect_Integrity extends
|
6 |
|
7 |
/**
|
8 |
*/
|
9 |
public function run() {
|
10 |
-
parent::run();
|
11 |
$this->setupSnapshots();
|
12 |
|
13 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $
|
14 |
-
$
|
15 |
-
if ( $
|
16 |
add_action( 'user_register', [ $this, 'snapshotUsers' ] );
|
17 |
add_action( 'profile_update', [ $this, 'snapshotUsers' ] );
|
18 |
add_action( 'after_password_reset', [ $this, 'snapshotUsers' ] );
|
@@ -45,9 +46,9 @@ class ICWP_WPSF_Processor_HackProtect_Integrity extends ICWP_WPSF_Processor_Base
|
|
45 |
}
|
46 |
|
47 |
protected function verifyUsers() {
|
48 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $
|
49 |
-
$
|
50 |
-
if ( !$
|
51 |
return;
|
52 |
}
|
53 |
|
@@ -142,8 +143,8 @@ class ICWP_WPSF_Processor_HackProtect_Integrity extends ICWP_WPSF_Processor_Base
|
|
142 |
* @return int
|
143 |
*/
|
144 |
protected function getCronFrequency() {
|
145 |
-
/** @var
|
146 |
-
$
|
147 |
-
return $
|
148 |
}
|
149 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_HackProtect_Integrity extends ShieldProcessor {
|
8 |
|
9 |
/**
|
10 |
*/
|
11 |
public function run() {
|
|
|
12 |
$this->setupSnapshots();
|
13 |
|
14 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
15 |
+
$oMod = $this->getMod();
|
16 |
+
if ( $oMod->isIcUsersEnabled() ) {
|
17 |
add_action( 'user_register', [ $this, 'snapshotUsers' ] );
|
18 |
add_action( 'profile_update', [ $this, 'snapshotUsers' ] );
|
19 |
add_action( 'after_password_reset', [ $this, 'snapshotUsers' ] );
|
46 |
}
|
47 |
|
48 |
protected function verifyUsers() {
|
49 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
50 |
+
$oMod = $this->getMod();
|
51 |
+
if ( !$oMod->isIcUsersEnabled() ) {
|
52 |
return;
|
53 |
}
|
54 |
|
143 |
* @return int
|
144 |
*/
|
145 |
protected function getCronFrequency() {
|
146 |
+
/** @var HackGuard\Options $oOpts */
|
147 |
+
$oOpts = $this->getMod()->getOptions();
|
148 |
+
return $oOpts->getScanFrequency();
|
149 |
}
|
150 |
}
|
src/processors/hackprotect_realtime.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_HackProtect_Realtime extends
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
-
|
12 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
13 |
$oMod = $this->getMod();
|
14 |
|
15 |
if ( $oMod->isRtEnabledWpConfig() ) {
|
@@ -18,7 +17,7 @@ class ICWP_WPSF_Processor_HackProtect_Realtime extends ICWP_WPSF_Processor_BaseW
|
|
18 |
}
|
19 |
|
20 |
private function runWpConfig() {
|
21 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
22 |
$oMod = $this->getMod();
|
23 |
$oProc = new Shield\Scans\Realtime\Files\Process();
|
24 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_HackProtect_Realtime extends Shield\Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
|
|
12 |
$oMod = $this->getMod();
|
13 |
|
14 |
if ( $oMod->isRtEnabledWpConfig() ) {
|
17 |
}
|
18 |
|
19 |
private function runWpConfig() {
|
20 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
21 |
$oMod = $this->getMod();
|
22 |
$oProc = new Shield\Scans\Realtime\Files\Process();
|
23 |
|
src/processors/hackprotect_scan_apc.php
CHANGED
@@ -24,31 +24,10 @@ class ICWP_WPSF_Processor_HackProtect_Apc extends ICWP_WPSF_Processor_ScanBase {
|
|
24 |
}
|
25 |
|
26 |
public function onDeletedPlugin() {
|
27 |
-
$
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
* @param Shield\Scans\Apc\ResultsSet $oResults
|
32 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
33 |
-
*/
|
34 |
-
protected function convertResultsToVos( $oResults ) {
|
35 |
-
return ( new Shield\Scans\Apc\ConvertResultsToVos() )->convert( $oResults );
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @param mixed|Shield\Databases\Scanner\EntryVO[] $aVos
|
40 |
-
* @return Shield\Scans\Apc\ResultsSet
|
41 |
-
*/
|
42 |
-
protected function convertVosToResults( $aVos ) {
|
43 |
-
return ( new Shield\Scans\Apc\ConvertVosToResults() )->convert( $aVos );
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
48 |
-
* @return Shield\Scans\Apc\ResultItem
|
49 |
-
*/
|
50 |
-
protected function convertVoToResultItem( $oVo ) {
|
51 |
-
return ( new Shield\Scans\Apc\ConvertVosToResults() )->convertItem( $oVo );
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -58,13 +37,6 @@ class ICWP_WPSF_Processor_HackProtect_Apc extends ICWP_WPSF_Processor_ScanBase {
|
|
58 |
return null;
|
59 |
}
|
60 |
|
61 |
-
/**
|
62 |
-
* @return Shield\Scans\Apc\ScanActionVO
|
63 |
-
*/
|
64 |
-
protected function getNewActionVO() {
|
65 |
-
return new Shield\Scans\Apc\ScanActionVO();
|
66 |
-
}
|
67 |
-
|
68 |
/**
|
69 |
* @param Shield\Scans\Apc\ResultsSet $oRes
|
70 |
*/
|
24 |
}
|
25 |
|
26 |
public function onDeletedPlugin() {
|
27 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
28 |
+
$oMod = $this->getMod();
|
29 |
+
$oMod->getScanController()
|
30 |
+
->startScans( [ static::SCAN_SLUG ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
37 |
return null;
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @param Shield\Scans\Apc\ResultsSet $oRes
|
42 |
*/
|
src/processors/hackprotect_scan_assets_base.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield
|
4 |
-
|
5 |
|
6 |
abstract class ICWP_WPSF_Processor_HackProtect_ScanAssetsBase extends ICWP_WPSF_Processor_ScanBase {
|
7 |
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Services;
|
5 |
|
6 |
abstract class ICWP_WPSF_Processor_HackProtect_ScanAssetsBase extends ICWP_WPSF_Processor_ScanBase {
|
7 |
|
src/processors/hackprotect_scan_base.php
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
abstract class ICWP_WPSF_Processor_ScanBase extends
|
7 |
|
8 |
use Shield\Scans\Common\ScanActionConsumer;
|
9 |
const SCAN_SLUG = 'base';
|
@@ -14,12 +15,11 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
14 |
protected $oScanner;
|
15 |
|
16 |
public function run() {
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
$this->launchScan();
|
23 |
} );
|
24 |
}
|
25 |
|
@@ -42,12 +42,6 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
42 |
*/
|
43 |
abstract public function isEnabled();
|
44 |
|
45 |
-
/**
|
46 |
-
*/
|
47 |
-
public function launchScan() {
|
48 |
-
$this->getScannerDb()->launchScans( [ static::SCAN_SLUG ] );
|
49 |
-
}
|
50 |
-
|
51 |
/**
|
52 |
*/
|
53 |
public function hookOnDemandScan() {
|
@@ -64,105 +58,18 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
64 |
}
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* TODO: Generic so lift out of base
|
69 |
-
* @param Shield\Scans\Base\BaseScanActionVO $oAction
|
70 |
-
*/
|
71 |
-
public function postScanActionProcess( $oAction ) {
|
72 |
-
$oResults = $this->setScanActionVO( $oAction )
|
73 |
-
->getScanActionResults();
|
74 |
-
$this->updateScanResultsStore( $oResults );
|
75 |
-
|
76 |
-
$this->getCon()->fireEvent( $oAction->id.'_scan_run' );
|
77 |
-
if ( $oResults->countItems() ) {
|
78 |
-
$this->getCon()->fireEvent( $oAction->id.'_scan_found' );
|
79 |
-
}
|
80 |
-
|
81 |
-
if ( $oAction->is_cron ) {
|
82 |
-
$this->cronProcessScanResults();
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* @return Shield\Scans\Base\BaseResultsSet|mixed
|
88 |
-
*/
|
89 |
-
protected function getScanActionResults() {
|
90 |
-
$oAction = $this->getScanActionVO();
|
91 |
-
$oResults = $oAction->getNewResultsSet();
|
92 |
-
if ( !empty( $oAction->results ) ) {
|
93 |
-
foreach ( $oAction->results as $aRes ) {
|
94 |
-
$oResults->addItem( $oAction->getNewResultItem()->applyFromArray( $aRes ) );
|
95 |
-
}
|
96 |
-
}
|
97 |
-
return $oResults;
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* @return Shield\Scans\Base\BaseResultsSet
|
102 |
-
*/
|
103 |
-
protected function getLiveResults() {
|
104 |
-
$this->launchScan();
|
105 |
-
return $this->getScanActionResults();
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* @return Shield\Scans\Base\BaseResultsSet|mixed
|
110 |
-
* @deprecated
|
111 |
-
*/
|
112 |
-
protected function getNewResultsSet() {
|
113 |
-
return $this->getScanActionVO()->getNewResultsSet();
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* @return Shield\Scans\Base\BaseResultItem|mixed
|
118 |
-
* @deprecated
|
119 |
-
*/
|
120 |
-
protected function getResultItem() {
|
121 |
-
return $this->getScanActionVO()->getNewResultItem();
|
122 |
-
}
|
123 |
-
|
124 |
/**
|
125 |
* @return Shield\Scans\Base\BaseRepair|mixed|null
|
126 |
*/
|
127 |
abstract protected function getRepairer();
|
128 |
|
129 |
-
/**
|
130 |
-
* @return \FernleafSystems\Wordpress\Plugin\Shield\Scans\Common\ScanLauncher|null
|
131 |
-
*/
|
132 |
-
protected function getScanLauncher() {
|
133 |
-
return ( new Shield\Scans\Common\ScanLauncher() )
|
134 |
-
->setMod( $this->getMod() )
|
135 |
-
->setScanActionVO( $this->getScanActionVO() );
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* @return bool
|
140 |
-
*/
|
141 |
-
public function isScanRunning() {
|
142 |
-
return ( new Shield\Scans\Base\ScanActionQuery() )
|
143 |
-
->setScanActionVO( $this->getScanActionVO() )
|
144 |
-
->isRunning();
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* @return bool
|
149 |
-
*/
|
150 |
-
public function isScanLauncherSupported() {
|
151 |
-
return in_array( $this->getScanActionVO()->id, [ 'apc', 'mal', 'ptg', 'ufc', 'wcf', 'wpv' ] );
|
152 |
-
}
|
153 |
-
|
154 |
/**
|
155 |
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
156 |
*/
|
157 |
public function getScanActionVO() {
|
158 |
if ( !$this->oScanActionVO instanceof Shield\Scans\Base\BaseScanActionVO ) {
|
159 |
$oAct = $this->getNewActionVO();
|
160 |
-
$oAct->
|
161 |
-
|
162 |
-
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
163 |
-
$oMod = $this->getMod();
|
164 |
-
$oAct->tmp_dir = $oMod->getScansTempDir();
|
165 |
-
|
166 |
$this->oScanActionVO = $oAct;
|
167 |
}
|
168 |
|
@@ -174,26 +81,14 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
174 |
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
175 |
*/
|
176 |
protected function getNewActionVO() {
|
177 |
-
return new
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* @param Shield\Scans\Base\BaseResultsSet $oNewResults
|
182 |
-
*/
|
183 |
-
protected function updateScanResultsStore( $oNewResults ) {
|
184 |
-
$oNewCopy = clone $oNewResults; // so we don't modify these for later use.
|
185 |
-
$oExisting = $this->readScanResultsFromDb();
|
186 |
-
$oItemsToDelete = ( new Shield\Scans\Base\DiffResultForStorage() )->diff( $oExisting, $oNewCopy );
|
187 |
-
$this->deleteResultsSet( $oItemsToDelete );
|
188 |
-
$this->storeNewScanResults( $oNewCopy );
|
189 |
-
$this->updateExistingScanResults( $oExisting );
|
190 |
}
|
191 |
|
192 |
/**
|
193 |
* @param Shield\Scans\Base\BaseResultsSet $oToDelete
|
194 |
*/
|
195 |
protected function deleteResultsSet( $oToDelete ) {
|
196 |
-
( new
|
197 |
->setDbHandler( $this->getMod()->getDbHandler() )
|
198 |
->deleteResults( $oToDelete );
|
199 |
}
|
@@ -207,52 +102,15 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
207 |
return $this->convertVosToResults( $oSelector->forScan( static::SCAN_SLUG ) );
|
208 |
}
|
209 |
|
210 |
-
/**
|
211 |
-
* @param Shield\Scans\Base\BaseResultsSet $oResults
|
212 |
-
*/
|
213 |
-
protected function storeNewScanResults( $oResults ) {
|
214 |
-
$oInsert = $this->getMod()->getDbHandler()->getQueryInserter();
|
215 |
-
foreach ( $this->convertResultsToVos( $oResults ) as $oVo ) {
|
216 |
-
$oInsert->insert( $oVo );
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* @param Shield\Scans\Base\BaseResultsSet $oResults
|
222 |
-
*/
|
223 |
-
protected function updateExistingScanResults( $oResults ) {
|
224 |
-
$oUp = $this->getMod()->getDbHandler()->getQueryUpdater();
|
225 |
-
/** @var Shield\Databases\Scanner\EntryVO $oVo */
|
226 |
-
foreach ( $this->convertResultsToVos( $oResults ) as $oVo ) {
|
227 |
-
$oUp->reset()
|
228 |
-
->setUpdateData( $oVo->getRawDataAsArray() )
|
229 |
-
->setUpdateWheres(
|
230 |
-
[
|
231 |
-
'scan' => static::SCAN_SLUG,
|
232 |
-
'hash' => $oVo->hash,
|
233 |
-
]
|
234 |
-
)
|
235 |
-
->query();
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* @param Shield\Scans\Base\BaseResultsSet $oResults
|
241 |
-
* @return Shield\Databases\Base\EntryVO[] $aVos
|
242 |
-
*/
|
243 |
-
abstract protected function convertResultsToVos( $oResults );
|
244 |
-
|
245 |
/**
|
246 |
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
247 |
-
* @return Shield\Scans\Base\BaseResultsSet
|
248 |
-
*/
|
249 |
-
abstract protected function convertVosToResults( $aVos );
|
250 |
-
|
251 |
-
/**
|
252 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
253 |
-
* @return Shield\Scans\Base\BaseResultItem
|
254 |
*/
|
255 |
-
|
|
|
|
|
|
|
|
|
256 |
|
257 |
/**
|
258 |
* @param Shield\Scans\Base\BaseResultItem $oItem
|
@@ -265,7 +123,7 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
265 |
->getQuerySelector();
|
266 |
/** @var Shield\Databases\Scanner\EntryVO $oVo */
|
267 |
$oVo = $oSel->filterByHash( $oItem->hash )
|
268 |
-
->filterByScan( $this->getScanActionVO()->
|
269 |
->first();
|
270 |
return $oVo;
|
271 |
}
|
@@ -322,7 +180,9 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
322 |
throw new \Exception( 'Item could not be found.' );
|
323 |
}
|
324 |
|
325 |
-
$oItem =
|
|
|
|
|
326 |
|
327 |
switch ( $sAction ) {
|
328 |
case 'delete':
|
@@ -445,16 +305,16 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
445 |
* Because it's the cron and we'll maybe be notifying user, we look
|
446 |
* only for items that have not been notified recently.
|
447 |
*/
|
448 |
-
|
449 |
-
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $
|
450 |
-
$
|
451 |
/** @var Shield\Databases\Scanner\Select $oSel */
|
452 |
$oSel = $this->getMod()
|
453 |
->getDbHandler()
|
454 |
->getQuerySelector();
|
455 |
/** @var Shield\Databases\Scanner\EntryVO[] $aRes */
|
456 |
$aRes = $oSel->filterByScan( static::SCAN_SLUG )
|
457 |
-
->filterForCron( $
|
458 |
->query();
|
459 |
|
460 |
if ( !empty( $aRes ) ) {
|
@@ -517,7 +377,7 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
517 |
* @return $this
|
518 |
*/
|
519 |
public function resetScan() {
|
520 |
-
( new
|
521 |
->setDbHandler( $this->getMod()->getDbHandler() )
|
522 |
->setScanActionVO( $this->getScanActionVO() )
|
523 |
->deleteAllForScan();
|
@@ -541,10 +401,9 @@ abstract class ICWP_WPSF_Processor_ScanBase extends ICWP_WPSF_Processor_BaseWpsf
|
|
541 |
}
|
542 |
|
543 |
/**
|
544 |
-
* @
|
545 |
-
* @deprecated 8
|
546 |
*/
|
547 |
-
|
548 |
-
return false;
|
549 |
}
|
550 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
abstract class ICWP_WPSF_Processor_ScanBase extends Shield\Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
use Shield\Scans\Common\ScanActionConsumer;
|
10 |
const SCAN_SLUG = 'base';
|
15 |
protected $oScanner;
|
16 |
|
17 |
public function run() {
|
18 |
+
add_action( $this->getCon()->prefix( 'ondemand_scan_'.static::SCAN_SLUG ), function () {
|
19 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
20 |
+
$oMod = $this->getMod();
|
21 |
+
$oMod->getScanController()
|
22 |
+
->startScans( [ static::SCAN_SLUG ] );
|
|
|
23 |
} );
|
24 |
}
|
25 |
|
42 |
*/
|
43 |
abstract public function isEnabled();
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
*/
|
47 |
public function hookOnDemandScan() {
|
58 |
}
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
/**
|
62 |
* @return Shield\Scans\Base\BaseRepair|mixed|null
|
63 |
*/
|
64 |
abstract protected function getRepairer();
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/**
|
67 |
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
68 |
*/
|
69 |
public function getScanActionVO() {
|
70 |
if ( !$this->oScanActionVO instanceof Shield\Scans\Base\BaseScanActionVO ) {
|
71 |
$oAct = $this->getNewActionVO();
|
72 |
+
$oAct->scan = static::SCAN_SLUG;
|
|
|
|
|
|
|
|
|
|
|
73 |
$this->oScanActionVO = $oAct;
|
74 |
}
|
75 |
|
81 |
* @return Shield\Scans\Base\BaseScanActionVO|mixed
|
82 |
*/
|
83 |
protected function getNewActionVO() {
|
84 |
+
return ( new Scan\ScanActionFromSlug() )->getAction( static::SCAN_SLUG );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
|
87 |
/**
|
88 |
* @param Shield\Scans\Base\BaseResultsSet $oToDelete
|
89 |
*/
|
90 |
protected function deleteResultsSet( $oToDelete ) {
|
91 |
+
( new Scan\Results\Clean() )
|
92 |
->setDbHandler( $this->getMod()->getDbHandler() )
|
93 |
->deleteResults( $oToDelete );
|
94 |
}
|
102 |
return $this->convertVosToResults( $oSelector->forScan( static::SCAN_SLUG ) );
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
/**
|
106 |
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
107 |
+
* @return Shield\Scans\Base\BaseResultsSet|mixed
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
*/
|
109 |
+
protected function convertVosToResults( $aVos ) {
|
110 |
+
return ( new Scan\Results\ConvertBetweenTypes() )
|
111 |
+
->setScanActionVO( $this->getScanActionVO() )
|
112 |
+
->fromVOsToResultsSet( $aVos );
|
113 |
+
}
|
114 |
|
115 |
/**
|
116 |
* @param Shield\Scans\Base\BaseResultItem $oItem
|
123 |
->getQuerySelector();
|
124 |
/** @var Shield\Databases\Scanner\EntryVO $oVo */
|
125 |
$oVo = $oSel->filterByHash( $oItem->hash )
|
126 |
+
->filterByScan( $this->getScanActionVO()->scan )
|
127 |
->first();
|
128 |
return $oVo;
|
129 |
}
|
180 |
throw new \Exception( 'Item could not be found.' );
|
181 |
}
|
182 |
|
183 |
+
$oItem = ( new Scan\Results\ConvertBetweenTypes() )
|
184 |
+
->setScanActionVO( $this->getScanActionVO() )
|
185 |
+
->convertVoToResultItem( $oEntry );
|
186 |
|
187 |
switch ( $sAction ) {
|
188 |
case 'delete':
|
305 |
* Because it's the cron and we'll maybe be notifying user, we look
|
306 |
* only for items that have not been notified recently.
|
307 |
*/
|
308 |
+
public function cronProcessScanResults() {
|
309 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
310 |
+
$oMod = $this->getMod();
|
311 |
/** @var Shield\Databases\Scanner\Select $oSel */
|
312 |
$oSel = $this->getMod()
|
313 |
->getDbHandler()
|
314 |
->getQuerySelector();
|
315 |
/** @var Shield\Databases\Scanner\EntryVO[] $aRes */
|
316 |
$aRes = $oSel->filterByScan( static::SCAN_SLUG )
|
317 |
+
->filterForCron( $oMod->getScanNotificationInterval() )
|
318 |
->query();
|
319 |
|
320 |
if ( !empty( $aRes ) ) {
|
377 |
* @return $this
|
378 |
*/
|
379 |
public function resetScan() {
|
380 |
+
( new Scan\Results\Clean() )
|
381 |
->setDbHandler( $this->getMod()->getDbHandler() )
|
382 |
->setScanActionVO( $this->getScanActionVO() )
|
383 |
->deleteAllForScan();
|
401 |
}
|
402 |
|
403 |
/**
|
404 |
+
* @param Shield\Scans\Base\BaseScanActionVO $oAction
|
405 |
+
* @deprecated 8.1
|
406 |
*/
|
407 |
+
public function postScanActionProcess( $oAction ) {
|
|
|
408 |
}
|
409 |
}
|
src/processors/hackprotect_scan_mal.php
CHANGED
@@ -30,30 +30,6 @@ class ICWP_WPSF_Processor_HackProtect_Mal extends ICWP_WPSF_Processor_ScanBase {
|
|
30 |
return $oFO->isMalScanEnabled();
|
31 |
}
|
32 |
|
33 |
-
/**
|
34 |
-
* @param Shield\Scans\Mal\ResultsSet $oResults
|
35 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
36 |
-
*/
|
37 |
-
protected function convertResultsToVos( $oResults ) {
|
38 |
-
return ( new Shield\Scans\Mal\ConvertResultsToVos() )->convert( $oResults );
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
43 |
-
* @return Shield\Scans\Mal\ResultsSet
|
44 |
-
*/
|
45 |
-
protected function convertVosToResults( $aVos ) {
|
46 |
-
return ( new Shield\Scans\Mal\ConvertVosToResults() )->convert( $aVos );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
51 |
-
* @return Shield\Scans\Mal\ResultItem
|
52 |
-
*/
|
53 |
-
protected function convertVoToResultItem( $oVo ) {
|
54 |
-
return ( new Shield\Scans\Mal\ConvertVosToResults() )->convertItem( $oVo );
|
55 |
-
}
|
56 |
-
|
57 |
/**
|
58 |
* @return Shield\Scans\Mal\Repair
|
59 |
*/
|
@@ -61,27 +37,6 @@ class ICWP_WPSF_Processor_HackProtect_Mal extends ICWP_WPSF_Processor_ScanBase {
|
|
61 |
return ( new Shield\Scans\Mal\Repair() )->setMod( $this->getMod() );
|
62 |
}
|
63 |
|
64 |
-
/**
|
65 |
-
* @return Shield\Scans\Mal\ResultsSet
|
66 |
-
*/
|
67 |
-
protected function getNewResultsSet() {
|
68 |
-
return new Shield\Scans\Mal\ResultsSet();
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @return Shield\Scans\Mal\ResultItem
|
73 |
-
*/
|
74 |
-
protected function getResultItem() {
|
75 |
-
return new Shield\Scans\Mal\ResultItem();
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* @return Shield\Scans\Mal\ScanActionVO
|
80 |
-
*/
|
81 |
-
protected function getNewActionVO() {
|
82 |
-
return new Shield\Scans\Mal\ScanActionVO();
|
83 |
-
}
|
84 |
-
|
85 |
/**
|
86 |
* @param Shield\Scans\Mal\ResultItem $oItem
|
87 |
* @return bool
|
30 |
return $oFO->isMalScanEnabled();
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* @return Shield\Scans\Mal\Repair
|
35 |
*/
|
37 |
return ( new Shield\Scans\Mal\Repair() )->setMod( $this->getMod() );
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @param Shield\Scans\Mal\ResultItem $oItem
|
42 |
* @return bool
|
src/processors/hackprotect_scan_ptg.php
CHANGED
@@ -73,30 +73,6 @@ class ICWP_WPSF_Processor_HackProtect_Ptg extends ICWP_WPSF_Processor_HackProtec
|
|
73 |
return $oFO->isPtgEnabled();
|
74 |
}
|
75 |
|
76 |
-
/**
|
77 |
-
* @param Shield\Scans\Ptg\ResultsSet $oResults
|
78 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
79 |
-
*/
|
80 |
-
protected function convertResultsToVos( $oResults ) {
|
81 |
-
return ( new Shield\Scans\Ptg\ConvertResultsToVos() )->convert( $oResults );
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
86 |
-
* @return Shield\Scans\Ptg\ResultsSet
|
87 |
-
*/
|
88 |
-
protected function convertVosToResults( $aVos ) {
|
89 |
-
return ( new Shield\Scans\Ptg\ConvertVosToResults() )->convert( $aVos );
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
94 |
-
* @return Shield\Scans\Ptg\ResultItem
|
95 |
-
*/
|
96 |
-
protected function convertVoToResultItem( $oVo ) {
|
97 |
-
return ( new Shield\Scans\Ptg\ConvertVosToResults() )->convertItem( $oVo );
|
98 |
-
}
|
99 |
-
|
100 |
/**
|
101 |
* @return Shield\Scans\Wcf\Repair|mixed
|
102 |
*/
|
@@ -104,27 +80,6 @@ class ICWP_WPSF_Processor_HackProtect_Ptg extends ICWP_WPSF_Processor_HackProtec
|
|
104 |
return new Shield\Scans\Ptg\Repair();
|
105 |
}
|
106 |
|
107 |
-
/**
|
108 |
-
* @return Shield\Scans\Ptg\ScanActionVO
|
109 |
-
*/
|
110 |
-
protected function getNewActionVO() {
|
111 |
-
return new Shield\Scans\Ptg\ScanActionVO();
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* @return Shield\Scans\Ptg\ResultsSet
|
116 |
-
*/
|
117 |
-
protected function getNewResultsSet() {
|
118 |
-
return new Shield\Scans\Ptg\ResultsSet();
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @return Shield\Scans\Ptg\ResultItem
|
123 |
-
*/
|
124 |
-
protected function getResultItem() {
|
125 |
-
return new Shield\Scans\Ptg\ResultItem();
|
126 |
-
}
|
127 |
-
|
128 |
/**
|
129 |
* @param string $sContext
|
130 |
* @return Shield\Scans\Ptg\ScannerPlugins|Shield\Scans\Ptg\ScannerThemes
|
73 |
return $oFO->isPtgEnabled();
|
74 |
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
/**
|
77 |
* @return Shield\Scans\Wcf\Repair|mixed
|
78 |
*/
|
80 |
return new Shield\Scans\Ptg\Repair();
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/**
|
84 |
* @param string $sContext
|
85 |
* @return Shield\Scans\Ptg\ScannerPlugins|Shield\Scans\Ptg\ScannerThemes
|
src/processors/hackprotect_scan_ufc.php
CHANGED
@@ -16,37 +16,6 @@ class ICWP_WPSF_Processor_HackProtect_Ufc extends ICWP_WPSF_Processor_ScanBase {
|
|
16 |
return $oFO->isUfcEnabled();
|
17 |
}
|
18 |
|
19 |
-
/**
|
20 |
-
* @param Shield\Scans\Ufc\ResultsSet $oResults
|
21 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
22 |
-
*/
|
23 |
-
protected function convertResultsToVos( $oResults ) {
|
24 |
-
return ( new Shield\Scans\Ufc\ConvertResultsToVos() )->convert( $oResults );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
29 |
-
* @return Shield\Scans\Ufc\ResultsSet
|
30 |
-
*/
|
31 |
-
protected function convertVosToResults( $aVos ) {
|
32 |
-
return ( new Shield\Scans\Ufc\ConvertVosToResults() )->convert( $aVos );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
37 |
-
* @return Shield\Scans\Ufc\ResultItem
|
38 |
-
*/
|
39 |
-
protected function convertVoToResultItem( $oVo ) {
|
40 |
-
return ( new Shield\Scans\Ufc\ConvertVosToResults() )->convertItem( $oVo );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @return Shield\Scans\Ufc\ScanActionVO
|
45 |
-
*/
|
46 |
-
protected function getNewActionVO() {
|
47 |
-
return new Shield\Scans\Ufc\ScanActionVO();
|
48 |
-
}
|
49 |
-
|
50 |
/**
|
51 |
* @return Shield\Scans\Ufc\Repair
|
52 |
*/
|
16 |
return $oFO->isUfcEnabled();
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* @return Shield\Scans\Ufc\Repair
|
21 |
*/
|
src/processors/hackprotect_scan_wcf.php
CHANGED
@@ -16,30 +16,6 @@ class ICWP_WPSF_Processor_HackProtect_Wcf extends ICWP_WPSF_Processor_ScanBase {
|
|
16 |
return $oFO->isWcfScanEnabled();
|
17 |
}
|
18 |
|
19 |
-
/**
|
20 |
-
* @param Shield\Scans\Wcf\ResultsSet $oResults
|
21 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
22 |
-
*/
|
23 |
-
protected function convertResultsToVos( $oResults ) {
|
24 |
-
return ( new Shield\Scans\Wcf\ConvertResultsToVos() )->convert( $oResults );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @param Shield\Databases\Scanner\EntryVO[] $aVos
|
29 |
-
* @return Shield\Scans\Wcf\ResultsSet
|
30 |
-
*/
|
31 |
-
protected function convertVosToResults( $aVos ) {
|
32 |
-
return ( new Shield\Scans\Wcf\ConvertVosToResults() )->convert( $aVos );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
37 |
-
* @return Shield\Scans\Wcf\ResultItem
|
38 |
-
*/
|
39 |
-
protected function convertVoToResultItem( $oVo ) {
|
40 |
-
return ( new Shield\Scans\Wcf\ConvertVosToResults() )->convertItem( $oVo );
|
41 |
-
}
|
42 |
-
|
43 |
/**
|
44 |
* @return Shield\Scans\Wcf\Repair|mixed
|
45 |
*/
|
@@ -47,50 +23,6 @@ class ICWP_WPSF_Processor_HackProtect_Wcf extends ICWP_WPSF_Processor_ScanBase {
|
|
47 |
return new Shield\Scans\Wcf\Repair();
|
48 |
}
|
49 |
|
50 |
-
/**
|
51 |
-
* @return Shield\Scans\Wcf\ResultsSet
|
52 |
-
*/
|
53 |
-
protected function getNewResultsSet() {
|
54 |
-
return new Shield\Scans\Wcf\ResultsSet();
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @return Shield\Scans\Wcf\ResultItem
|
59 |
-
*/
|
60 |
-
protected function getResultItem() {
|
61 |
-
return new Shield\Scans\Wcf\ResultItem();
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* @return Shield\Scans\Wcf\ScanActionVO
|
66 |
-
*/
|
67 |
-
protected function getNewActionVO() {
|
68 |
-
return new Shield\Scans\Wcf\ScanActionVO();
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @return array
|
73 |
-
*/
|
74 |
-
protected function getFullExclusions() {
|
75 |
-
$aExclusions = $this->getMod()->getDef( 'wcf_exclusions' );
|
76 |
-
$aExclusions = is_array( $aExclusions ) ? $aExclusions : [];
|
77 |
-
|
78 |
-
// Flywheel specific mods
|
79 |
-
if ( defined( 'FLYWHEEL_PLUGIN_DIR' ) ) {
|
80 |
-
$aExclusions[] = 'wp-settings.php';
|
81 |
-
$aExclusions[] = 'wp-admin/includes/upgrade.php';
|
82 |
-
}
|
83 |
-
return $aExclusions;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* @return array
|
88 |
-
*/
|
89 |
-
protected function getMissingOnlyExclusions() {
|
90 |
-
$aExclusions = $this->getMod()->getDef( 'wcf_exclusions_missing_only' );
|
91 |
-
return is_array( $aExclusions ) ? $aExclusions : [];
|
92 |
-
}
|
93 |
-
|
94 |
/**
|
95 |
* @param Shield\Scans\Wcf\ResultItem $oItem
|
96 |
* @return bool
|
@@ -156,8 +88,8 @@ class ICWP_WPSF_Processor_HackProtect_Wcf extends ICWP_WPSF_Processor_ScanBase {
|
|
156 |
* @return array
|
157 |
*/
|
158 |
private function buildEmailBodyFromFiles( $oResults ) {
|
159 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $
|
160 |
-
$
|
161 |
$sName = $this->getCon()->getHumanName();
|
162 |
$sHomeUrl = Services::WpGeneral()->getHomeUrl();
|
163 |
|
@@ -166,11 +98,11 @@ class ICWP_WPSF_Processor_HackProtect_Wcf extends ICWP_WPSF_Processor_ScanBase {
|
|
166 |
sprintf( '%s: %s', __( 'Site URL', 'wp-simple-firewall' ), sprintf( '<a href="%s" target="_blank">%s</a>', $sHomeUrl, $sHomeUrl ) ),
|
167 |
];
|
168 |
|
169 |
-
if ( $
|
170 |
$aContent = array_merge( $aContent, $this->buildListOfFilesForEmail( $oResults ) );
|
171 |
$aContent[] = '';
|
172 |
|
173 |
-
if ( $
|
174 |
$aContent[] = '<strong>'.sprintf( __( "%s has already attempted to repair the files.", 'wp-simple-firewall' ), $sName ).'</strong>'
|
175 |
.' '.__( 'But, you should always check these files to ensure everything is as you expect.', 'wp-simple-firewall' );
|
176 |
}
|
16 |
return $oFO->isWcfScanEnabled();
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* @return Shield\Scans\Wcf\Repair|mixed
|
21 |
*/
|
23 |
return new Shield\Scans\Wcf\Repair();
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* @param Shield\Scans\Wcf\ResultItem $oItem
|
28 |
* @return bool
|
88 |
* @return array
|
89 |
*/
|
90 |
private function buildEmailBodyFromFiles( $oResults ) {
|
91 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
92 |
+
$oMod = $this->getMod();
|
93 |
$sName = $this->getCon()->getHumanName();
|
94 |
$sHomeUrl = Services::WpGeneral()->getHomeUrl();
|
95 |
|
98 |
sprintf( '%s: %s', __( 'Site URL', 'wp-simple-firewall' ), sprintf( '<a href="%s" target="_blank">%s</a>', $sHomeUrl, $sHomeUrl ) ),
|
99 |
];
|
100 |
|
101 |
+
if ( $oMod->isWcfScanAutoRepair() || $oMod->isIncludeFileLists() ) {
|
102 |
$aContent = array_merge( $aContent, $this->buildListOfFilesForEmail( $oResults ) );
|
103 |
$aContent[] = '';
|
104 |
|
105 |
+
if ( $oMod->isWcfScanAutoRepair() ) {
|
106 |
$aContent[] = '<strong>'.sprintf( __( "%s has already attempted to repair the files.", 'wp-simple-firewall' ), $sName ).'</strong>'
|
107 |
.' '.__( 'But, you should always check these files to ensure everything is as you expect.', 'wp-simple-firewall' );
|
108 |
}
|
src/processors/hackprotect_scan_wpv.php
CHANGED
@@ -22,7 +22,7 @@ class ICWP_WPSF_Processor_HackProtect_Wpv extends ICWP_WPSF_Processor_HackProtec
|
|
22 |
add_action( 'upgrader_process_complete', [ $this, 'hookOnDemandScan' ], 10, 0 );
|
23 |
add_action( 'deleted_plugin', [ $this, 'hookOnDemandScan' ], 10, 0 );
|
24 |
|
25 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
26 |
$oFO = $this->getMod();
|
27 |
if ( $oFO->isWpvulnAutoupdatesEnabled() ) {
|
28 |
add_filter( 'auto_update_plugin', [ $this, 'autoupdateVulnerablePlugins' ], PHP_INT_MAX, 2 );
|
@@ -52,30 +52,6 @@ class ICWP_WPSF_Processor_HackProtect_Wpv extends ICWP_WPSF_Processor_HackProtec
|
|
52 |
return $oFO->isWpvulnEnabled();
|
53 |
}
|
54 |
|
55 |
-
/**
|
56 |
-
* @param Shield\Scans\Wpv\ResultsSet $oResults
|
57 |
-
* @return Shield\Databases\Scanner\EntryVO[]
|
58 |
-
*/
|
59 |
-
protected function convertResultsToVos( $oResults ) {
|
60 |
-
return ( new Shield\Scans\Wpv\ConvertResultsToVos() )->convert( $oResults );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @param mixed|Shield\Databases\Scanner\EntryVO[] $aVos
|
65 |
-
* @return Shield\Scans\Wpv\ResultsSet
|
66 |
-
*/
|
67 |
-
protected function convertVosToResults( $aVos ) {
|
68 |
-
return ( new Shield\Scans\Wpv\ConvertVosToResults() )->convert( $aVos );
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @param Shield\Databases\Scanner\EntryVO $oVo
|
73 |
-
* @return Shield\Scans\Wpv\ResultItem
|
74 |
-
*/
|
75 |
-
protected function convertVoToResultItem( $oVo ) {
|
76 |
-
return ( new Shield\Scans\Wpv\ConvertVosToResults() )->convertItem( $oVo );
|
77 |
-
}
|
78 |
-
|
79 |
/**
|
80 |
* @return Shield\Scans\Wpv\Repair
|
81 |
*/
|
@@ -83,32 +59,11 @@ class ICWP_WPSF_Processor_HackProtect_Wpv extends ICWP_WPSF_Processor_HackProtec
|
|
83 |
return new Shield\Scans\Wpv\Repair();
|
84 |
}
|
85 |
|
86 |
-
/**
|
87 |
-
* @return Shield\Scans\Wpv\ScanActionVO
|
88 |
-
*/
|
89 |
-
protected function getNewActionVO() {
|
90 |
-
return new Shield\Scans\Wpv\ScanActionVO();
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* @return Shield\Scans\Wpv\ResultsSet
|
95 |
-
*/
|
96 |
-
protected function getNewResultsSet() {
|
97 |
-
return new Shield\Scans\Wpv\ResultsSet();
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* @return Shield\Scans\Wpv\ResultItem
|
102 |
-
*/
|
103 |
-
protected function getResultItem() {
|
104 |
-
return new Shield\Scans\Wpv\ResultItem();
|
105 |
-
}
|
106 |
-
|
107 |
/**
|
108 |
* @param Shield\Scans\Wpv\ResultsSet $oRes
|
109 |
*/
|
110 |
protected function runCronAutoRepair( $oRes ) {
|
111 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
112 |
$oFO = $this->getMod();
|
113 |
if ( $oFO->isWpvulnAutoupdatesEnabled() ) {
|
114 |
$this->getRepairer()->repairResultsSet( $oRes );
|
@@ -170,7 +125,7 @@ class ICWP_WPSF_Processor_HackProtect_Wpv extends ICWP_WPSF_Processor_HackProtec
|
|
170 |
}
|
171 |
|
172 |
public function addPluginVulnerabilityRows() {
|
173 |
-
/** @var ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
174 |
$oFO = $this->getMod();
|
175 |
|
176 |
if ( $oFO->isWpvulnPluginsHighlightEnabled() && $this->countVulnerablePlugins() > 0 ) {
|
22 |
add_action( 'upgrader_process_complete', [ $this, 'hookOnDemandScan' ], 10, 0 );
|
23 |
add_action( 'deleted_plugin', [ $this, 'hookOnDemandScan' ], 10, 0 );
|
24 |
|
25 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
26 |
$oFO = $this->getMod();
|
27 |
if ( $oFO->isWpvulnAutoupdatesEnabled() ) {
|
28 |
add_filter( 'auto_update_plugin', [ $this, 'autoupdateVulnerablePlugins' ], PHP_INT_MAX, 2 );
|
52 |
return $oFO->isWpvulnEnabled();
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* @return Shield\Scans\Wpv\Repair
|
57 |
*/
|
59 |
return new Shield\Scans\Wpv\Repair();
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
/**
|
63 |
* @param Shield\Scans\Wpv\ResultsSet $oRes
|
64 |
*/
|
65 |
protected function runCronAutoRepair( $oRes ) {
|
66 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
67 |
$oFO = $this->getMod();
|
68 |
if ( $oFO->isWpvulnAutoupdatesEnabled() ) {
|
69 |
$this->getRepairer()->repairResultsSet( $oRes );
|
125 |
}
|
126 |
|
127 |
public function addPluginVulnerabilityRows() {
|
128 |
+
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oFO */
|
129 |
$oFO = $this->getMod();
|
130 |
|
131 |
if ( $oFO->isWpvulnPluginsHighlightEnabled() && $this->countVulnerablePlugins() > 0 ) {
|
src/processors/hackprotect_scanner.php
CHANGED
@@ -2,136 +2,42 @@
|
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner;
|
|
|
|
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
-
class ICWP_WPSF_Processor_HackProtect_Scanner extends
|
8 |
|
9 |
use Shield\Crons\StandardCron;
|
10 |
|
11 |
-
/**
|
12 |
-
* @var Shield\Scans\Common\AsyncScansController
|
13 |
-
*/
|
14 |
-
private $oAsyncScanController;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* ICWP_WPSF_Processor_HackProtect_Scanner constructor.
|
18 |
-
* @param ICWP_WPSF_FeatureHandler_HackProtect $oModCon
|
19 |
-
*/
|
20 |
-
public function __construct( $oModCon ) {
|
21 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'table_name_scanner' ) );
|
22 |
-
}
|
23 |
-
|
24 |
/**
|
25 |
*/
|
26 |
public function run() {
|
27 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
28 |
$oMod = $this->getMod();
|
29 |
|
30 |
-
$this->getSubProcessorApc()->
|
31 |
-
$this->getSubProcessorUfc()->
|
32 |
-
$this->getSubProcessorWcf()->
|
33 |
if ( $oMod->isPremium() ) {
|
34 |
-
$this->getSubProcessorMal()->
|
35 |
-
$this->getSubProcessorWpv()->
|
36 |
if ( $oMod->isPtgEnabled() ) {
|
37 |
-
$this->getSubProcessorPtg()->
|
38 |
}
|
39 |
}
|
40 |
-
|
41 |
-
$this->handleAsyncScanRequest();
|
42 |
$this->setupCron();
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @param string[] $aScans
|
47 |
-
*/
|
48 |
-
public function launchScans( $aScans ) {
|
49 |
-
$this->getAsyncScanController()
|
50 |
-
->abortAllScans() // TODO: not abort all, but append?
|
51 |
-
->setupNewScanJob( $aScans );
|
52 |
-
$this->processAsyncScans();
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
*
|
57 |
-
*/
|
58 |
-
private function handleAsyncScanRequest() {
|
59 |
-
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
60 |
-
$oOpts = $this->getMod()->getOptions();
|
61 |
-
$bIsScanRequest = ( !Services::WpGeneral()->isAjax() &&
|
62 |
-
$this->getCon()->getShieldAction() == 'scan_async_process'
|
63 |
-
&& Services::Request()->query( 'scan_key' ) == $oOpts->getScanKey() );
|
64 |
-
if ( $bIsScanRequest ) {
|
65 |
-
$this->processAsyncScans();
|
66 |
-
die();
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
*/
|
72 |
-
private function processAsyncScans() {
|
73 |
-
try {
|
74 |
-
$oAction = $this->getAsyncScanController()->runScans();
|
75 |
-
if ( $oAction->ts_finish > 0 ) {
|
76 |
-
$this->getSubPro( $oAction->id )
|
77 |
-
->postScanActionProcess( $oAction );
|
78 |
-
}
|
79 |
-
}
|
80 |
-
catch ( \Exception $oE ) {
|
81 |
-
// error_log( $oE->getMessage() );
|
82 |
-
}
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @return Shield\Scans\Common\AsyncScansController
|
87 |
-
*/
|
88 |
-
public function getAsyncScanController() {
|
89 |
-
if ( empty( $this->oAsyncScanController ) ) {
|
90 |
-
$this->oAsyncScanController = ( new Shield\Scans\Common\AsyncScansController() )
|
91 |
-
->setMod( $this->getMod() );
|
92 |
-
}
|
93 |
-
return $this->oAsyncScanController;
|
94 |
}
|
95 |
|
96 |
/**
|
97 |
* @param string $sSlug
|
98 |
-
* @return ICWP_WPSF_Processor_ScanBase|null
|
99 |
*/
|
100 |
public function getScannerFromSlug( $sSlug ) {
|
101 |
-
/** @var \
|
102 |
-
$
|
103 |
-
return in_array( $sSlug, $
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* @return bool[]
|
108 |
-
*/
|
109 |
-
public function getScansRunningStates() {
|
110 |
-
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
111 |
-
$oMod = $this->getMod();
|
112 |
-
$aRunning = [];
|
113 |
-
|
114 |
-
$oS = $this->getAsyncScanController();
|
115 |
-
$oS->cleanStaleScans();
|
116 |
-
$oJob = $oS->loadScansJob();
|
117 |
-
foreach ( $oMod->getAllScanSlugs() as $sSlug ) {
|
118 |
-
$aRunning[ $sSlug ] = $oJob->isScanInited( $sSlug );
|
119 |
-
}
|
120 |
-
return $aRunning;
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* @return string[]
|
125 |
-
*/
|
126 |
-
public function getRunningScans() {
|
127 |
-
return array_keys( array_filter( $this->getScansRunningStates() ) );
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @return bool
|
132 |
-
*/
|
133 |
-
public function hasRunningScans() {
|
134 |
-
return count( $this->getRunningScans() ) > 0;
|
135 |
}
|
136 |
|
137 |
/**
|
@@ -209,10 +115,17 @@ class ICWP_WPSF_Processor_HackProtect_Scanner extends ICWP_WPSF_BaseDbProcessor
|
|
209 |
}
|
210 |
|
211 |
/**
|
212 |
-
*
|
213 |
*/
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
/**
|
@@ -247,61 +160,44 @@ class ICWP_WPSF_Processor_HackProtect_Scanner extends ICWP_WPSF_BaseDbProcessor
|
|
247 |
private function cronScan() {
|
248 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
249 |
$oMod = $this->getMod();
|
250 |
-
|
251 |
-
$
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
|
|
|
|
256 |
}
|
257 |
-
);
|
258 |
-
|
259 |
-
if ( !empty( $aScansToRun ) ) {
|
260 |
-
$this->launchScans( $aScansToRun );
|
261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
|
264 |
/**
|
265 |
* @return int
|
266 |
*/
|
267 |
protected function getCronFrequency() {
|
268 |
-
/** @var \
|
269 |
-
$
|
270 |
-
return $
|
271 |
}
|
272 |
|
273 |
/**
|
274 |
* @return int
|
275 |
*/
|
276 |
protected function getCronName() {
|
277 |
-
|
278 |
-
$oFO = $this->getMod();
|
279 |
-
return $oFO->prefix( $oFO->getDef( 'cron_all_scans' ) );
|
280 |
}
|
281 |
|
282 |
/**
|
283 |
-
* @
|
284 |
-
|
285 |
-
protected function getCreateTableSql() {
|
286 |
-
return "CREATE TABLE %s (
|
287 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
288 |
-
hash varchar(32) NOT NULL DEFAULT '' COMMENT 'Unique Item Hash',
|
289 |
-
meta text COMMENT 'Relevant Item Data',
|
290 |
-
scan varchar(10) NOT NULL DEFAULT 0 COMMENT 'Scan Type',
|
291 |
-
severity int(3) NOT NULL DEFAULT 1 COMMENT 'Severity',
|
292 |
-
ignored_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Ignored',
|
293 |
-
notified_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Last Notified',
|
294 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Discovered',
|
295 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'TS Soft Deleted',
|
296 |
-
PRIMARY KEY (id)
|
297 |
-
) %s;";
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* @return array
|
302 |
*/
|
303 |
-
|
304 |
-
$aDef = $this->getMod()->getDef( 'table_columns_scanner' );
|
305 |
-
return ( is_array( $aDef ) ? $aDef : [] );
|
306 |
}
|
307 |
}
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Scanner;
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
6 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard;
|
7 |
use FernleafSystems\Wordpress\Services\Services;
|
8 |
|
9 |
+
class ICWP_WPSF_Processor_HackProtect_Scanner extends ShieldProcessor {
|
10 |
|
11 |
use Shield\Crons\StandardCron;
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
*/
|
15 |
public function run() {
|
16 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
17 |
$oMod = $this->getMod();
|
18 |
|
19 |
+
$this->getSubProcessorApc()->execute();
|
20 |
+
$this->getSubProcessorUfc()->execute();
|
21 |
+
$this->getSubProcessorWcf()->execute();
|
22 |
if ( $oMod->isPremium() ) {
|
23 |
+
$this->getSubProcessorMal()->execute();
|
24 |
+
$this->getSubProcessorWpv()->execute();
|
25 |
if ( $oMod->isPtgEnabled() ) {
|
26 |
+
$this->getSubProcessorPtg()->execute();
|
27 |
}
|
28 |
}
|
|
|
|
|
29 |
$this->setupCron();
|
30 |
+
$this->handlePostScanCron();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
34 |
* @param string $sSlug
|
35 |
+
* @return \ICWP_WPSF_Processor_ScanBase|null
|
36 |
*/
|
37 |
public function getScannerFromSlug( $sSlug ) {
|
38 |
+
/** @var HackGuard\Options $oOpts */
|
39 |
+
$oOpts = $this->getOptions();
|
40 |
+
return in_array( $sSlug, $oOpts->getScanSlugs() ) ? $this->getSubPro( $sSlug ) : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Responsible for sending out emails and doing any automated repairs.
|
119 |
*/
|
120 |
+
private function handlePostScanCron() {
|
121 |
+
add_action( $this->getCon()->prefix( 'post_scan' ), function ( $aScansToNotify ) {
|
122 |
+
/** @var HackGuard\Options $oOpts */
|
123 |
+
$oOpts = $this->getOptions();
|
124 |
+
foreach ( array_intersect( $oOpts->getScanSlugs(), $aScansToNotify ) as $sSlug ) {
|
125 |
+
$this->getSubPro( $sSlug )
|
126 |
+
->cronProcessScanResults();
|
127 |
+
}
|
128 |
+
} );
|
129 |
}
|
130 |
|
131 |
/**
|
160 |
private function cronScan() {
|
161 |
/** @var \ICWP_WPSF_FeatureHandler_HackProtect $oMod */
|
162 |
$oMod = $this->getMod();
|
163 |
+
/** @var HackGuard\Options $oOpts */
|
164 |
+
$oOpts = $this->getOptions();
|
165 |
+
|
166 |
+
$aScans = [];
|
167 |
+
foreach ( $oOpts->getScanSlugs() as $sScanSlug ) {
|
168 |
+
$oProc = $this->getSubPro( $sScanSlug );
|
169 |
+
if ( $oProc->isAvailable() && $oProc->isEnabled() ) {
|
170 |
+
$aScans[] = $sScanSlug;
|
171 |
}
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
+
|
174 |
+
$oOpts->setIsScanCron( true );
|
175 |
+
$oMod->saveModOptions();
|
176 |
+
|
177 |
+
$oMod->getScanController()
|
178 |
+
->startScans( $aScans );
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
* @return int
|
183 |
*/
|
184 |
protected function getCronFrequency() {
|
185 |
+
/** @var Shield\Modules\HackGuard\Options $oOpts */
|
186 |
+
$oOpts = $this->getMod()->getOptions();
|
187 |
+
return $oOpts->getScanFrequency();
|
188 |
}
|
189 |
|
190 |
/**
|
191 |
* @return int
|
192 |
*/
|
193 |
protected function getCronName() {
|
194 |
+
return $this->getCon()->prefix( $this->getOptions()->getDef( 'cron_all_scans' ) );
|
|
|
|
|
195 |
}
|
196 |
|
197 |
/**
|
198 |
+
* @param string $sScanSlug
|
199 |
+
* @deprecated 8.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
*/
|
201 |
+
public function launchScan( $sScanSlug ) {
|
|
|
|
|
202 |
}
|
203 |
}
|
src/processors/headers.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* @var bool
|
@@ -42,7 +44,7 @@ class ICWP_WPSF_Processor_Headers extends ICWP_WPSF_Processor_BaseWpsf {
|
|
42 |
function ( $sHeader ) {
|
43 |
return strtolower( trim( $sHeader ) );
|
44 |
},
|
45 |
-
array_keys( $aCurrentWpHeaders )
|
46 |
);
|
47 |
foreach ( $this->gatherSecurityHeaders() as $sHeader => $sValue ) {
|
48 |
if ( !in_array( strtolower( $sHeader ), $aAlreadySentHeaders ) ) {
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
+
|
5 |
+
class ICWP_WPSF_Processor_Headers extends Modules\BaseShield\ShieldProcessor {
|
6 |
|
7 |
/**
|
8 |
* @var bool
|
44 |
function ( $sHeader ) {
|
45 |
return strtolower( trim( $sHeader ) );
|
46 |
},
|
47 |
+
( is_array( $aCurrentWpHeaders ) ? array_keys( $aCurrentWpHeaders ) : [] )
|
48 |
);
|
49 |
foreach ( $this->gatherSecurityHeaders() as $sHeader => $sValue ) {
|
50 |
if ( !in_array( strtolower( $sHeader ), $aAlreadySentHeaders ) ) {
|
src/processors/insights.php
CHANGED
@@ -1,12 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
-
* Override to set what this processor does when it's "run"
|
7 |
-
*/
|
8 |
-
public function run() {
|
9 |
-
/** @var ICWP_WPSF_FeatureHandler_Insights $oFO */
|
10 |
-
$oFO = $this->getMod();
|
11 |
-
}
|
12 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
|
5 |
+
class ICWP_WPSF_Processor_Insights extends Modules\BaseShield\ShieldProcessor {
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
}
|
src/processors/ips.php
CHANGED
@@ -1,27 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases
|
4 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Modules\
|
|
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
-
class ICWP_WPSF_Processor_Ips extends
|
8 |
-
|
9 |
-
/* Unused */
|
10 |
-
const LIST_MANUAL_WHITE = 'MW';
|
11 |
-
const LIST_MANUAL_BLACK = 'MB';
|
12 |
-
const LIST_AUTO_BLACK = 'AB';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @var bool
|
16 |
-
*/
|
17 |
-
protected $bVisitorIsWhitelisted;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @param \ICWP_WPSF_FeatureHandler_Ips $oModCon
|
21 |
-
*/
|
22 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Ips $oModCon ) {
|
23 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'ip_lists_table_name' ) );
|
24 |
-
}
|
25 |
|
26 |
/**
|
27 |
*/
|
@@ -33,54 +17,58 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
33 |
$this->processAutoUnblockByFlag();
|
34 |
$this->processBlacklist();
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
add_action( 'shield_security_offense', [ $this, 'processCustomShieldOffense' ], 10, 3 );
|
42 |
}
|
43 |
}
|
44 |
|
45 |
public function onWpInit() {
|
46 |
parent::onWpInit();
|
47 |
-
/** @var ICWP_WPSF_FeatureHandler_Ips $
|
48 |
-
$
|
|
|
|
|
49 |
|
50 |
-
if ( $this->isReadyToRun() && $
|
|
|
51 |
|
52 |
-
if ( !$
|
53 |
-
if ( $
|
54 |
-
( new BotTrack\TrackXmlRpc() )
|
55 |
-
->setMod( $
|
56 |
->run();
|
57 |
}
|
58 |
-
if ( $
|
59 |
-
( new BotTrack\Track404() )
|
60 |
-
->setMod( $
|
61 |
->run();
|
62 |
}
|
63 |
-
if ( $
|
64 |
-
( new BotTrack\TrackLoginFailed() )
|
65 |
-
->setMod( $
|
66 |
->run();
|
67 |
}
|
68 |
-
if ( $
|
69 |
-
( new BotTrack\TrackLoginInvalid() )
|
70 |
-
->setMod( $
|
71 |
->run();
|
72 |
}
|
73 |
-
if ( $
|
74 |
-
( new BotTrack\TrackFakeWebCrawler() )
|
75 |
-
->setMod( $
|
76 |
->run();
|
77 |
}
|
78 |
}
|
79 |
|
80 |
/** Always run link cheese regardless of the verified bot or not */
|
81 |
-
if ( $
|
82 |
-
( new BotTrack\TrackLinkCheese() )
|
83 |
-
->setMod( $
|
84 |
->run();
|
85 |
}
|
86 |
}
|
@@ -111,15 +99,6 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
111 |
}
|
112 |
}
|
113 |
|
114 |
-
/**
|
115 |
-
* @param array $aNoticeAttributes
|
116 |
-
* @throws \Exception
|
117 |
-
* @deprecated
|
118 |
-
*/
|
119 |
-
public function addNotice_visitor_whitelisted() {
|
120 |
-
return;
|
121 |
-
}
|
122 |
-
|
123 |
/**
|
124 |
* @param array $aMessages
|
125 |
* @return array
|
@@ -147,12 +126,12 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
147 |
* @return string
|
148 |
*/
|
149 |
public function getRemainingTransgressions( $sIp = '' ) {
|
150 |
-
/** @var \
|
151 |
-
$
|
152 |
if ( empty( $sIp ) ) {
|
153 |
$sIp = Services::IP()->getRequestIp();
|
154 |
}
|
155 |
-
return $
|
156 |
}
|
157 |
|
158 |
/**
|
@@ -162,7 +141,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
162 |
*/
|
163 |
private function getTransgressions( $sIp ) {
|
164 |
$oBlackIp = $this->getBlackListIp( $sIp );
|
165 |
-
return ( $oBlackIp instanceof IPs\EntryVO ) ? $oBlackIp->getTransgressions() : 0;
|
166 |
}
|
167 |
|
168 |
private function processAutoUnblockByFlag() {
|
@@ -178,13 +157,15 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
178 |
return;
|
179 |
}
|
180 |
|
181 |
-
$sIp =
|
182 |
$bKill = false;
|
183 |
|
184 |
// TODO: *Maybe* Have a manual black list process first.
|
185 |
|
186 |
// now try auto black list
|
187 |
-
|
|
|
|
|
188 |
$bKill = $this->isIpToBeBlocked( $sIp );
|
189 |
}
|
190 |
|
@@ -192,7 +173,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
192 |
$this->getCon()->fireEvent( 'conn_kill' );
|
193 |
$this->setIfLogRequest( false ); // don't log traffic from killed requests
|
194 |
|
195 |
-
/** @var IPs\Update $oUp */
|
196 |
$oUp = $this->getMod()
|
197 |
->getDbHandler()
|
198 |
->getQueryUpdater();
|
@@ -215,9 +196,11 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
215 |
private function processAutoUnblockRequest() {
|
216 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
217 |
$oMod = $this->getMod();
|
|
|
|
|
218 |
$oReq = Services::Request();
|
219 |
|
220 |
-
if ( $
|
221 |
&& $oReq->request( 'action' ) == $oMod->prefix() && $oReq->request( 'exec' ) == 'uau' ) {
|
222 |
|
223 |
if ( check_admin_referer( $oReq->request( 'exec' ), 'exec_nonce' ) !== 1 ) {
|
@@ -238,12 +221,12 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
238 |
throw new \Exception( 'GASP failed' );
|
239 |
}
|
240 |
|
241 |
-
if ( !$
|
242 |
throw new \Exception( 'IP already processed in the last 24hrs' );
|
243 |
}
|
244 |
$oMod->updateIpRequestAutoUnblockTs( $sIp );
|
245 |
|
246 |
-
/** @var IPs\Delete $oDel */
|
247 |
$oDel = $oMod->getDbHandler()->getQueryDeleter();
|
248 |
$oDel->deleteIpFromBlacklists( $sIp );
|
249 |
Services::Response()->redirectToHome();
|
@@ -253,15 +236,17 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
253 |
}
|
254 |
|
255 |
private function renderKillPage() {
|
256 |
-
/** @var \ICWP_WPSF_FeatureHandler_Ips $
|
257 |
-
$
|
|
|
|
|
258 |
$oCon = $this->getCon();
|
259 |
$oLoginMod = $oCon->getModule_LoginGuard();
|
260 |
|
261 |
$sUniqId = 'uau'.uniqid();
|
262 |
|
263 |
$sIp = Services::IP()->getRequestIp();
|
264 |
-
$nTimeRemaining = max( floor( $
|
265 |
$aData = [
|
266 |
'strings' => [
|
267 |
'title' => sprintf( __( "You've been blocked by the %s plugin", 'wp-simple-firewall' ),
|
@@ -274,7 +259,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
274 |
sprintf( __( 'Time remaining on black list: %s', 'wp-simple-firewall' ),
|
275 |
sprintf( _n( '%s minute', '%s minutes', $nTimeRemaining, 'wp-simple-firewall' ), $nTimeRemaining )
|
276 |
),
|
277 |
-
sprintf( __( 'You tripped the security plugin defenses a total of %s times making you a suspect.', 'wp-simple-firewall' ), $
|
278 |
sprintf( __( 'If you believe this to be in error, please contact the site owner and quote your IP address below.', 'wp-simple-firewall' ) ),
|
279 |
],
|
280 |
'your_ip' => 'Your IP address',
|
@@ -285,9 +270,9 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
285 |
],
|
286 |
],
|
287 |
'vars' => [
|
288 |
-
'nonce' => $
|
289 |
'ip' => $sIp,
|
290 |
-
'gasp_element' => $
|
291 |
'snippets/gasp_js.php',
|
292 |
[
|
293 |
'sCbName' => $oLoginMod->getGaspKey(),
|
@@ -303,13 +288,13 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
303 |
),
|
304 |
],
|
305 |
'flags' => [
|
306 |
-
'is_autorecover' => $
|
307 |
-
'is_uau_permitted' => $
|
308 |
],
|
309 |
];
|
310 |
Services::WpGeneral()
|
311 |
->wpDie(
|
312 |
-
$
|
313 |
);
|
314 |
}
|
315 |
|
@@ -318,8 +303,10 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
318 |
public function doBlackMarkCurrentVisitor() {
|
319 |
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
320 |
$oMod = $this->getMod();
|
|
|
|
|
321 |
|
322 |
-
if ( $
|
323 |
&& $oMod->getIfIpTransgressed() && !$oMod->isVerifiedBot() && !$oMod->isVisitorWhitelisted() ) {
|
324 |
$this->processTransgression();
|
325 |
}
|
@@ -331,16 +318,22 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
331 |
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
332 |
$oMod = $this->getMod();
|
333 |
$oCon = $this->getCon();
|
|
|
|
|
334 |
|
335 |
$sIp = Services::IP()->getRequestIp();
|
336 |
|
337 |
$oBlackIp = $this->getAutoBlackListIp( $sIp );
|
338 |
-
if ( !$oBlackIp instanceof IPs\EntryVO ) {
|
339 |
-
$oBlackIp = $this->addIpToList(
|
|
|
|
|
|
|
|
|
340 |
}
|
341 |
|
342 |
-
if ( $oBlackIp instanceof IPs\EntryVO ) {
|
343 |
-
$nLimit = $
|
344 |
$nCurrentTrans = $oBlackIp->transgressions;
|
345 |
|
346 |
if ( $nCurrentTrans < $nLimit ) {
|
@@ -350,7 +343,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
350 |
$nToIncrement = $bBlock ? ( $nLimit - $nCurrentTrans ) : $mAction;
|
351 |
$nNewOffenses = min( $nLimit, $oBlackIp->transgressions + $nToIncrement );
|
352 |
|
353 |
-
/** @var IPs\Update $oUp */
|
354 |
$oUp = $oMod->getDbHandler()->getQueryUpdater();
|
355 |
$oUp->updateTransgressions( $oBlackIp, $nNewOffenses );
|
356 |
|
@@ -376,24 +369,12 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
-
*
|
380 |
-
* @return bool
|
381 |
-
* @deprecated 7.5
|
382 |
-
*/
|
383 |
-
public function isCurrentIpWhitelisted() {
|
384 |
-
if ( !isset( $this->bVisitorIsWhitelisted ) ) {
|
385 |
-
$this->bVisitorIsWhitelisted = $this->isIpOnWhiteList( $this->ip() );
|
386 |
-
}
|
387 |
-
return $this->bVisitorIsWhitelisted;
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* @return IPs\EntryVO[]
|
392 |
*/
|
393 |
public function getWhitelistIpsData() {
|
394 |
-
/** @var IPs\Select $oSelect */
|
395 |
-
$oSelect = $this->getDbHandler()->getQuerySelector();
|
396 |
-
return $oSelect->allFromList( ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE );
|
397 |
}
|
398 |
|
399 |
/**
|
@@ -407,14 +388,6 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
407 |
return $aIps;
|
408 |
}
|
409 |
|
410 |
-
/**
|
411 |
-
* @param string $sIp
|
412 |
-
* @return bool
|
413 |
-
*/
|
414 |
-
public function isIpOnManualBlackList( $sIp ) {
|
415 |
-
return $this->isIpOnList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK );
|
416 |
-
}
|
417 |
-
|
418 |
/**
|
419 |
* @param string $sIp
|
420 |
* @return bool
|
@@ -428,10 +401,10 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
428 |
* @return bool
|
429 |
*/
|
430 |
public function isIpToBeBlocked( $sIp ) {
|
431 |
-
/** @var
|
432 |
-
$
|
433 |
$oIp = $this->getBlackListIp( $sIp );
|
434 |
-
return ( $oIp instanceof IPs\EntryVO && $oIp->getTransgressions() >= $
|
435 |
}
|
436 |
|
437 |
/**
|
@@ -442,8 +415,8 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
442 |
private function isIpOnList( $sIp, $sList ) {
|
443 |
$bOnList = false;
|
444 |
|
445 |
-
/** @var IPs\Select $oSelect */
|
446 |
-
$oSelect = $this->getDbHandler()->getQuerySelector();
|
447 |
foreach ( $oSelect->allFromList( $sList ) as $oIp ) {
|
448 |
try {
|
449 |
if ( Services::IP()->checkIp( $sIp, $oIp->ip ) ) {
|
@@ -461,7 +434,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
461 |
/**
|
462 |
* @param string $sIp
|
463 |
* @param string $sLabel
|
464 |
-
* @return IPs\EntryVO|null
|
465 |
*/
|
466 |
public function addIpToWhiteList( $sIp, $sLabel = '' ) {
|
467 |
return $this->addIpToManualList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE, $sLabel );
|
@@ -470,7 +443,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
470 |
/**
|
471 |
* @param string $sIp
|
472 |
* @param string $sLabel
|
473 |
-
* @return IPs\EntryVO|null
|
474 |
*/
|
475 |
public function addIpToBlackList( $sIp, $sLabel = '' ) {
|
476 |
return $this->addIpToManualList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK, $sLabel );
|
@@ -480,14 +453,14 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
480 |
* @param string $sIp
|
481 |
* @param string $sList
|
482 |
* @param string $sLabel
|
483 |
-
* @return IPs\EntryVO|null
|
484 |
*/
|
485 |
private function addIpToManualList( $sIp, $sList, $sLabel = '' ) {
|
486 |
-
$oDbh = $this->getDbHandler();
|
487 |
|
488 |
-
/** @var IPs\Select $oSelect */
|
489 |
$oSelect = $oDbh->getQuerySelector();
|
490 |
-
/** @var IPs\EntryVO $oIp */
|
491 |
$oIp = $oSelect->filterByIp( $sIp )
|
492 |
->filterByList( $sList )
|
493 |
->first();
|
@@ -496,7 +469,7 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
496 |
$oIp = $this->addIpToList( $sIp, $sList, $sLabel );
|
497 |
}
|
498 |
else if ( $sLabel != $oIp->getLabel() ) {
|
499 |
-
/** @var IPs\Update $oUp */
|
500 |
$oUp = $oDbh->getQueryUpdater();
|
501 |
$oUp->updateLabel( $oIp, $sLabel );
|
502 |
}
|
@@ -508,33 +481,32 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
508 |
* @param string $sIp
|
509 |
* @param string $sList
|
510 |
* @param string $sLabel
|
511 |
-
* @return IPs\EntryVO|null
|
512 |
*/
|
513 |
private function addIpToList( $sIp, $sList, $sLabel = '' ) {
|
514 |
$oIp = null;
|
515 |
|
516 |
-
/** @var ICWP_WPSF_FeatureHandler_Ips $
|
517 |
-
$
|
518 |
|
519 |
// Never add a reserved IP to any black list
|
520 |
-
if ( $sList ==
|
521 |
-
$oDbh = $
|
522 |
|
523 |
// delete any previous old entries as we go.
|
524 |
-
/** @var IPs\Delete $oDel */
|
525 |
$oDel = $oDbh->getQueryDeleter();
|
526 |
$oDel->deleteIpOnList( $sIp, $sList );
|
527 |
|
528 |
-
/** @var IPs\EntryVO $oTempIp */
|
529 |
$oTempIp = $oDbh->getVo();
|
530 |
$oTempIp->ip = $sIp;
|
531 |
$oTempIp->list = $sList;
|
532 |
$oTempIp->label = empty( $sLabel ) ? __( 'No Label', 'wp-simple-firewall' ) : trim( $sLabel );
|
533 |
|
534 |
if ( $oDbh->getQueryInserter()->insert( $oTempIp ) ) {
|
535 |
-
/** @var IPs\EntryVO $oIp */
|
536 |
-
$oIp = $
|
537 |
-
->getQuerySelector()
|
538 |
->setWheresFromVo( $oTempIp )
|
539 |
->first();
|
540 |
}
|
@@ -546,20 +518,22 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
546 |
/**
|
547 |
* The auto black list isn't a simple lookup, but rather has an auto expiration
|
548 |
* @param string $sIp
|
549 |
-
* @return IPs\EntryVO|null
|
550 |
*/
|
551 |
protected function getBlackListIp( $sIp ) {
|
552 |
-
/** @var ICWP_WPSF_FeatureHandler_Ips $
|
553 |
-
$
|
554 |
-
/** @var IPs\
|
555 |
-
$
|
556 |
-
/** @var IPs\
|
|
|
|
|
557 |
$oIp = $oSelect->filterByIp( $sIp )
|
558 |
->filterByLists( [
|
559 |
-
|
560 |
-
|
561 |
] )
|
562 |
-
->filterByLastAccessAfter( Services::Request()->ts() - $
|
563 |
->first();
|
564 |
return $oIp;
|
565 |
}
|
@@ -567,94 +541,20 @@ class ICWP_WPSF_Processor_Ips extends ICWP_WPSF_BaseDbProcessor {
|
|
567 |
/**
|
568 |
* The auto black list isn't a simple lookup, but rather has an auto expiration
|
569 |
* @param string $sIp
|
570 |
-
* @return IPs\EntryVO|null
|
571 |
*/
|
572 |
protected function getAutoBlackListIp( $sIp ) {
|
573 |
-
/** @var ICWP_WPSF_FeatureHandler_Ips $
|
574 |
-
$
|
575 |
-
/** @var IPs\
|
576 |
-
$
|
577 |
-
/** @var IPs\
|
578 |
-
$
|
579 |
-
|
580 |
-
->filterByLastAccessAfter( Services::Request()->ts() - $oFO->getAutoExpireTime() )
|
581 |
-
->first();
|
582 |
-
return $oIp;
|
583 |
-
}
|
584 |
-
|
585 |
-
/**
|
586 |
-
* The auto black list isn't a simple lookup, but rather has an auto expiration
|
587 |
-
* @param string $sIp
|
588 |
-
* @return IPs\EntryVO|null
|
589 |
-
*/
|
590 |
-
protected function getManualBlackListIp( $sIp ) {
|
591 |
-
/** @var ICWP_WPSF_FeatureHandler_Ips $oFO */
|
592 |
-
$oFO = $this->getMod();
|
593 |
-
/** @var IPs\Select $oSelect */
|
594 |
-
$oSelect = $this->getDbHandler()->getQuerySelector();
|
595 |
-
/** @var IPs\EntryVO $oIp */
|
596 |
$oIp = $oSelect->filterByIp( $sIp )
|
597 |
-
->filterByList(
|
598 |
-
->filterByLastAccessAfter( Services::Request()->ts() - $
|
599 |
->first();
|
600 |
return $oIp;
|
601 |
}
|
602 |
-
|
603 |
-
/**
|
604 |
-
* @return string
|
605 |
-
*/
|
606 |
-
public function getCreateTableSql() {
|
607 |
-
return "CREATE TABLE %s (
|
608 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
609 |
-
ip varchar(40) NOT NULL DEFAULT '',
|
610 |
-
label varchar(255) NOT NULL DEFAULT '',
|
611 |
-
list varchar(4) NOT NULL DEFAULT '',
|
612 |
-
ip6 tinyint(1) NOT NULL DEFAULT 0,
|
613 |
-
is_range tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
|
614 |
-
transgressions tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
|
615 |
-
last_access_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
616 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
617 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
618 |
-
PRIMARY KEY (id)
|
619 |
-
) %s;";
|
620 |
-
}
|
621 |
-
|
622 |
-
/**
|
623 |
-
* @return array
|
624 |
-
*/
|
625 |
-
protected function getTableColumnsByDefinition() {
|
626 |
-
$aDef = $this->getMod()->getDef( 'ip_list_table_columns' );
|
627 |
-
return is_array( $aDef ) ? $aDef : [];
|
628 |
-
}
|
629 |
-
|
630 |
-
/**
|
631 |
-
* @return IPs\Handler
|
632 |
-
*/
|
633 |
-
protected function createDbHandler() {
|
634 |
-
return new IPs\Handler();
|
635 |
-
}
|
636 |
-
|
637 |
-
/**
|
638 |
-
* @return int
|
639 |
-
*/
|
640 |
-
protected function getAutoExpirePeriod() {
|
641 |
-
/** @var \ICWP_WPSF_FeatureHandler_Ips $oFO */
|
642 |
-
$oFO = $this->getMod();
|
643 |
-
return $oFO->getAutoExpireTime();
|
644 |
-
}
|
645 |
-
|
646 |
-
/**
|
647 |
-
* We only clean-up expired black list IPs
|
648 |
-
* @return bool
|
649 |
-
*/
|
650 |
-
public function cleanupDatabase() {
|
651 |
-
if ( $this->getDbHandler()->isTable() ) {
|
652 |
-
/** @var IPs\Delete $oDel */
|
653 |
-
$oDel = $this->getDbHandler()->getQueryDeleter();
|
654 |
-
$oDel->filterByLists( [ self::LIST_AUTO_BLACK, self::LIST_MANUAL_BLACK ] )
|
655 |
-
->filterByLastAccessBefore( Services::Request()->ts() - $this->getAutoExpirePeriod() )
|
656 |
-
->query();
|
657 |
-
}
|
658 |
-
return true;
|
659 |
-
}
|
660 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Databases;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\IPs;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
+
class ICWP_WPSF_Processor_Ips extends ShieldProcessor {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
/**
|
11 |
*/
|
17 |
$this->processAutoUnblockByFlag();
|
18 |
$this->processBlacklist();
|
19 |
|
20 |
+
$oCon = $this->getCon();
|
21 |
+
/** @var IPs\Options $oOpts */
|
22 |
+
$oOpts = $this->getMod()->getOptions();
|
23 |
+
if ( $oOpts->isEnabledAutoBlackList() ) {
|
24 |
+
add_filter( $oCon->prefix( 'firewall_die_message' ), [ $this, 'fAugmentFirewallDieMessage' ] );
|
25 |
+
add_action( $oCon->prefix( 'pre_plugin_shutdown' ), [ $this, 'doBlackMarkCurrentVisitor' ] );
|
26 |
add_action( 'shield_security_offense', [ $this, 'processCustomShieldOffense' ], 10, 3 );
|
27 |
}
|
28 |
}
|
29 |
|
30 |
public function onWpInit() {
|
31 |
parent::onWpInit();
|
32 |
+
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
33 |
+
$oMod = $this->getMod();
|
34 |
+
/** @var IPs\Options $oOpts */
|
35 |
+
$oOpts = $oMod->getOptions();
|
36 |
|
37 |
+
if ( $this->isReadyToRun() && $oOpts->isEnabledAutoBlackList()
|
38 |
+
&& !Services::WpUsers()->isUserLoggedIn() ) {
|
39 |
|
40 |
+
if ( !$oMod->isVerifiedBot() ) {
|
41 |
+
if ( $oOpts->isEnabledTrackXmlRpc() ) {
|
42 |
+
( new IPs\BotTrack\TrackXmlRpc() )
|
43 |
+
->setMod( $oMod )
|
44 |
->run();
|
45 |
}
|
46 |
+
if ( $oOpts->isEnabledTrack404() ) {
|
47 |
+
( new IPs\BotTrack\Track404() )
|
48 |
+
->setMod( $oMod )
|
49 |
->run();
|
50 |
}
|
51 |
+
if ( $oOpts->isEnabledTrackLoginFailed() ) {
|
52 |
+
( new IPs\BotTrack\TrackLoginFailed() )
|
53 |
+
->setMod( $oMod )
|
54 |
->run();
|
55 |
}
|
56 |
+
if ( $oOpts->isEnabledTrackLoginInvalid() ) {
|
57 |
+
( new IPs\BotTrack\TrackLoginInvalid() )
|
58 |
+
->setMod( $oMod )
|
59 |
->run();
|
60 |
}
|
61 |
+
if ( $oOpts->isEnabledTrackFakeWebCrawler() ) {
|
62 |
+
( new IPs\BotTrack\TrackFakeWebCrawler() )
|
63 |
+
->setMod( $oMod )
|
64 |
->run();
|
65 |
}
|
66 |
}
|
67 |
|
68 |
/** Always run link cheese regardless of the verified bot or not */
|
69 |
+
if ( $oOpts->isEnabledTrackLinkCheese() ) {
|
70 |
+
( new IPs\BotTrack\TrackLinkCheese() )
|
71 |
+
->setMod( $oMod )
|
72 |
->run();
|
73 |
}
|
74 |
}
|
99 |
}
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* @param array $aMessages
|
104 |
* @return array
|
126 |
* @return string
|
127 |
*/
|
128 |
public function getRemainingTransgressions( $sIp = '' ) {
|
129 |
+
/** @var IPs\Options $oOpts */
|
130 |
+
$oOpts = $this->getMod()->getOptions();
|
131 |
if ( empty( $sIp ) ) {
|
132 |
$sIp = Services::IP()->getRequestIp();
|
133 |
}
|
134 |
+
return $oOpts->getOffenseLimit() - $this->getTransgressions( $sIp );
|
135 |
}
|
136 |
|
137 |
/**
|
141 |
*/
|
142 |
private function getTransgressions( $sIp ) {
|
143 |
$oBlackIp = $this->getBlackListIp( $sIp );
|
144 |
+
return ( $oBlackIp instanceof Databases\IPs\EntryVO ) ? $oBlackIp->getTransgressions() : 0;
|
145 |
}
|
146 |
|
147 |
private function processAutoUnblockByFlag() {
|
157 |
return;
|
158 |
}
|
159 |
|
160 |
+
$sIp = Services::IP()->getRequestIp();
|
161 |
$bKill = false;
|
162 |
|
163 |
// TODO: *Maybe* Have a manual black list process first.
|
164 |
|
165 |
// now try auto black list
|
166 |
+
/** @var IPs\Options $oOpts */
|
167 |
+
$oOpts = $oMod->getOptions();
|
168 |
+
if ( !$bKill && $oOpts->isEnabledAutoBlackList() ) {
|
169 |
$bKill = $this->isIpToBeBlocked( $sIp );
|
170 |
}
|
171 |
|
173 |
$this->getCon()->fireEvent( 'conn_kill' );
|
174 |
$this->setIfLogRequest( false ); // don't log traffic from killed requests
|
175 |
|
176 |
+
/** @var Databases\IPs\Update $oUp */
|
177 |
$oUp = $this->getMod()
|
178 |
->getDbHandler()
|
179 |
->getQueryUpdater();
|
196 |
private function processAutoUnblockRequest() {
|
197 |
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
198 |
$oMod = $this->getMod();
|
199 |
+
/** @var IPs\Options $oOpts */
|
200 |
+
$oOpts = $oMod->getOptions();
|
201 |
$oReq = Services::Request();
|
202 |
|
203 |
+
if ( $oOpts->isEnabledAutoUserRecover() && $oReq->isPost()
|
204 |
&& $oReq->request( 'action' ) == $oMod->prefix() && $oReq->request( 'exec' ) == 'uau' ) {
|
205 |
|
206 |
if ( check_admin_referer( $oReq->request( 'exec' ), 'exec_nonce' ) !== 1 ) {
|
221 |
throw new \Exception( 'GASP failed' );
|
222 |
}
|
223 |
|
224 |
+
if ( !$oOpts->getCanIpRequestAutoUnblock( $sIp ) ) {
|
225 |
throw new \Exception( 'IP already processed in the last 24hrs' );
|
226 |
}
|
227 |
$oMod->updateIpRequestAutoUnblockTs( $sIp );
|
228 |
|
229 |
+
/** @var Databases\IPs\Delete $oDel */
|
230 |
$oDel = $oMod->getDbHandler()->getQueryDeleter();
|
231 |
$oDel->deleteIpFromBlacklists( $sIp );
|
232 |
Services::Response()->redirectToHome();
|
236 |
}
|
237 |
|
238 |
private function renderKillPage() {
|
239 |
+
/** @var \ICWP_WPSF_FeatureHandler_Ips $oMod */
|
240 |
+
$oMod = $this->getMod();
|
241 |
+
/** @var IPs\Options $oOpts */
|
242 |
+
$oOpts = $oMod->getOptions();
|
243 |
$oCon = $this->getCon();
|
244 |
$oLoginMod = $oCon->getModule_LoginGuard();
|
245 |
|
246 |
$sUniqId = 'uau'.uniqid();
|
247 |
|
248 |
$sIp = Services::IP()->getRequestIp();
|
249 |
+
$nTimeRemaining = max( floor( $oOpts->getAutoExpireTime()/60 ), 0 );
|
250 |
$aData = [
|
251 |
'strings' => [
|
252 |
'title' => sprintf( __( "You've been blocked by the %s plugin", 'wp-simple-firewall' ),
|
259 |
sprintf( __( 'Time remaining on black list: %s', 'wp-simple-firewall' ),
|
260 |
sprintf( _n( '%s minute', '%s minutes', $nTimeRemaining, 'wp-simple-firewall' ), $nTimeRemaining )
|
261 |
),
|
262 |
+
sprintf( __( 'You tripped the security plugin defenses a total of %s times making you a suspect.', 'wp-simple-firewall' ), $oOpts->getOffenseLimit() ),
|
263 |
sprintf( __( 'If you believe this to be in error, please contact the site owner and quote your IP address below.', 'wp-simple-firewall' ) ),
|
264 |
],
|
265 |
'your_ip' => 'Your IP address',
|
270 |
],
|
271 |
],
|
272 |
'vars' => [
|
273 |
+
'nonce' => $oMod->getNonceActionData( 'uau' ),
|
274 |
'ip' => $sIp,
|
275 |
+
'gasp_element' => $oMod->renderTemplate(
|
276 |
'snippets/gasp_js.php',
|
277 |
[
|
278 |
'sCbName' => $oLoginMod->getGaspKey(),
|
288 |
),
|
289 |
],
|
290 |
'flags' => [
|
291 |
+
'is_autorecover' => $oOpts->isEnabledAutoUserRecover(),
|
292 |
+
'is_uau_permitted' => $oOpts->getCanIpRequestAutoUnblock( $sIp ),
|
293 |
],
|
294 |
];
|
295 |
Services::WpGeneral()
|
296 |
->wpDie(
|
297 |
+
$oMod->renderTemplate( '/snippets/blacklist_die.twig', $aData, true )
|
298 |
);
|
299 |
}
|
300 |
|
303 |
public function doBlackMarkCurrentVisitor() {
|
304 |
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
305 |
$oMod = $this->getMod();
|
306 |
+
/** @var IPs\Options $oOpts */
|
307 |
+
$oOpts = $oMod->getOptions();
|
308 |
|
309 |
+
if ( $oOpts->isEnabledAutoBlackList() && !$this->getCon()->isPluginDeleting()
|
310 |
&& $oMod->getIfIpTransgressed() && !$oMod->isVerifiedBot() && !$oMod->isVisitorWhitelisted() ) {
|
311 |
$this->processTransgression();
|
312 |
}
|
318 |
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
319 |
$oMod = $this->getMod();
|
320 |
$oCon = $this->getCon();
|
321 |
+
/** @var IPs\Options $oOpts */
|
322 |
+
$oOpts = $oMod->getOptions();
|
323 |
|
324 |
$sIp = Services::IP()->getRequestIp();
|
325 |
|
326 |
$oBlackIp = $this->getAutoBlackListIp( $sIp );
|
327 |
+
if ( !$oBlackIp instanceof Databases\IPs\EntryVO ) {
|
328 |
+
$oBlackIp = $this->addIpToList(
|
329 |
+
Services::IP()->getRequestIp(),
|
330 |
+
ICWP_WPSF_FeatureHandler_Ips::LIST_AUTO_BLACK,
|
331 |
+
'auto'
|
332 |
+
);
|
333 |
}
|
334 |
|
335 |
+
if ( $oBlackIp instanceof Databases\IPs\EntryVO ) {
|
336 |
+
$nLimit = $oOpts->getOffenseLimit();
|
337 |
$nCurrentTrans = $oBlackIp->transgressions;
|
338 |
|
339 |
if ( $nCurrentTrans < $nLimit ) {
|
343 |
$nToIncrement = $bBlock ? ( $nLimit - $nCurrentTrans ) : $mAction;
|
344 |
$nNewOffenses = min( $nLimit, $oBlackIp->transgressions + $nToIncrement );
|
345 |
|
346 |
+
/** @var Databases\IPs\Update $oUp */
|
347 |
$oUp = $oMod->getDbHandler()->getQueryUpdater();
|
348 |
$oUp->updateTransgressions( $oBlackIp, $nNewOffenses );
|
349 |
|
369 |
}
|
370 |
|
371 |
/**
|
372 |
+
* @return Databases\IPs\EntryVO[]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
*/
|
374 |
public function getWhitelistIpsData() {
|
375 |
+
/** @var Databases\IPs\Select $oSelect */
|
376 |
+
$oSelect = $this->getMod()->getDbHandler()->getQuerySelector();
|
377 |
+
return $oSelect->allFromList( \ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE );
|
378 |
}
|
379 |
|
380 |
/**
|
388 |
return $aIps;
|
389 |
}
|
390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
/**
|
392 |
* @param string $sIp
|
393 |
* @return bool
|
401 |
* @return bool
|
402 |
*/
|
403 |
public function isIpToBeBlocked( $sIp ) {
|
404 |
+
/** @var IPs\Options $oOpts */
|
405 |
+
$oOpts = $this->getMod()->getOptions();
|
406 |
$oIp = $this->getBlackListIp( $sIp );
|
407 |
+
return ( $oIp instanceof Databases\IPs\EntryVO && $oIp->getTransgressions() >= $oOpts->getOffenseLimit() );
|
408 |
}
|
409 |
|
410 |
/**
|
415 |
private function isIpOnList( $sIp, $sList ) {
|
416 |
$bOnList = false;
|
417 |
|
418 |
+
/** @var Databases\IPs\Select $oSelect */
|
419 |
+
$oSelect = $this->getMod()->getDbHandler()->getQuerySelector();
|
420 |
foreach ( $oSelect->allFromList( $sList ) as $oIp ) {
|
421 |
try {
|
422 |
if ( Services::IP()->checkIp( $sIp, $oIp->ip ) ) {
|
434 |
/**
|
435 |
* @param string $sIp
|
436 |
* @param string $sLabel
|
437 |
+
* @return Databases\IPs\EntryVO|null
|
438 |
*/
|
439 |
public function addIpToWhiteList( $sIp, $sLabel = '' ) {
|
440 |
return $this->addIpToManualList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_WHITE, $sLabel );
|
443 |
/**
|
444 |
* @param string $sIp
|
445 |
* @param string $sLabel
|
446 |
+
* @return Databases\IPs\EntryVO|null
|
447 |
*/
|
448 |
public function addIpToBlackList( $sIp, $sLabel = '' ) {
|
449 |
return $this->addIpToManualList( $sIp, ICWP_WPSF_FeatureHandler_Ips::LIST_MANUAL_BLACK, $sLabel );
|
453 |
* @param string $sIp
|
454 |
* @param string $sList
|
455 |
* @param string $sLabel
|
456 |
+
* @return Databases\IPs\EntryVO|null
|
457 |
*/
|
458 |
private function addIpToManualList( $sIp, $sList, $sLabel = '' ) {
|
459 |
+
$oDbh = $this->getMod()->getDbHandler();
|
460 |
|
461 |
+
/** @var Databases\IPs\Select $oSelect */
|
462 |
$oSelect = $oDbh->getQuerySelector();
|
463 |
+
/** @var Databases\IPs\EntryVO $oIp */
|
464 |
$oIp = $oSelect->filterByIp( $sIp )
|
465 |
->filterByList( $sList )
|
466 |
->first();
|
469 |
$oIp = $this->addIpToList( $sIp, $sList, $sLabel );
|
470 |
}
|
471 |
else if ( $sLabel != $oIp->getLabel() ) {
|
472 |
+
/** @var Databases\IPs\Update $oUp */
|
473 |
$oUp = $oDbh->getQueryUpdater();
|
474 |
$oUp->updateLabel( $oIp, $sLabel );
|
475 |
}
|
481 |
* @param string $sIp
|
482 |
* @param string $sList
|
483 |
* @param string $sLabel
|
484 |
+
* @return Databases\IPs\EntryVO|null
|
485 |
*/
|
486 |
private function addIpToList( $sIp, $sList, $sLabel = '' ) {
|
487 |
$oIp = null;
|
488 |
|
489 |
+
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
490 |
+
$oMod = $this->getMod();
|
491 |
|
492 |
// Never add a reserved IP to any black list
|
493 |
+
if ( $sList == $oMod::LIST_MANUAL_WHITE || !in_array( $sIp, $oMod->getReservedIps() ) ) {
|
494 |
+
$oDbh = $oMod->getDbHandler();
|
495 |
|
496 |
// delete any previous old entries as we go.
|
497 |
+
/** @var Databases\IPs\Delete $oDel */
|
498 |
$oDel = $oDbh->getQueryDeleter();
|
499 |
$oDel->deleteIpOnList( $sIp, $sList );
|
500 |
|
501 |
+
/** @var Databases\IPs\EntryVO $oTempIp */
|
502 |
$oTempIp = $oDbh->getVo();
|
503 |
$oTempIp->ip = $sIp;
|
504 |
$oTempIp->list = $sList;
|
505 |
$oTempIp->label = empty( $sLabel ) ? __( 'No Label', 'wp-simple-firewall' ) : trim( $sLabel );
|
506 |
|
507 |
if ( $oDbh->getQueryInserter()->insert( $oTempIp ) ) {
|
508 |
+
/** @var Databases\IPs\EntryVO $oIp */
|
509 |
+
$oIp = $oDbh->getQuerySelector()
|
|
|
510 |
->setWheresFromVo( $oTempIp )
|
511 |
->first();
|
512 |
}
|
518 |
/**
|
519 |
* The auto black list isn't a simple lookup, but rather has an auto expiration
|
520 |
* @param string $sIp
|
521 |
+
* @return Databases\IPs\EntryVO|null
|
522 |
*/
|
523 |
protected function getBlackListIp( $sIp ) {
|
524 |
+
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
525 |
+
$oMod = $this->getMod();
|
526 |
+
/** @var IPs\Options $oOpts */
|
527 |
+
$oOpts = $oMod->getOptions();
|
528 |
+
/** @var Databases\IPs\Select $oSelect */
|
529 |
+
$oSelect = $oMod->getDbHandler()->getQuerySelector();
|
530 |
+
/** @var Databases\IPs\EntryVO $oIp */
|
531 |
$oIp = $oSelect->filterByIp( $sIp )
|
532 |
->filterByLists( [
|
533 |
+
$oMod::LIST_AUTO_BLACK,
|
534 |
+
$oMod::LIST_MANUAL_BLACK
|
535 |
] )
|
536 |
+
->filterByLastAccessAfter( Services::Request()->ts() - $oOpts->getAutoExpireTime() )
|
537 |
->first();
|
538 |
return $oIp;
|
539 |
}
|
541 |
/**
|
542 |
* The auto black list isn't a simple lookup, but rather has an auto expiration
|
543 |
* @param string $sIp
|
544 |
+
* @return Databases\IPs\EntryVO|null
|
545 |
*/
|
546 |
protected function getAutoBlackListIp( $sIp ) {
|
547 |
+
/** @var ICWP_WPSF_FeatureHandler_Ips $oMod */
|
548 |
+
$oMod = $this->getMod();
|
549 |
+
/** @var IPs\Options $oOpts */
|
550 |
+
$oOpts = $oMod->getOptions();
|
551 |
+
/** @var Databases\IPs\Select $oSelect */
|
552 |
+
$oSelect = $oMod->getDbHandler()->getQuerySelector();
|
553 |
+
/** @var Databases\IPs\EntryVO $oIp */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
$oIp = $oSelect->filterByIp( $sIp )
|
555 |
+
->filterByList( $oMod::LIST_AUTO_BLACK )
|
556 |
+
->filterByLastAccessAfter( Services::Request()->ts() - $oOpts->getAutoExpireTime() )
|
557 |
->first();
|
558 |
return $oIp;
|
559 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
src/processors/license.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_License extends
|
6 |
|
7 |
/**
|
8 |
*/
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_License extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
src/processors/lockdown.php
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_Lockdown extends
|
6 |
|
7 |
public function run() {
|
8 |
-
/** @var ICWP_WPSF_FeatureHandler_Lockdown $
|
9 |
-
$
|
10 |
|
11 |
-
if ( $
|
12 |
$this->blockFileEditing();
|
13 |
}
|
14 |
|
@@ -18,18 +19,18 @@ class ICWP_WPSF_Processor_Lockdown extends ICWP_WPSF_Processor_BaseWpsf {
|
|
18 |
$wp_version = $sWpVersionMask;
|
19 |
}
|
20 |
|
21 |
-
if ( $
|
22 |
if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
|
23 |
define( 'FORCE_SSL_ADMIN', true );
|
24 |
}
|
25 |
force_ssl_admin( true );
|
26 |
}
|
27 |
|
28 |
-
if ( $
|
29 |
remove_action( 'wp_head', 'wp_generator' );
|
30 |
}
|
31 |
|
32 |
-
if ( $
|
33 |
add_filter( 'xmlrpc_enabled', [ $this, 'disableXmlrpc' ], 1000, 0 );
|
34 |
add_filter( 'xmlrpc_methods', [ $this, 'disableXmlrpc' ], 1000, 0 );
|
35 |
}
|
@@ -107,13 +108,13 @@ class ICWP_WPSF_Processor_Lockdown extends ICWP_WPSF_Processor_BaseWpsf {
|
|
107 |
* @return WP_Error
|
108 |
*/
|
109 |
public function disableAnonymousRestApi( $mStatus ) {
|
110 |
-
/** @var ICWP_WPSF_FeatureHandler_Lockdown $
|
111 |
-
$
|
112 |
$oWpRest = Services::Rest();
|
113 |
|
114 |
$sNamespace = $oWpRest->getNamespace();
|
115 |
if ( !empty( $sNamespace ) && $mStatus !== true && !is_wp_error( $mStatus )
|
116 |
-
&& !$
|
117 |
|
118 |
$mStatus = new \WP_Error(
|
119 |
'shield_block_anon_restapi',
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Lockdown extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
public function run() {
|
9 |
+
/** @var \ICWP_WPSF_FeatureHandler_Lockdown $oMod */
|
10 |
+
$oMod = $this->getMod();
|
11 |
|
12 |
+
if ( $oMod->isOptFileEditingDisabled() ) {
|
13 |
$this->blockFileEditing();
|
14 |
}
|
15 |
|
19 |
$wp_version = $sWpVersionMask;
|
20 |
}
|
21 |
|
22 |
+
if ( $oMod->isOpt( 'force_ssl_admin', 'Y' ) && function_exists( 'force_ssl_admin' ) ) {
|
23 |
if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
|
24 |
define( 'FORCE_SSL_ADMIN', true );
|
25 |
}
|
26 |
force_ssl_admin( true );
|
27 |
}
|
28 |
|
29 |
+
if ( $oMod->isOpt( 'hide_wordpress_generator_tag', 'Y' ) ) {
|
30 |
remove_action( 'wp_head', 'wp_generator' );
|
31 |
}
|
32 |
|
33 |
+
if ( $oMod->isXmlrpcDisabled() ) {
|
34 |
add_filter( 'xmlrpc_enabled', [ $this, 'disableXmlrpc' ], 1000, 0 );
|
35 |
add_filter( 'xmlrpc_methods', [ $this, 'disableXmlrpc' ], 1000, 0 );
|
36 |
}
|
108 |
* @return WP_Error
|
109 |
*/
|
110 |
public function disableAnonymousRestApi( $mStatus ) {
|
111 |
+
/** @var \ICWP_WPSF_FeatureHandler_Lockdown $oMod */
|
112 |
+
$oMod = $this->getMod();
|
113 |
$oWpRest = Services::Rest();
|
114 |
|
115 |
$sNamespace = $oWpRest->getNamespace();
|
116 |
if ( !empty( $sNamespace ) && $mStatus !== true && !is_wp_error( $mStatus )
|
117 |
+
&& !$oMod->isPermittedAnonRestApiNamespace( $sNamespace ) ) {
|
118 |
|
119 |
$mStatus = new \WP_Error(
|
120 |
'shield_block_anon_restapi',
|
src/processors/login_protect.php
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_LoginProtect extends
|
6 |
|
7 |
/**
|
8 |
*/
|
9 |
public function run() {
|
10 |
-
/** @var ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
11 |
$oMod = $this->getMod();
|
12 |
|
13 |
// XML-RPC Compatibility
|
@@ -17,28 +18,28 @@ class ICWP_WPSF_Processor_LoginProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
17 |
|
18 |
// So we can allow access to the login pages if IP is whitelisted
|
19 |
if ( $oMod->isCustomLoginPathEnabled() ) {
|
20 |
-
$this->getSubProRename()->
|
21 |
}
|
22 |
|
23 |
if ( !$oMod->isVisitorWhitelisted() ) {
|
24 |
if ( $oMod->isEnabledGaspCheck() ) {
|
25 |
-
$this->getSubProGasp()->
|
26 |
}
|
27 |
|
28 |
if ( $oMod->isCooldownEnabled() && Services::Request()->isPost() ) {
|
29 |
-
$this->getSubProCooldown()->
|
30 |
}
|
31 |
|
32 |
if ( $oMod->isGoogleRecaptchaEnabled() ) {
|
33 |
-
$this->getSubProRecaptcha()->
|
34 |
}
|
35 |
|
36 |
-
$this->getSubProIntent()->
|
37 |
}
|
38 |
}
|
39 |
|
40 |
public function onWpEnqueueJs() {
|
41 |
-
/** @var ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
42 |
$oMod = $this->getMod();
|
43 |
|
44 |
if ( $oMod->isEnabledBotJs() ) {
|
@@ -106,46 +107,37 @@ class ICWP_WPSF_Processor_LoginProtect extends ICWP_WPSF_Processor_BaseWpsf {
|
|
106 |
}
|
107 |
|
108 |
/**
|
109 |
-
* @return ICWP_WPSF_Processor_LoginProtect_Cooldown
|
110 |
*/
|
111 |
private function getSubProCooldown() {
|
112 |
return $this->getSubPro( 'cooldown' );
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
-
* @return ICWP_WPSF_Processor_LoginProtect_Gasp
|
117 |
*/
|
118 |
private function getSubProGasp() {
|
119 |
return $this->getSubPro( 'gasp' );
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
* @return ICWP_WPSF_Processor_LoginProtect_Intent
|
124 |
*/
|
125 |
public function getSubProIntent() {
|
126 |
return $this->getSubPro( 'intent' );
|
127 |
}
|
128 |
|
129 |
/**
|
130 |
-
* @return ICWP_WPSF_Processor_LoginProtect_GoogleRecaptcha
|
131 |
*/
|
132 |
private function getSubProRecaptcha() {
|
133 |
return $this->getSubPro( 'recaptcha' );
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
-
* @return ICWP_WPSF_Processor_LoginProtect_WpLogin
|
138 |
*/
|
139 |
private function getSubProRename() {
|
140 |
return $this->getSubPro( 'rename' );
|
141 |
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @param array $aNoticeAttributes
|
145 |
-
* @throws \Exception
|
146 |
-
* @deprecated
|
147 |
-
*/
|
148 |
-
public function addNotice_email_verification_sent() {
|
149 |
-
return;
|
150 |
-
}
|
151 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_LoginProtect extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
+
/** @var \ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
12 |
$oMod = $this->getMod();
|
13 |
|
14 |
// XML-RPC Compatibility
|
18 |
|
19 |
// So we can allow access to the login pages if IP is whitelisted
|
20 |
if ( $oMod->isCustomLoginPathEnabled() ) {
|
21 |
+
$this->getSubProRename()->execute();
|
22 |
}
|
23 |
|
24 |
if ( !$oMod->isVisitorWhitelisted() ) {
|
25 |
if ( $oMod->isEnabledGaspCheck() ) {
|
26 |
+
$this->getSubProGasp()->execute();
|
27 |
}
|
28 |
|
29 |
if ( $oMod->isCooldownEnabled() && Services::Request()->isPost() ) {
|
30 |
+
$this->getSubProCooldown()->execute();
|
31 |
}
|
32 |
|
33 |
if ( $oMod->isGoogleRecaptchaEnabled() ) {
|
34 |
+
$this->getSubProRecaptcha()->execute();
|
35 |
}
|
36 |
|
37 |
+
$this->getSubProIntent()->execute();
|
38 |
}
|
39 |
}
|
40 |
|
41 |
public function onWpEnqueueJs() {
|
42 |
+
/** @var \ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
43 |
$oMod = $this->getMod();
|
44 |
|
45 |
if ( $oMod->isEnabledBotJs() ) {
|
107 |
}
|
108 |
|
109 |
/**
|
110 |
+
* @return \ICWP_WPSF_Processor_LoginProtect_Cooldown
|
111 |
*/
|
112 |
private function getSubProCooldown() {
|
113 |
return $this->getSubPro( 'cooldown' );
|
114 |
}
|
115 |
|
116 |
/**
|
117 |
+
* @return \ICWP_WPSF_Processor_LoginProtect_Gasp
|
118 |
*/
|
119 |
private function getSubProGasp() {
|
120 |
return $this->getSubPro( 'gasp' );
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
+
* @return \ICWP_WPSF_Processor_LoginProtect_Intent
|
125 |
*/
|
126 |
public function getSubProIntent() {
|
127 |
return $this->getSubPro( 'intent' );
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
+
* @return \ICWP_WPSF_Processor_LoginProtect_GoogleRecaptcha
|
132 |
*/
|
133 |
private function getSubProRecaptcha() {
|
134 |
return $this->getSubPro( 'recaptcha' );
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
+
* @return \ICWP_WPSF_Processor_LoginProtect_WpLogin
|
139 |
*/
|
140 |
private function getSubProRename() {
|
141 |
return $this->getSubPro( 'rename' );
|
142 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
src/processors/loginprotect_base.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
abstract class ICWP_WPSF_Processor_LoginProtect_Base extends
|
6 |
|
7 |
/**
|
8 |
* @var string
|
@@ -194,7 +195,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
194 |
}
|
195 |
catch ( \Exception $oE ) {
|
196 |
$oWpError = $this->giveMeWpError( $oWpError );
|
197 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
198 |
}
|
199 |
return $oWpError;
|
200 |
}
|
@@ -217,7 +218,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
217 |
}
|
218 |
catch ( \Exception $oE ) {
|
219 |
$oUserOrError = $this->giveMeWpError( $oUserOrError );
|
220 |
-
$oUserOrError->add( $this->prefix( rand() ), $oE->getMessage() );
|
221 |
}
|
222 |
return $oUserOrError;
|
223 |
}
|
@@ -265,7 +266,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
265 |
}
|
266 |
catch ( \Exception $oE ) {
|
267 |
$oWpError = $this->giveMeWpError( $oWpError );
|
268 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
269 |
}
|
270 |
return $oWpError;
|
271 |
}
|
@@ -318,7 +319,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
318 |
}
|
319 |
catch ( \Exception $oE ) {
|
320 |
$oWpError = $this->giveMeWpError( $oWpError );
|
321 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
322 |
}
|
323 |
return $oWpError;
|
324 |
}
|
@@ -357,7 +358,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
357 |
}
|
358 |
catch ( \Exception $oE ) {
|
359 |
$oWpError = $this->giveMeWpError( $oWpError );
|
360 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
361 |
}
|
362 |
return $oWpError;
|
363 |
}
|
@@ -371,7 +372,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
371 |
}
|
372 |
catch ( \Exception $oE ) {
|
373 |
if ( function_exists( 'edd_set_error' ) ) {
|
374 |
-
edd_set_error( $this->prefix( rand() ), $oE->getMessage() );
|
375 |
}
|
376 |
}
|
377 |
}
|
@@ -389,7 +390,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
389 |
}
|
390 |
catch ( \Exception $oE ) {
|
391 |
$oWpError = $this->giveMeWpError( $oWpError );
|
392 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
393 |
}
|
394 |
return $oWpError;
|
395 |
}
|
@@ -456,7 +457,7 @@ abstract class ICWP_WPSF_Processor_LoginProtect_Base extends ICWP_WPSF_Processor
|
|
456 |
}
|
457 |
catch ( \Exception $oE ) {
|
458 |
$oWpError = $this->giveMeWpError( $oWpError );
|
459 |
-
$oWpError->add( $this->prefix( rand() ), $oE->getMessage() );
|
460 |
}
|
461 |
return $oWpError;
|
462 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
abstract class ICWP_WPSF_Processor_LoginProtect_Base extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* @var string
|
195 |
}
|
196 |
catch ( \Exception $oE ) {
|
197 |
$oWpError = $this->giveMeWpError( $oWpError );
|
198 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
199 |
}
|
200 |
return $oWpError;
|
201 |
}
|
218 |
}
|
219 |
catch ( \Exception $oE ) {
|
220 |
$oUserOrError = $this->giveMeWpError( $oUserOrError );
|
221 |
+
$oUserOrError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
222 |
}
|
223 |
return $oUserOrError;
|
224 |
}
|
266 |
}
|
267 |
catch ( \Exception $oE ) {
|
268 |
$oWpError = $this->giveMeWpError( $oWpError );
|
269 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
270 |
}
|
271 |
return $oWpError;
|
272 |
}
|
319 |
}
|
320 |
catch ( \Exception $oE ) {
|
321 |
$oWpError = $this->giveMeWpError( $oWpError );
|
322 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
323 |
}
|
324 |
return $oWpError;
|
325 |
}
|
358 |
}
|
359 |
catch ( \Exception $oE ) {
|
360 |
$oWpError = $this->giveMeWpError( $oWpError );
|
361 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
362 |
}
|
363 |
return $oWpError;
|
364 |
}
|
372 |
}
|
373 |
catch ( \Exception $oE ) {
|
374 |
if ( function_exists( 'edd_set_error' ) ) {
|
375 |
+
edd_set_error( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
376 |
}
|
377 |
}
|
378 |
}
|
390 |
}
|
391 |
catch ( \Exception $oE ) {
|
392 |
$oWpError = $this->giveMeWpError( $oWpError );
|
393 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
394 |
}
|
395 |
return $oWpError;
|
396 |
}
|
457 |
}
|
458 |
catch ( \Exception $oE ) {
|
459 |
$oWpError = $this->giveMeWpError( $oWpError );
|
460 |
+
$oWpError->add( $this->getCon()->prefix( rand() ), $oE->getMessage() );
|
461 |
}
|
462 |
return $oWpError;
|
463 |
}
|
src/processors/loginprotect_intent.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_LoginProtect_Intent extends
|
7 |
|
8 |
/**
|
9 |
* @var ICWP_WPSF_Processor_LoginProtect_Track
|
@@ -50,19 +50,19 @@ class ICWP_WPSF_Processor_LoginProtect_Intent extends ICWP_WPSF_Processor_BaseWp
|
|
50 |
$oFO = $this->getMod();
|
51 |
|
52 |
if ( $oFO->isEnabledGoogleAuthenticator() ) {
|
53 |
-
$this->getProcessorGoogleAuthenticator()->
|
54 |
}
|
55 |
|
56 |
if ( $oFO->isEmailAuthenticationActive() ) {
|
57 |
-
$this->getProcessorEmailAuth()->
|
58 |
}
|
59 |
|
60 |
if ( $oFO->isYubikeyActive() ) {
|
61 |
-
$this->getProcessorYubikey()->
|
62 |
}
|
63 |
|
64 |
if ( $oFO->isEnabledBackupCodes() ) {
|
65 |
-
$this->getProcessorBackupCodes()->
|
66 |
}
|
67 |
|
68 |
if ( $this->getLoginTrack()->hasFactorsRemainingToTrack() ) {
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_LoginProtect_Intent extends Shield\Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* @var ICWP_WPSF_Processor_LoginProtect_Track
|
50 |
$oFO = $this->getMod();
|
51 |
|
52 |
if ( $oFO->isEnabledGoogleAuthenticator() ) {
|
53 |
+
$this->getProcessorGoogleAuthenticator()->execute();
|
54 |
}
|
55 |
|
56 |
if ( $oFO->isEmailAuthenticationActive() ) {
|
57 |
+
$this->getProcessorEmailAuth()->execute();
|
58 |
}
|
59 |
|
60 |
if ( $oFO->isYubikeyActive() ) {
|
61 |
+
$this->getProcessorYubikey()->execute();
|
62 |
}
|
63 |
|
64 |
if ( $oFO->isEnabledBackupCodes() ) {
|
65 |
+
$this->getProcessorBackupCodes()->execute();
|
66 |
}
|
67 |
|
68 |
if ( $this->getLoginTrack()->hasFactorsRemainingToTrack() ) {
|
src/processors/loginprotect_intentprovider_base.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
abstract class ICWP_WPSF_Processor_LoginProtect_IntentProviderBase extends
|
6 |
|
7 |
/**
|
8 |
* @var ICWP_WPSF_Processor_LoginProtect_Track
|
@@ -12,22 +13,22 @@ abstract class ICWP_WPSF_Processor_LoginProtect_IntentProviderBase extends ICWP_
|
|
12 |
/**
|
13 |
*/
|
14 |
public function run() {
|
15 |
-
/** @var ICWP_WPSF_FeatureHandler_LoginProtect $
|
16 |
-
$
|
17 |
|
18 |
$this->getLoginTrack()->addFactorToTrack( $this->getStub() );
|
19 |
|
20 |
-
if ( $
|
21 |
-
add_filter( $
|
22 |
-
add_action( $
|
23 |
}
|
24 |
|
25 |
-
if ( Services::WpGeneral()->isLoginRequest() || $
|
26 |
// add_filter( 'authenticate', array( $this, 'processLoginAttempt_Filter' ), 30, 2 );
|
27 |
}
|
28 |
|
29 |
// Necessary so we don't show user intent to people without it
|
30 |
-
add_filter( $
|
31 |
|
32 |
add_action( 'show_user_profile', [ $this, 'addOptionsToUserProfile' ] );
|
33 |
add_action( 'personal_options_update', [ $this, 'handleUserProfileSubmit' ] );
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
abstract class ICWP_WPSF_Processor_LoginProtect_IntentProviderBase extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* @var ICWP_WPSF_Processor_LoginProtect_Track
|
13 |
/**
|
14 |
*/
|
15 |
public function run() {
|
16 |
+
/** @var \ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
17 |
+
$oMod = $this->getMod();
|
18 |
|
19 |
$this->getLoginTrack()->addFactorToTrack( $this->getStub() );
|
20 |
|
21 |
+
if ( $oMod->getIfUseLoginIntentPage() ) {
|
22 |
+
add_filter( $oMod->prefix( 'login-intent-form-fields' ), [ $this, 'addLoginIntentField' ] );
|
23 |
+
add_action( $oMod->prefix( 'login-intent-validation' ), [ $this, 'validateLoginIntent' ] );
|
24 |
}
|
25 |
|
26 |
+
if ( Services::WpGeneral()->isLoginRequest() || $oMod->getIfSupport3rdParty() ) {
|
27 |
// add_filter( 'authenticate', array( $this, 'processLoginAttempt_Filter' ), 30, 2 );
|
28 |
}
|
29 |
|
30 |
// Necessary so we don't show user intent to people without it
|
31 |
+
add_filter( $oMod->prefix( 'user_subject_to_login_intent' ), [ $this, 'filterUserSubjectToIntent' ], 10, 2 );
|
32 |
|
33 |
add_action( 'show_user_profile', [ $this, 'addOptionsToUserProfile' ] );
|
34 |
add_action( 'personal_options_update', [ $this, 'handleUserProfileSubmit' ] );
|
src/processors/loginprotect_wplogin.php
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_LoginProtect_WpLogin extends
|
6 |
|
7 |
public function onWpInit() {
|
8 |
-
/** @var ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
9 |
$oMod = $this->getMod();
|
10 |
|
11 |
if ( $this->checkForPluginConflict() || $this->checkForUnsupportedConfiguration() ) {
|
@@ -131,7 +132,7 @@ class ICWP_WPSF_Processor_LoginProtect_WpLogin extends ICWP_WPSF_Processor_BaseW
|
|
131 |
* @return string
|
132 |
*/
|
133 |
protected function getLoginPath() {
|
134 |
-
/** @var ICWP_WPSF_FeatureHandler_LoginProtect $oFO */
|
135 |
$oFO = $this->getMod();
|
136 |
return $oFO->getCustomLoginPath();
|
137 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_LoginProtect_WpLogin extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
public function onWpInit() {
|
9 |
+
/** @var \ICWP_WPSF_FeatureHandler_LoginProtect $oMod */
|
10 |
$oMod = $this->getMod();
|
11 |
|
12 |
if ( $this->checkForPluginConflict() || $this->checkForUnsupportedConfiguration() ) {
|
132 |
* @return string
|
133 |
*/
|
134 |
protected function getLoginPath() {
|
135 |
+
/** @var \ICWP_WPSF_FeatureHandler_LoginProtect $oFO */
|
136 |
$oFO = $this->getMod();
|
137 |
return $oFO->getCustomLoginPath();
|
138 |
}
|
src/processors/plugin.php
CHANGED
@@ -1,32 +1,33 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Modules
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_Plugin extends
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
parent::run();
|
12 |
-
/** @var ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
13 |
$oMod = $this->getMod();
|
14 |
|
15 |
-
$this->getSubProCronDaily()->
|
16 |
-
$this->getSubProCronHourly()->
|
17 |
|
18 |
$this->removePluginConflicts();
|
19 |
|
20 |
-
( new PluginBadge() )
|
21 |
->setMod( $oMod )
|
22 |
->run();
|
23 |
|
24 |
if ( $oMod->isTrackingEnabled() || !$oMod->isTrackingPermissionSet() ) {
|
25 |
-
$this->getSubProTracking()->
|
26 |
}
|
27 |
|
28 |
if ( $oMod->isImportExportPermitted() ) {
|
29 |
-
$this->getSubProImportExport()->
|
30 |
}
|
31 |
|
32 |
switch ( $this->getCon()->getShieldAction() ) {
|
@@ -47,6 +48,10 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
47 |
}
|
48 |
|
49 |
add_action( 'admin_footer', [ $this, 'printAdminFooterItems' ], 100, 0 );
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
public function onWpLoaded() {
|
@@ -65,6 +70,8 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
65 |
/** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
66 |
$oMod = $this->getMod();
|
67 |
$oCon = $this->getCon();
|
|
|
|
|
68 |
|
69 |
$aLabels = $oCon->getLabels();
|
70 |
$sFooter = sprintf( __( '%s is provided by %s', 'wp-simple-firewall' ), $oCon->getHumanName(),
|
@@ -72,7 +79,7 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
72 |
);
|
73 |
|
74 |
$aDisplayData = [
|
75 |
-
'sInstallationDays' => sprintf( __( 'Days Installed: %s', 'wp-simple-firewall' ), $
|
76 |
'sFooter' => $sFooter,
|
77 |
'sIpAddress' => sprintf( __( 'Your IP address is: %s', 'wp-simple-firewall' ), Services::IP()
|
78 |
->getRequestIp() )
|
@@ -159,7 +166,7 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
159 |
'reason_errors' => "I'm getting errors",
|
160 |
];
|
161 |
|
162 |
-
$
|
163 |
'strings' => [
|
164 |
'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
|
165 |
],
|
@@ -169,7 +176,7 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
169 |
'js_snippets' => []
|
170 |
];
|
171 |
echo $this->getMod()
|
172 |
-
->renderTemplate( 'snippets/plugin-deactivate-survey.php', $
|
173 |
}
|
174 |
}
|
175 |
|
@@ -209,20 +216,18 @@ class ICWP_WPSF_Processor_Plugin extends ICWP_WPSF_Processor_BasePlugin {
|
|
209 |
}
|
210 |
|
211 |
/**
|
212 |
-
*
|
213 |
-
* @
|
214 |
-
* @
|
215 |
-
*/
|
216 |
-
public function addNotice_override_forceoff() {
|
217 |
-
return;
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* @param array $aNoticeAttributes
|
222 |
-
* @throws \Exception
|
223 |
-
* @deprecated
|
224 |
*/
|
225 |
-
public function
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Plugin;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_Plugin extends Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
/**
|
10 |
*/
|
11 |
public function run() {
|
12 |
parent::run();
|
13 |
+
/** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
14 |
$oMod = $this->getMod();
|
15 |
|
16 |
+
$this->getSubProCronDaily()->execute();
|
17 |
+
$this->getSubProCronHourly()->execute();
|
18 |
|
19 |
$this->removePluginConflicts();
|
20 |
|
21 |
+
( new Plugin\Components\PluginBadge() )
|
22 |
->setMod( $oMod )
|
23 |
->run();
|
24 |
|
25 |
if ( $oMod->isTrackingEnabled() || !$oMod->isTrackingPermissionSet() ) {
|
26 |
+
$this->getSubProTracking()->execute();
|
27 |
}
|
28 |
|
29 |
if ( $oMod->isImportExportPermitted() ) {
|
30 |
+
$this->getSubProImportExport()->execute();
|
31 |
}
|
32 |
|
33 |
switch ( $this->getCon()->getShieldAction() ) {
|
48 |
}
|
49 |
|
50 |
add_action( 'admin_footer', [ $this, 'printAdminFooterItems' ], 100, 0 );
|
51 |
+
|
52 |
+
add_filter( $oMod->prefix( 'delete_on_deactivate' ), function ( $bDelete ) use ( $oMod ) {
|
53 |
+
return $bDelete || $oMod->isOpt( 'delete_on_deactivate', 'Y' );
|
54 |
+
} );
|
55 |
}
|
56 |
|
57 |
public function onWpLoaded() {
|
70 |
/** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
71 |
$oMod = $this->getMod();
|
72 |
$oCon = $this->getCon();
|
73 |
+
/** @var Plugin\Options $oOpts */
|
74 |
+
$oOpts = $oMod->getOptions();
|
75 |
|
76 |
$aLabels = $oCon->getLabels();
|
77 |
$sFooter = sprintf( __( '%s is provided by %s', 'wp-simple-firewall' ), $oCon->getHumanName(),
|
79 |
);
|
80 |
|
81 |
$aDisplayData = [
|
82 |
+
'sInstallationDays' => sprintf( __( 'Days Installed: %s', 'wp-simple-firewall' ), $oOpts->getInstallationDays() ),
|
83 |
'sFooter' => $sFooter,
|
84 |
'sIpAddress' => sprintf( __( 'Your IP address is: %s', 'wp-simple-firewall' ), Services::IP()
|
85 |
->getRequestIp() )
|
166 |
'reason_errors' => "I'm getting errors",
|
167 |
];
|
168 |
|
169 |
+
$aData = [
|
170 |
'strings' => [
|
171 |
'editing_restricted' => __( 'Editing this option is currently restricted.', 'wp-simple-firewall' ),
|
172 |
],
|
176 |
'js_snippets' => []
|
177 |
];
|
178 |
echo $this->getMod()
|
179 |
+
->renderTemplate( 'snippets/plugin-deactivate-survey.php', $aData );
|
180 |
}
|
181 |
}
|
182 |
|
216 |
}
|
217 |
|
218 |
/**
|
219 |
+
* Override the original collection to then add plugin statistics to the mix
|
220 |
+
* @param array $aData
|
221 |
+
* @return array
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
*/
|
223 |
+
public function tracking_DataCollect( $aData ) {
|
224 |
+
$aData = parent::tracking_DataCollect( $aData );
|
225 |
+
/** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
226 |
+
$oMod = $this->getMod();
|
227 |
+
$sSlug = $oMod->getSlug();
|
228 |
+
if ( empty( $aData[ $sSlug ][ 'options' ][ 'unique_installation_id' ] ) ) {
|
229 |
+
$aData[ $sSlug ][ 'options' ][ 'unique_installation_id' ] = $oMod->getPluginInstallationId();
|
230 |
+
}
|
231 |
+
return $aData;
|
232 |
}
|
233 |
}
|
src/processors/plugin_badge.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_Plugin_Badge
|
5 |
-
* @deprecated 8.0.1
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_Plugin_Badge extends ICWP_WPSF_Processor_BaseWpsf {
|
8 |
-
|
9 |
-
/**
|
10 |
-
*/
|
11 |
-
public function run() {
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @deprecated 8.0.1
|
16 |
-
*/
|
17 |
-
public function addPluginBadgeWidget() {
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @param array $aContent
|
22 |
-
* @return array
|
23 |
-
* @deprecated 8.0.1
|
24 |
-
*/
|
25 |
-
public function gatherPluginWidgetContent( $aContent ) {
|
26 |
-
return $aContent;
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* @deprecated 8.0.1
|
31 |
-
*/
|
32 |
-
public function printPluginBadge() {
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/plugin_badgewidget.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class ICWP_WPSF_Processor_Plugin_BadgeWidget
|
5 |
-
* @deprecated 8.0.1
|
6 |
-
*/
|
7 |
-
class ICWP_WPSF_Processor_Plugin_BadgeWidget extends ICWP_WPSF_WpWidget {
|
8 |
-
|
9 |
-
use \FernleafSystems\Wordpress\Plugin\Shield\Modules\ModConsumer;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* ICWP_WPSF_Processor_Plugin_BadgeWidget constructor.
|
13 |
-
* @param ICWP_WPSF_FeatureHandler_Base $oMod
|
14 |
-
*/
|
15 |
-
public function __construct( $oMod ) {
|
16 |
-
return;
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @param array $aWidgetArguments
|
21 |
-
* @param array $aWidgetInstance
|
22 |
-
* @throws \Exception
|
23 |
-
*/
|
24 |
-
public function widget( $aWidgetArguments, $aWidgetInstance ) {
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @return string
|
29 |
-
* @throws \Exception
|
30 |
-
*/
|
31 |
-
public function renderBadge() {
|
32 |
-
return '';
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/plugin_crondaily.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_Plugin_CronDaily extends
|
6 |
|
7 |
use \FernleafSystems\Wordpress\Plugin\Shield\Crons\StandardCron;
|
8 |
|
9 |
/**
|
10 |
*/
|
11 |
public function run() {
|
12 |
-
parent::run();
|
13 |
$this->setupCron();
|
14 |
}
|
15 |
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Plugin_CronDaily extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
use \FernleafSystems\Wordpress\Plugin\Shield\Crons\StandardCron;
|
9 |
|
10 |
/**
|
11 |
*/
|
12 |
public function run() {
|
|
|
13 |
$this->setupCron();
|
14 |
}
|
15 |
|
src/processors/plugin_cronhourly.php
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
use \FernleafSystems\Wordpress\Plugin\Shield\Crons\StandardCron;
|
6 |
|
7 |
public function run() {
|
8 |
-
parent::run();
|
9 |
$this->setupCron();
|
10 |
}
|
11 |
|
@@ -20,13 +21,13 @@ class ICWP_WPSF_Processor_Plugin_CronHourly extends ICWP_WPSF_Processor_BaseWpsf
|
|
20 |
* @return string
|
21 |
*/
|
22 |
protected function getCronName() {
|
23 |
-
return $this->
|
24 |
}
|
25 |
|
26 |
/**
|
27 |
* Use the included action to hook into the plugin's daily cron
|
28 |
*/
|
29 |
public function runCron() {
|
30 |
-
do_action( $this->
|
31 |
}
|
32 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
+
|
5 |
+
class ICWP_WPSF_Processor_Plugin_CronHourly extends Modules\BaseShield\ShieldProcessor {
|
6 |
|
7 |
use \FernleafSystems\Wordpress\Plugin\Shield\Crons\StandardCron;
|
8 |
|
9 |
public function run() {
|
|
|
10 |
$this->setupCron();
|
11 |
}
|
12 |
|
21 |
* @return string
|
22 |
*/
|
23 |
protected function getCronName() {
|
24 |
+
return $this->getCon()->prefix( 'hourly' );
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
* Use the included action to hook into the plugin's daily cron
|
29 |
*/
|
30 |
public function runCron() {
|
31 |
+
do_action( $this->getCon()->prefix( 'hourly_cron' ) );
|
32 |
}
|
33 |
}
|
src/processors/plugin_geoip.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\GeoIp;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class ICWP_WPSF_Processor_Plugin_Geoip
|
7 |
-
* @deprecated 8
|
8 |
-
*/
|
9 |
-
class ICWP_WPSF_Processor_Plugin_Geoip extends ICWP_WPSF_BaseDbProcessor {
|
10 |
-
|
11 |
-
const DAYS_TO_KEEP = 30;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @param ICWP_WPSF_FeatureHandler_Plugin $oModCon
|
15 |
-
*/
|
16 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Plugin $oModCon ) {
|
17 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'geoip_table_name' ) );
|
18 |
-
}
|
19 |
-
|
20 |
-
public function run() {
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @return string
|
25 |
-
*/
|
26 |
-
public function getCreateTableSql() {
|
27 |
-
return "CREATE TABLE %s (
|
28 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
29 |
-
ip varbinary(16) DEFAULT NULL COMMENT 'IP Address',
|
30 |
-
meta TEXT,
|
31 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
32 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
33 |
-
PRIMARY KEY (id)
|
34 |
-
) %s;";
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @return array
|
39 |
-
*/
|
40 |
-
protected function getTableColumnsByDefinition() {
|
41 |
-
$aDef = $this->getMod()->getDef( 'geoip_table_columns' );
|
42 |
-
return is_array( $aDef ) ? $aDef : [];
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @return GeoIp\Handler
|
47 |
-
*/
|
48 |
-
protected function createDbHandler() {
|
49 |
-
return new GeoIp\Handler();
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @return int
|
54 |
-
*/
|
55 |
-
protected function getAutoExpirePeriod() {
|
56 |
-
return DAY_IN_SECONDS*self::DAYS_TO_KEEP;
|
57 |
-
}
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/plugin_importexport.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_Plugin_ImportExport extends
|
7 |
|
8 |
public function run() {
|
9 |
-
/** @var ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
10 |
$oMod = $this->getMod();
|
11 |
|
12 |
add_action( $oMod->prefix( 'importexport_notify' ), [ $this, 'runWhitelistNotify' ] );
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Plugin_ImportExport extends Shield\Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
public function run() {
|
9 |
+
/** @var \ICWP_WPSF_FeatureHandler_Plugin $oMod */
|
10 |
$oMod = $this->getMod();
|
11 |
|
12 |
add_action( $oMod->prefix( 'importexport_notify' ), [ $this, 'runWhitelistNotify' ] );
|
src/processors/plugin_notes.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\AdminNotes;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class ICWP_WPSF_Processor_Plugin_Notes
|
7 |
-
* @deprecated 7.5
|
8 |
-
*/
|
9 |
-
class ICWP_WPSF_Processor_Plugin_Notes extends ICWP_WPSF_BaseDbProcessor {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* @param ICWP_WPSF_FeatureHandler_Plugin $oModCon
|
13 |
-
*/
|
14 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Plugin $oModCon ) {
|
15 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'db_notes_name' ) );
|
16 |
-
}
|
17 |
-
|
18 |
-
public function run() {
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public function getCreateTableSql() {
|
25 |
-
return "CREATE TABLE %s (
|
26 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
27 |
-
wp_username varchar(255) NOT NULL DEFAULT 'unknown',
|
28 |
-
note TEXT,
|
29 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
30 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
31 |
-
PRIMARY KEY (id)
|
32 |
-
) %s;";
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @return array
|
37 |
-
*/
|
38 |
-
protected function getTableColumnsByDefinition() {
|
39 |
-
$aDef = $this->getMod()->getDef( 'db_notes_table_columns' );
|
40 |
-
return is_array( $aDef ) ? $aDef : [];
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @return AdminNotes\Handler
|
45 |
-
*/
|
46 |
-
protected function createDbHandler() {
|
47 |
-
return new AdminNotes\Handler();
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/plugin_tracking.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_Plugin_Tracking extends
|
7 |
|
8 |
/**
|
9 |
* @return bool
|
@@ -81,13 +81,4 @@ class ICWP_WPSF_Processor_Plugin_Tracking extends ICWP_WPSF_Processor_BasePlugin
|
|
81 |
$this->sendTrackingData();
|
82 |
}
|
83 |
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @param array $aNoticeAttributes
|
87 |
-
* @throws \Exception
|
88 |
-
* @deprecated
|
89 |
-
*/
|
90 |
-
public function addNotice_allow_tracking() {
|
91 |
-
return;
|
92 |
-
}
|
93 |
}
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_Plugin_Tracking extends Shield\Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
* @return bool
|
81 |
$this->sendTrackingData();
|
82 |
}
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
src/processors/sessions.php
CHANGED
@@ -1,27 +1,16 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Session;
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_Sessions extends
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @var int
|
10 |
-
*/
|
11 |
-
const DAYS_TO_KEEP = 30;
|
12 |
|
13 |
/**
|
14 |
* @var Session\EntryVO
|
15 |
*/
|
16 |
private $oCurrent;
|
17 |
|
18 |
-
/**
|
19 |
-
* @param \ICWP_WPSF_Processor_Sessions $oModCon
|
20 |
-
*/
|
21 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Sessions $oModCon ) {
|
22 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'sessions_table_name' ) );
|
23 |
-
}
|
24 |
-
|
25 |
public function run() {
|
26 |
if ( $this->isReadyToRun() ) {
|
27 |
if ( !Services::WpUsers()->isProfilePage() ) { // only on logout
|
@@ -64,11 +53,12 @@ class ICWP_WPSF_Processor_Sessions extends ICWP_WPSF_BaseDbProcessor {
|
|
64 |
|
65 |
public function onModuleShutdown() {
|
66 |
if ( !Services::Rest()->isRest() ) {
|
67 |
-
|
68 |
-
$
|
69 |
-
if ( $oFO->hasSession() ) {
|
70 |
/** @var Session\Update $oUpd */
|
71 |
-
$oUpd = $this->
|
|
|
|
|
72 |
$oUpd->updateLastActivity( $this->getCurrentSession() );
|
73 |
}
|
74 |
}
|
@@ -164,28 +154,6 @@ class ICWP_WPSF_Processor_Sessions extends ICWP_WPSF_BaseDbProcessor {
|
|
164 |
return $bSuccess;
|
165 |
}
|
166 |
|
167 |
-
/**
|
168 |
-
* @return string
|
169 |
-
*/
|
170 |
-
public function getCreateTableSql() {
|
171 |
-
return "CREATE TABLE %s (
|
172 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
173 |
-
session_id varchar(32) NOT NULL DEFAULT '',
|
174 |
-
wp_username varchar(255) NOT NULL DEFAULT '',
|
175 |
-
ip varchar(40) NOT NULL DEFAULT '0',
|
176 |
-
browser varchar(32) NOT NULL DEFAULT '',
|
177 |
-
logged_in_at int(15) NOT NULL DEFAULT 0,
|
178 |
-
last_activity_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
179 |
-
last_activity_uri text NOT NULL DEFAULT '',
|
180 |
-
li_code_email varchar(6) NOT NULL DEFAULT '',
|
181 |
-
login_intent_expires_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
182 |
-
secadmin_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
183 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
184 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
185 |
-
PRIMARY KEY (id)
|
186 |
-
) %s;";
|
187 |
-
}
|
188 |
-
|
189 |
/**
|
190 |
* @return Session\EntryVO|null
|
191 |
*/
|
@@ -215,13 +183,6 @@ class ICWP_WPSF_Processor_Sessions extends ICWP_WPSF_BaseDbProcessor {
|
|
215 |
return $oSession;
|
216 |
}
|
217 |
|
218 |
-
/**
|
219 |
-
* @return Session\Handler
|
220 |
-
*/
|
221 |
-
protected function createDbHandler() {
|
222 |
-
return new Session\Handler();
|
223 |
-
}
|
224 |
-
|
225 |
/**
|
226 |
* @param string $sSessionId
|
227 |
* @param string $sUsername
|
@@ -254,28 +215,4 @@ class ICWP_WPSF_Processor_Sessions extends ICWP_WPSF_BaseDbProcessor {
|
|
254 |
->getQuerySelector();
|
255 |
return $oSel->retrieveUserSession( $sSessionId, $sUsername );
|
256 |
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* @return array
|
260 |
-
*/
|
261 |
-
protected function getTableColumnsByDefinition() {
|
262 |
-
$aDef = $this->getMod()->getDef( 'sessions_table_columns' );
|
263 |
-
return ( is_array( $aDef ) ? $aDef : [] );
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* @return int
|
268 |
-
*/
|
269 |
-
protected function getAutoExpirePeriod() {
|
270 |
-
return DAY_IN_SECONDS*self::DAYS_TO_KEEP;
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* @param Session\EntryVO $oSes
|
275 |
-
* @return bool
|
276 |
-
* @deprecated 7.5
|
277 |
-
*/
|
278 |
-
public function queryTerminateSession( $oSes ) {
|
279 |
-
return ( $oSes instanceof Session\EntryVO ) ? $this->terminateSession( $oSes->id ) : true;
|
280 |
-
}
|
281 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Session;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
5 |
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_Sessions extends Modules\BaseShield\ShieldProcessor {
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
/**
|
10 |
* @var Session\EntryVO
|
11 |
*/
|
12 |
private $oCurrent;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
public function run() {
|
15 |
if ( $this->isReadyToRun() ) {
|
16 |
if ( !Services::WpUsers()->isProfilePage() ) { // only on logout
|
53 |
|
54 |
public function onModuleShutdown() {
|
55 |
if ( !Services::Rest()->isRest() ) {
|
56 |
+
$oSession = $this->getCurrentSession();
|
57 |
+
if ( $oSession instanceof Session\EntryVO) {
|
|
|
58 |
/** @var Session\Update $oUpd */
|
59 |
+
$oUpd = $this->getMod()
|
60 |
+
->getDbHandler()
|
61 |
+
->getQueryUpdater();
|
62 |
$oUpd->updateLastActivity( $this->getCurrentSession() );
|
63 |
}
|
64 |
}
|
154 |
return $bSuccess;
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
/**
|
158 |
* @return Session\EntryVO|null
|
159 |
*/
|
183 |
return $oSession;
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
/**
|
187 |
* @param string $sSessionId
|
188 |
* @param string $sUsername
|
215 |
->getQuerySelector();
|
216 |
return $oSel->retrieveUserSession( $sSessionId, $sUsername );
|
217 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
src/processors/statistics.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
-
|
5 |
-
class ICWP_WPSF_Processor_Statistics extends ICWP_WPSF_Processor_BaseWpsf {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @return \ICWP_WPSF_Processor_Statistics_Tally|mixed
|
9 |
-
*/
|
10 |
-
protected function getTallyProcessor() {
|
11 |
-
return $this->getSubPro( 'tally' );
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @return array
|
16 |
-
*/
|
17 |
-
protected function getSubProMap() {
|
18 |
-
return [
|
19 |
-
'tally' => 'ICWP_WPSF_Processor_Statistics_Tally',
|
20 |
-
];
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/statistics_tally.php
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Tally;
|
4 |
-
|
5 |
-
class ICWP_WPSF_Processor_Statistics_Tally extends ICWP_WPSF_BaseDbProcessor {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @param ICWP_WPSF_FeatureHandler_Statistics $oModCon
|
9 |
-
*/
|
10 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Statistics $oModCon ) {
|
11 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'statistics_table_name' ) );
|
12 |
-
}
|
13 |
-
|
14 |
-
public function run() {
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @return Tally\Handler
|
19 |
-
*/
|
20 |
-
protected function createDbHandler() {
|
21 |
-
return new Tally\Handler();
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
protected function getTableColumnsByDefinition() {
|
28 |
-
$aDef = $this->getMod()->getDef( 'statistics_table_columns' );
|
29 |
-
return ( is_array( $aDef ) ? $aDef : [] );
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
*/
|
34 |
-
protected function commit() {
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
protected function getCreateTableSql() {
|
41 |
-
return "CREATE TABLE %s (
|
42 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
43 |
-
stat_key varchar(100) NOT NULL DEFAULT 0,
|
44 |
-
parent_stat_key varchar(100) NOT NULL DEFAULT '',
|
45 |
-
tally int(11) UNSIGNED NOT NULL DEFAULT 0,
|
46 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
47 |
-
modified_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
48 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
49 |
-
PRIMARY KEY (id)
|
50 |
-
) %s;";
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
*/
|
55 |
-
public function cleanupDatabase() {
|
56 |
-
$this->consolidateDuplicateKeys();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Will consolidate multiple rows with the same stat_key into 1 row
|
61 |
-
*/
|
62 |
-
protected function consolidateDuplicateKeys() {
|
63 |
-
}
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/processors/traffic.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield\Modules
|
4 |
|
5 |
/**
|
6 |
* Class ICWP_WPSF_Processor_Traffic
|
7 |
*/
|
8 |
-
class ICWP_WPSF_Processor_Traffic extends
|
9 |
|
10 |
public function run() {
|
11 |
-
$this->getProcessorLogger()->
|
12 |
}
|
13 |
|
14 |
/**
|
15 |
* Not fully tested- aim for 8.1 release
|
16 |
*/
|
17 |
public function onWpInit() {
|
18 |
-
/** @var Traffic\Options $oOpts */
|
19 |
$oOpts = $this->getMod()->getOptions();
|
20 |
if ( false && $oOpts->isTrafficLimitEnabled() ) {
|
21 |
-
( new Traffic\Limiter\Limiter() )
|
22 |
->setMod( $this->getMod() )
|
23 |
->run();
|
24 |
}
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
-
* @return ICWP_WPSF_Processor_TrafficLogger|mixed
|
29 |
*/
|
30 |
public function getProcessorLogger() {
|
31 |
return $this->getSubPro( 'logger' );
|
@@ -37,7 +37,6 @@ class ICWP_WPSF_Processor_Traffic extends ICWP_WPSF_Processor_BaseWpsf {
|
|
37 |
protected function getSubProMap() {
|
38 |
return [
|
39 |
'logger' => 'ICWP_WPSF_Processor_TrafficLogger',
|
40 |
-
'limiter' => 'ICWP_WPSF_Processor_TrafficLogger',
|
41 |
];
|
42 |
}
|
43 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
|
5 |
/**
|
6 |
* Class ICWP_WPSF_Processor_Traffic
|
7 |
*/
|
8 |
+
class ICWP_WPSF_Processor_Traffic extends Modules\BaseShield\ShieldProcessor {
|
9 |
|
10 |
public function run() {
|
11 |
+
$this->getProcessorLogger()->execute();
|
12 |
}
|
13 |
|
14 |
/**
|
15 |
* Not fully tested- aim for 8.1 release
|
16 |
*/
|
17 |
public function onWpInit() {
|
18 |
+
/** @var Modules\Traffic\Options $oOpts */
|
19 |
$oOpts = $this->getMod()->getOptions();
|
20 |
if ( false && $oOpts->isTrafficLimitEnabled() ) {
|
21 |
+
( new Modules\Traffic\Limiter\Limiter() )
|
22 |
->setMod( $this->getMod() )
|
23 |
->run();
|
24 |
}
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
+
* @return \ICWP_WPSF_Processor_TrafficLogger|mixed
|
29 |
*/
|
30 |
public function getProcessorLogger() {
|
31 |
return $this->getSubPro( 'logger' );
|
37 |
protected function getSubProMap() {
|
38 |
return [
|
39 |
'logger' => 'ICWP_WPSF_Processor_TrafficLogger',
|
|
|
40 |
];
|
41 |
}
|
42 |
}
|
src/processors/traffic_logger.php
CHANGED
@@ -1,16 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Traffic;
|
|
|
|
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_TrafficLogger extends
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @param ICWP_WPSF_Processor_Traffic $oModCon
|
10 |
-
*/
|
11 |
-
public function __construct( ICWP_WPSF_FeatureHandler_Traffic $oModCon ) {
|
12 |
-
parent::__construct( $oModCon, $oModCon->getDef( 'traffic_table_name' ) );
|
13 |
-
}
|
14 |
|
15 |
public function onModuleShutdown() {
|
16 |
if ( $this->getIfLogRequest() ) {
|
@@ -23,23 +18,25 @@ class ICWP_WPSF_Processor_TrafficLogger extends ICWP_WPSF_BaseDbProcessor {
|
|
23 |
* @return bool
|
24 |
*/
|
25 |
protected function getIfLogRequest() {
|
26 |
-
/** @var ICWP_WPSF_FeatureHandler_Traffic $
|
27 |
-
$
|
|
|
|
|
28 |
$oWp = Services::WpGeneral();
|
29 |
$bLoggedIn = Services::WpUsers()->isUserLoggedIn();
|
30 |
return parent::getIfLogRequest()
|
31 |
&& !$this->getCon()->isPluginDeleting()
|
32 |
-
&& ( $
|
33 |
&& ( !$this->isCustomExcluded() )
|
34 |
-
&& ( $
|
35 |
-
&& ( $
|
36 |
-
&& ( $
|
37 |
-
&& ( $
|
38 |
&& (
|
39 |
$bLoggedIn || // only run these service IP checks if not logged in.
|
40 |
(
|
41 |
-
( $
|
42 |
-
&& ( $
|
43 |
)
|
44 |
);
|
45 |
}
|
@@ -64,14 +61,6 @@ class ICWP_WPSF_Processor_TrafficLogger extends ICWP_WPSF_BaseDbProcessor {
|
|
64 |
return $bExcluded;
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* Best to check for logged-in status before using this
|
69 |
-
* @return bool
|
70 |
-
*/
|
71 |
-
protected function isServiceIp() {
|
72 |
-
return ( $this->isServiceIp_Uptime() || $this->isServiceIp_Search() );
|
73 |
-
}
|
74 |
-
|
75 |
/**
|
76 |
* @return bool
|
77 |
*/
|
@@ -106,7 +95,8 @@ class ICWP_WPSF_Processor_TrafficLogger extends ICWP_WPSF_BaseDbProcessor {
|
|
106 |
/** @var \ICWP_WPSF_FeatureHandler_Traffic $oMod */
|
107 |
$oMod = $this->getMod();
|
108 |
$oReq = Services::Request();
|
109 |
-
$oDbh
|
|
|
110 |
|
111 |
// For multisites that are separated by sub-domains we also show the host.
|
112 |
$sLeadingPath = Services::WpGeneral()->isMultisite_SubdomainInstall() ? $oReq->getHost() : '';
|
@@ -126,54 +116,4 @@ class ICWP_WPSF_Processor_TrafficLogger extends ICWP_WPSF_BaseDbProcessor {
|
|
126 |
$oDbh->getQueryInserter()
|
127 |
->insert( $oEntry );
|
128 |
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @return Traffic\Handler
|
132 |
-
*/
|
133 |
-
protected function createDbHandler() {
|
134 |
-
return new Traffic\Handler();
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* @return int
|
139 |
-
*/
|
140 |
-
protected function getAutoExpirePeriod() {
|
141 |
-
/** @var ICWP_WPSF_FeatureHandler_Traffic $oFO */
|
142 |
-
$oFO = $this->getMod();
|
143 |
-
return $oFO->getAutoCleanDays()*DAY_IN_SECONDS;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* @return string
|
148 |
-
*/
|
149 |
-
protected function getCreateTableSql() {
|
150 |
-
return "CREATE TABLE %s (
|
151 |
-
id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
152 |
-
rid varchar(10) NOT NULL DEFAULT '' COMMENT 'Request ID',
|
153 |
-
uid int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User ID',
|
154 |
-
ip varbinary(16) DEFAULT NULL COMMENT 'Visitor IP Address',
|
155 |
-
path text NOT NULL DEFAULT '' COMMENT 'Request Path or URI',
|
156 |
-
code int(5) NOT NULL DEFAULT '200' COMMENT 'HTTP Response Code',
|
157 |
-
verb varchar(10) NOT NULL DEFAULT 'get' COMMENT 'HTTP Method',
|
158 |
-
ua text COMMENT 'Browser User Agent String',
|
159 |
-
trans tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Trangression',
|
160 |
-
created_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
161 |
-
deleted_at int(15) UNSIGNED NOT NULL DEFAULT 0,
|
162 |
-
PRIMARY KEY (id)
|
163 |
-
) %s;";
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* @return array
|
168 |
-
*/
|
169 |
-
protected function getTableColumnsByDefinition() {
|
170 |
-
$aDef = $this->getMod()->getDef( 'traffic_table_columns' );
|
171 |
-
return is_array( $aDef ) ? $aDef : [];
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* @deprecated 7.5
|
176 |
-
*/
|
177 |
-
protected function trimTable() {
|
178 |
-
}
|
179 |
}
|
1 |
<?php
|
2 |
|
3 |
use FernleafSystems\Wordpress\Plugin\Shield\Databases\Traffic;
|
4 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\BaseShield\ShieldProcessor;
|
5 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules\Traffic\Options;
|
6 |
use FernleafSystems\Wordpress\Services\Services;
|
7 |
|
8 |
+
class ICWP_WPSF_Processor_TrafficLogger extends ShieldProcessor {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
public function onModuleShutdown() {
|
11 |
if ( $this->getIfLogRequest() ) {
|
18 |
* @return bool
|
19 |
*/
|
20 |
protected function getIfLogRequest() {
|
21 |
+
/** @var ICWP_WPSF_FeatureHandler_Traffic $oMod */
|
22 |
+
$oMod = $this->getMod();
|
23 |
+
/** @var Options $oOpts */
|
24 |
+
$oOpts = $this->getMod()->getOptions();
|
25 |
$oWp = Services::WpGeneral();
|
26 |
$bLoggedIn = Services::WpUsers()->isUserLoggedIn();
|
27 |
return parent::getIfLogRequest()
|
28 |
&& !$this->getCon()->isPluginDeleting()
|
29 |
+
&& ( $oOpts->getMaxEntries() > 0 )
|
30 |
&& ( !$this->isCustomExcluded() )
|
31 |
+
&& ( $oMod->isIncluded_Simple() || count( Services::Request()->getRawRequestParams( false ) ) > 0 )
|
32 |
+
&& ( $oMod->isIncluded_LoggedInUser() || !$bLoggedIn )
|
33 |
+
&& ( $oMod->isIncluded_Ajax() || !$oWp->isAjax() )
|
34 |
+
&& ( $oMod->isIncluded_Cron() || !$oWp->isCron() )
|
35 |
&& (
|
36 |
$bLoggedIn || // only run these service IP checks if not logged in.
|
37 |
(
|
38 |
+
( $oMod->isIncluded_Search() || !$this->isServiceIp_Search() )
|
39 |
+
&& ( $oMod->isIncluded_Uptime() || !$this->isServiceIp_Uptime() )
|
40 |
)
|
41 |
);
|
42 |
}
|
61 |
return $bExcluded;
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* @return bool
|
66 |
*/
|
95 |
/** @var \ICWP_WPSF_FeatureHandler_Traffic $oMod */
|
96 |
$oMod = $this->getMod();
|
97 |
$oReq = Services::Request();
|
98 |
+
/** @var Traffic\Handler $oDbh */
|
99 |
+
$oDbh = $oMod->getDbHandler();
|
100 |
|
101 |
// For multisites that are separated by sub-domains we also show the host.
|
102 |
$sLeadingPath = Services::WpGeneral()->isMultisite_SubdomainInstall() ? $oReq->getHost() : '';
|
116 |
$oDbh->getQueryInserter()
|
117 |
->insert( $oEntry );
|
118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
src/processors/user_management.php
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
-
class ICWP_WPSF_Processor_UserManagement extends
|
6 |
|
7 |
/**
|
8 |
*/
|
9 |
public function run() {
|
10 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
11 |
-
$
|
12 |
|
13 |
// Adds last login indicator column
|
14 |
add_filter( 'manage_users_columns', [ $this, 'addUserStatusLastLogin' ] );
|
@@ -17,21 +18,21 @@ class ICWP_WPSF_Processor_UserManagement extends ICWP_WPSF_Processor_BaseWpsf {
|
|
17 |
/** Everything from this point on must consider XMLRPC compatibility **/
|
18 |
|
19 |
// XML-RPC Compatibility
|
20 |
-
if ( Services::WpGeneral()->isXmlrpc() && $
|
21 |
return;
|
22 |
}
|
23 |
|
24 |
/** Everything from this point on must consider XMLRPC compatibility **/
|
25 |
-
if ( $
|
26 |
-
$this->getProcessorSessions()->
|
27 |
}
|
28 |
|
29 |
-
if ( $
|
30 |
-
$this->getProcessorPasswords()->
|
31 |
}
|
32 |
|
33 |
-
if ( $
|
34 |
-
$this->getProcessorSuspend()->
|
35 |
}
|
36 |
|
37 |
// All newly created users have their first seen and password start date set
|
@@ -69,14 +70,15 @@ class ICWP_WPSF_Processor_UserManagement extends ICWP_WPSF_Processor_BaseWpsf {
|
|
69 |
* @return $this
|
70 |
*/
|
71 |
private function sendLoginNotifications( $oUser ) {
|
72 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
73 |
-
$
|
74 |
-
$
|
75 |
-
$
|
|
|
76 |
|
77 |
// do some magic logic so we don't send both to the same person (the assumption being that the admin
|
78 |
// email recipient is actually an admin (or they'll maybe not get any).
|
79 |
-
if ( $bAdmin && $bUser && (
|
80 |
$bUser = false;
|
81 |
}
|
82 |
|
@@ -154,8 +156,8 @@ class ICWP_WPSF_Processor_UserManagement extends ICWP_WPSF_Processor_BaseWpsf {
|
|
154 |
* @return bool
|
155 |
*/
|
156 |
private function sendAdminLoginEmailNotification( $oUser ) {
|
157 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
158 |
-
$
|
159 |
|
160 |
$aUserCapToRolesMap = [
|
161 |
'network_admin' => 'manage_network',
|
@@ -205,14 +207,17 @@ class ICWP_WPSF_Processor_UserManagement extends ICWP_WPSF_Processor_BaseWpsf {
|
|
205 |
__( 'Thanks.', 'wp-simple-firewall' )
|
206 |
];
|
207 |
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
->sendEmailWithWrap(
|
212 |
-
$
|
213 |
sprintf( '%s - %s', __( 'Notice', 'wp-simple-firewall' ), sprintf( __( '%s Just Logged Into %s', 'wp-simple-firewall' ), $sHumanName, $sHomeUrl ) ),
|
214 |
$aMessage
|
215 |
);
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
/**
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_UserManagement extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
/**
|
9 |
*/
|
10 |
public function run() {
|
11 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
12 |
+
$oMod = $this->getMod();
|
13 |
|
14 |
// Adds last login indicator column
|
15 |
add_filter( 'manage_users_columns', [ $this, 'addUserStatusLastLogin' ] );
|
18 |
/** Everything from this point on must consider XMLRPC compatibility **/
|
19 |
|
20 |
// XML-RPC Compatibility
|
21 |
+
if ( Services::WpGeneral()->isXmlrpc() && $oMod->isXmlrpcBypass() ) {
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
/** Everything from this point on must consider XMLRPC compatibility **/
|
26 |
+
if ( $oMod->isUserSessionsManagementEnabled() ) {
|
27 |
+
$this->getProcessorSessions()->execute();
|
28 |
}
|
29 |
|
30 |
+
if ( $oMod->isPasswordPoliciesEnabled() ) {
|
31 |
+
$this->getProcessorPasswords()->execute();
|
32 |
}
|
33 |
|
34 |
+
if ( $oMod->isSuspendEnabled() ) {
|
35 |
+
$this->getProcessorSuspend()->execute();
|
36 |
}
|
37 |
|
38 |
// All newly created users have their first seen and password start date set
|
70 |
* @return $this
|
71 |
*/
|
72 |
private function sendLoginNotifications( $oUser ) {
|
73 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
74 |
+
$oMod = $this->getMod();
|
75 |
+
$aAdminEmails = $oMod->getAdminLoginNotificationEmails();
|
76 |
+
$bAdmin = count( $aAdminEmails ) > 0;
|
77 |
+
$bUser = $oMod->isSendUserEmailLoginNotification();
|
78 |
|
79 |
// do some magic logic so we don't send both to the same person (the assumption being that the admin
|
80 |
// email recipient is actually an admin (or they'll maybe not get any).
|
81 |
+
if ( $bAdmin && $bUser && in_array( strtolower( $oUser->user_email ), $aAdminEmails ) ) {
|
82 |
$bUser = false;
|
83 |
}
|
84 |
|
156 |
* @return bool
|
157 |
*/
|
158 |
private function sendAdminLoginEmailNotification( $oUser ) {
|
159 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
160 |
+
$oMod = $this->getMod();
|
161 |
|
162 |
$aUserCapToRolesMap = [
|
163 |
'network_admin' => 'manage_network',
|
207 |
__( 'Thanks.', 'wp-simple-firewall' )
|
208 |
];
|
209 |
|
210 |
+
$oEmailer = $this->getMod()
|
211 |
+
->getEmailProcessor();
|
212 |
+
foreach ( $oMod->getAdminLoginNotificationEmails() as $sEmail ) {
|
213 |
+
$oEmailer->sendEmailWithWrap(
|
214 |
+
$sEmail,
|
215 |
sprintf( '%s - %s', __( 'Notice', 'wp-simple-firewall' ), sprintf( __( '%s Just Logged Into %s', 'wp-simple-firewall' ), $sHumanName, $sHomeUrl ) ),
|
216 |
$aMessage
|
217 |
);
|
218 |
+
}
|
219 |
+
|
220 |
+
return true;
|
221 |
}
|
222 |
|
223 |
/**
|
src/processors/usermanagement_passwords.php
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use FernleafSystems\Wordpress\Services\Services;
|
4 |
|
5 |
/**
|
6 |
* Referenced some of https://github.com/BenjaminNelan/PwnedPasswordChecker
|
7 |
* Class ICWP_WPSF_Processor_UserManagement_Passwords
|
8 |
*/
|
9 |
-
class ICWP_WPSF_Processor_UserManagement_Passwords extends
|
10 |
|
11 |
public function run() {
|
12 |
add_action( 'password_reset', [ $this, 'onPasswordReset' ], 100, 1 );
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
/**
|
7 |
* Referenced some of https://github.com/BenjaminNelan/PwnedPasswordChecker
|
8 |
* Class ICWP_WPSF_Processor_UserManagement_Passwords
|
9 |
*/
|
10 |
+
class ICWP_WPSF_Processor_UserManagement_Passwords extends Modules\BaseShield\ShieldProcessor {
|
11 |
|
12 |
public function run() {
|
13 |
add_action( 'password_reset', [ $this, 'onPasswordReset' ], 100, 1 );
|
src/processors/usermanagement_sessions.php
CHANGED
@@ -1,16 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\Plugin\Shield;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_UserManagement_Sessions extends
|
7 |
|
8 |
public function run() {
|
9 |
-
|
10 |
-
|
11 |
-
add_filter( 'wp_login_errors', [ $this, 'addLoginMessage' ] );
|
12 |
-
add_filter( 'auth_cookie_expiration', [ $this, 'setMaxAuthCookieExpiration' ], 100, 1 );
|
13 |
-
}
|
14 |
}
|
15 |
|
16 |
/**
|
@@ -20,15 +17,6 @@ class ICWP_WPSF_Processor_UserManagement_Sessions extends ICWP_WPSF_Processor_Ba
|
|
20 |
$this->cleanExpiredSessions();
|
21 |
}
|
22 |
|
23 |
-
/**
|
24 |
-
* @return bool
|
25 |
-
*/
|
26 |
-
public function isReadyToRun() {
|
27 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $oFO */
|
28 |
-
$oFO = $this->getMod();
|
29 |
-
return ( parent::isReadyToRun() && $oFO->getSessionsProcessor()->isReadyToRun() );
|
30 |
-
}
|
31 |
-
|
32 |
/**
|
33 |
* @param string $sUsername
|
34 |
* @param \WP_User $oUser
|
@@ -53,7 +41,7 @@ class ICWP_WPSF_Processor_UserManagement_Sessions extends ICWP_WPSF_Processor_Ba
|
|
53 |
/**
|
54 |
*/
|
55 |
public function onWpLoaded() {
|
56 |
-
if (
|
57 |
$this->checkCurrentSession();
|
58 |
}
|
59 |
}
|
@@ -81,26 +69,26 @@ class ICWP_WPSF_Processor_UserManagement_Sessions extends ICWP_WPSF_Processor_Ba
|
|
81 |
* @throws \Exception
|
82 |
*/
|
83 |
private function assessSession() {
|
84 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
85 |
-
$
|
86 |
|
87 |
-
if ( !$
|
88 |
throw new \Exception( 'session_notfound' );
|
89 |
}
|
90 |
|
91 |
-
$oSess = $
|
92 |
$nTime = Services::Request()->ts();
|
93 |
|
94 |
// timeout interval
|
95 |
-
if ( $
|
96 |
throw new \Exception( 'session_expired' );
|
97 |
}
|
98 |
|
99 |
-
if ( $
|
100 |
throw new \Exception( 'session_idle' );
|
101 |
}
|
102 |
|
103 |
-
if ( $
|
104 |
/** We allow the original session IP, the SERVER_ADDR, and the "what is my IP" */
|
105 |
$oPluginMod = $this->getCon()->getModule_Plugin();
|
106 |
$aPossibleIps = [
|
@@ -149,7 +137,7 @@ class ICWP_WPSF_Processor_UserManagement_Sessions extends ICWP_WPSF_Processor_Ba
|
|
149 |
* @return \FernleafSystems\Wordpress\Plugin\Shield\Databases\Session\Select
|
150 |
*/
|
151 |
private function getActiveSessionsQuerySelector() {
|
152 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $oFO */
|
153 |
$oFO = $this->getMod();
|
154 |
/** @var \FernleafSystems\Wordpress\Plugin\Shield\Databases\Session\Select $oSel */
|
155 |
$oSel = $oFO->getDbHandler_Sessions()->getQuerySelector();
|
@@ -218,8 +206,8 @@ class ICWP_WPSF_Processor_UserManagement_Sessions extends ICWP_WPSF_Processor_Ba
|
|
218 |
*/
|
219 |
public function addLoginMessage( $oError ) {
|
220 |
|
221 |
-
if ( !$oError instanceof WP_Error ) {
|
222 |
-
$oError = new WP_Error();
|
223 |
}
|
224 |
|
225 |
$sForceLogout = Services::Request()->query( 'shield-forcelogout' );
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Services\Services;
|
5 |
|
6 |
+
class ICWP_WPSF_Processor_UserManagement_Sessions extends Modules\BaseShield\ShieldProcessor {
|
7 |
|
8 |
public function run() {
|
9 |
+
add_filter( 'wp_login_errors', [ $this, 'addLoginMessage' ] );
|
10 |
+
add_filter( 'auth_cookie_expiration', [ $this, 'setMaxAuthCookieExpiration' ], 100, 1 );
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
/**
|
17 |
$this->cleanExpiredSessions();
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* @param string $sUsername
|
22 |
* @param \WP_User $oUser
|
41 |
/**
|
42 |
*/
|
43 |
public function onWpLoaded() {
|
44 |
+
if ( Services::WpUsers()->isUserLoggedIn() && !Services::Rest()->isRest() ) {
|
45 |
$this->checkCurrentSession();
|
46 |
}
|
47 |
}
|
69 |
* @throws \Exception
|
70 |
*/
|
71 |
private function assessSession() {
|
72 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
73 |
+
$oMod = $this->getMod();
|
74 |
|
75 |
+
if ( !$oMod->hasSession() ) {
|
76 |
throw new \Exception( 'session_notfound' );
|
77 |
}
|
78 |
|
79 |
+
$oSess = $oMod->getSession();
|
80 |
$nTime = Services::Request()->ts();
|
81 |
|
82 |
// timeout interval
|
83 |
+
if ( $oMod->hasMaxSessionTimeout() && ( $nTime - $oSess->logged_in_at > $oMod->getMaxSessionTime() ) ) {
|
84 |
throw new \Exception( 'session_expired' );
|
85 |
}
|
86 |
|
87 |
+
if ( $oMod->hasSessionIdleTimeout() && ( $nTime - $oSess->last_activity_at > $oMod->getIdleTimeoutInterval() ) ) {
|
88 |
throw new \Exception( 'session_idle' );
|
89 |
}
|
90 |
|
91 |
+
if ( $oMod->isLockToIp() ) {
|
92 |
/** We allow the original session IP, the SERVER_ADDR, and the "what is my IP" */
|
93 |
$oPluginMod = $this->getCon()->getModule_Plugin();
|
94 |
$aPossibleIps = [
|
137 |
* @return \FernleafSystems\Wordpress\Plugin\Shield\Databases\Session\Select
|
138 |
*/
|
139 |
private function getActiveSessionsQuerySelector() {
|
140 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oFO */
|
141 |
$oFO = $this->getMod();
|
142 |
/** @var \FernleafSystems\Wordpress\Plugin\Shield\Databases\Session\Select $oSel */
|
143 |
$oSel = $oFO->getDbHandler_Sessions()->getQuerySelector();
|
206 |
*/
|
207 |
public function addLoginMessage( $oError ) {
|
208 |
|
209 |
+
if ( !$oError instanceof \WP_Error ) {
|
210 |
+
$oError = new \WP_Error();
|
211 |
}
|
212 |
|
213 |
$sForceLogout = Services::Request()->query( 'shield-forcelogout' );
|
src/processors/usermanagement_suspend.php
CHANGED
@@ -1,30 +1,31 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use FernleafSystems\Wordpress\
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\UserManagement\Suspend;
|
|
|
5 |
|
6 |
-
class ICWP_WPSF_Processor_UserManagement_Suspend extends
|
7 |
|
8 |
public function run() {
|
9 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
10 |
-
$
|
11 |
|
12 |
-
if ( $
|
13 |
$this->setupUserFilters();
|
14 |
( new Suspend\Suspended() )
|
15 |
->setMod( $this->getMod() )
|
16 |
->run();
|
17 |
}
|
18 |
|
19 |
-
if ( $
|
20 |
( new Suspend\Idle() )
|
21 |
->setMod( $this->getMod() )
|
22 |
->run();
|
23 |
}
|
24 |
|
25 |
-
if ( $
|
26 |
( new Suspend\PasswordExpiry() )
|
27 |
-
->setMaxPasswordAge( $
|
28 |
->setMod( $this->getMod() )
|
29 |
->run();
|
30 |
}
|
@@ -68,8 +69,8 @@ class ICWP_WPSF_Processor_UserManagement_Suspend extends ICWP_WPSF_Processor_Bas
|
|
68 |
* Sets-up all the UI filters necessary to provide manual user suspension and filter the User Tables
|
69 |
*/
|
70 |
private function setupUserFilters() {
|
71 |
-
/** @var ICWP_WPSF_FeatureHandler_UserManagement $
|
72 |
-
$
|
73 |
|
74 |
// User profile UI
|
75 |
add_filter( 'edit_user_profile', [ $this, 'addUserBlockOption' ], 1, 1 );
|
@@ -79,7 +80,7 @@ class ICWP_WPSF_Processor_UserManagement_Suspend extends ICWP_WPSF_Processor_Bas
|
|
79 |
add_filter( 'manage_users_columns', [ $this, 'addUserListSuspendedFlag' ] );
|
80 |
|
81 |
// Provide Suspended user filter above table
|
82 |
-
$aUserIds = array_keys( $
|
83 |
if ( !empty( $aUserIds ) ) {
|
84 |
// Provide the link above the table.
|
85 |
add_filter( 'views_users', function ( $aViews ) use ( $aUserIds ) {
|
1 |
<?php
|
2 |
|
3 |
+
use FernleafSystems\Wordpress\Plugin\Shield\Modules;
|
4 |
use FernleafSystems\Wordpress\Plugin\Shield\Modules\UserManagement\Suspend;
|
5 |
+
use FernleafSystems\Wordpress\Services\Services;
|
6 |
|
7 |
+
class ICWP_WPSF_Processor_UserManagement_Suspend extends Modules\BaseShield\ShieldProcessor {
|
8 |
|
9 |
public function run() {
|
10 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
11 |
+
$oMod = $this->getMod();
|
12 |
|
13 |
+
if ( $oMod->isSuspendManualEnabled() ) {
|
14 |
$this->setupUserFilters();
|
15 |
( new Suspend\Suspended() )
|
16 |
->setMod( $this->getMod() )
|
17 |
->run();
|
18 |
}
|
19 |
|
20 |
+
if ( $oMod->isSuspendAutoIdleEnabled() ) {
|
21 |
( new Suspend\Idle() )
|
22 |
->setMod( $this->getMod() )
|
23 |
->run();
|
24 |
}
|
25 |
|
26 |
+
if ( $oMod->isSuspendAutoPasswordEnabled() ) {
|
27 |
( new Suspend\PasswordExpiry() )
|
28 |
+
->setMaxPasswordAge( $oMod->getPassExpireTimeout() )
|
29 |
->setMod( $this->getMod() )
|
30 |
->run();
|
31 |
}
|
69 |
* Sets-up all the UI filters necessary to provide manual user suspension and filter the User Tables
|
70 |
*/
|
71 |
private function setupUserFilters() {
|
72 |
+
/** @var \ICWP_WPSF_FeatureHandler_UserManagement $oMod */
|
73 |
+
$oMod = $this->getMod();
|
74 |
|
75 |
// User profile UI
|
76 |
add_filter( 'edit_user_profile', [ $this, 'addUserBlockOption' ], 1, 1 );
|
80 |
add_filter( 'manage_users_columns', [ $this, 'addUserListSuspendedFlag' ] );
|
81 |
|
82 |
// Provide Suspended user filter above table
|
83 |
+
$aUserIds = array_keys( $oMod->getSuspendHardUserIds() );
|
84 |
if ( !empty( $aUserIds ) ) {
|
85 |
// Provide the link above the table.
|
86 |
add_filter( 'views_users', function ( $aViews ) use ( $aUserIds ) {
|
src/query/statistics/consolidation.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class ICWP_WPSF_Query_Statistics_Consolidation extends ICWP_WPSF_Query_Statistics_Base {
|
4 |
-
|
5 |
-
/**
|
6 |
-
*/
|
7 |
-
public function run() {
|
8 |
-
$this->consolidateLastMonth();
|
9 |
-
$this->consolidateOld();
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function consolidateLastMonth() {
|
13 |
-
$this->setDateTo( $this->getFirstOfThisMonth() )
|
14 |
-
->setDateFrom( $this->getFirstOfLastMonth() )
|
15 |
-
->consolidate();
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function consolidateOld() {
|
19 |
-
$this->setDateTo( $this->getFirstOfLastMonth() )
|
20 |
-
->setDateFrom( 0 )
|
21 |
-
->consolidate();
|
22 |
-
}
|
23 |
-
|
24 |
-
protected function consolidate() {
|
25 |
-
$aEntries = $this->setSelectDeleted( false )
|
26 |
-
->runQuery();
|
27 |
-
|
28 |
-
$aIdsToDelete = array();
|
29 |
-
$aStatKeyCounter = array();
|
30 |
-
foreach ( $aEntries as $oEntry ) {
|
31 |
-
if ( !isset( $aStatKeyCounter[ $oEntry->getKey() ] ) ) {
|
32 |
-
$aStatKeyCounter[ $oEntry->getKey() ] = 0;
|
33 |
-
}
|
34 |
-
$aStatKeyCounter[ $oEntry->getKey() ] = +$oEntry->getTally();
|
35 |
-
$aIdsToDelete[] = $oEntry->getId();
|
36 |
-
}
|
37 |
-
|
38 |
-
// delete all old entries
|
39 |
-
$this->deleteAllFromTo();
|
40 |
-
|
41 |
-
// write new cumulative stats
|
42 |
-
$oDB = $this->loadDbProcessor();
|
43 |
-
foreach ( $aStatKeyCounter as $sStatKey => $nTally ) {
|
44 |
-
$oDB->insertDataIntoTable(
|
45 |
-
$this->getMod()->getFullEventsTableName(),
|
46 |
-
array(
|
47 |
-
'stat_key' => $sStatKey,
|
48 |
-
'tally' => 1,
|
49 |
-
'created_at' => $this->getDateTo() - 1,
|
50 |
-
'deleted_at' => 0,
|
51 |
-
)
|
52 |
-
);
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* @return int
|
58 |
-
*/
|
59 |
-
public function getFirstOfThisMonth() {
|
60 |
-
$oNow = new \Carbon\Carbon();
|
61 |
-
try {
|
62 |
-
$oNow->setTimezone( $this->loadWp()->getOption( 'timezone_string' ) );
|
63 |
-
}
|
64 |
-
catch ( Exception $oE ) {
|
65 |
-
}
|
66 |
-
return $oNow->day( 1 )
|
67 |
-
->hour( 0 )
|
68 |
-
->minute( 0 )
|
69 |
-
->second( 0 )->timestamp;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* @return int
|
74 |
-
*/
|
75 |
-
public function getFirstOfLastMonth() {
|
76 |
-
$oNow = new \Carbon\Carbon();
|
77 |
-
try {
|
78 |
-
$oNow->setTimezone( $this->loadWp()->getOption( 'timezone_string' ) );
|
79 |
-
}
|
80 |
-
catch ( Exception $oE ) {
|
81 |
-
}
|
82 |
-
return $oNow->day( 1 )
|
83 |
-
->hour( 0 )
|
84 |
-
->minute( 0 )
|
85 |
-
->second( 0 )
|
86 |
-
->subMonth( 1 )->timestamp;
|
87 |
-
}
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/wizards/plugin.php
CHANGED
@@ -213,11 +213,11 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
213 |
case 'optin':
|
214 |
$oUser = Services::WpUsers()->getCurrentWpUser();
|
215 |
$aAdditional = [
|
216 |
-
'vars'
|
217 |
'name' => $oUser->first_name,
|
218 |
'user_email' => $oUser->user_email
|
219 |
],
|
220 |
-
'hrefs'
|
221 |
'privacy_policy' => $this->getMod()->getDef( 'href_privacy_policy' )
|
222 |
],
|
223 |
];
|
@@ -347,10 +347,10 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
347 |
$sMessage = __( "The address source couldn't be found from this IP.", 'wp-simple-firewall' );
|
348 |
}
|
349 |
else {
|
350 |
-
$this->getCon()
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
$oResponse->setSuccessful( true );
|
355 |
$sMessage = __( 'Success!', 'wp-simple-firewall' ).' '
|
356 |
.sprintf( '"%s" was found to be the best source of visitor IP addresses for your site.', $sSource );
|
@@ -471,15 +471,15 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
471 |
if ( !empty( $sInput ) ) {
|
472 |
$bEnabled = $sInput === 'Y';
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
$
|
477 |
-
|
478 |
|
479 |
-
$bSuccess = $
|
480 |
if ( $bSuccess ) {
|
481 |
$sMessage = sprintf( '%s has been %s.', __( 'Audit Trail', 'wp-simple-firewall' ),
|
482 |
-
$
|
483 |
);
|
484 |
}
|
485 |
else {
|
@@ -504,15 +504,15 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
504 |
if ( !empty( $sInput ) ) {
|
505 |
$bEnabled = $sInput === 'Y';
|
506 |
|
507 |
-
|
508 |
-
|
509 |
-
$
|
510 |
-
|
511 |
|
512 |
-
$bSuccess = $
|
513 |
if ( $bSuccess ) {
|
514 |
$sMessage = sprintf( '%s has been %s.', __( 'IP Manager', 'wp-simple-firewall' ),
|
515 |
-
$
|
516 |
);
|
517 |
}
|
518 |
else {
|
@@ -537,15 +537,14 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
537 |
if ( !empty( $sInput ) ) {
|
538 |
$bEnabled = $sInput === 'Y';
|
539 |
|
540 |
-
|
541 |
-
$oModule = $this->getCon()->getModule( 'login_protect' );
|
542 |
if ( $bEnabled ) { // we don't disable the whole module
|
543 |
-
$
|
544 |
}
|
545 |
-
$
|
546 |
-
|
547 |
|
548 |
-
$bSuccess = $
|
549 |
if ( $bSuccess ) {
|
550 |
$sMessage = sprintf( '%s has been %s.', __( 'Login Guard', 'wp-simple-firewall' ),
|
551 |
$bEnabled ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
@@ -681,15 +680,15 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
|
|
681 |
if ( !empty( $sInput ) ) {
|
682 |
$bEnabled = $sInput === 'Y';
|
683 |
|
684 |
-
/** @var ICWP_WPSF_FeatureHandler_CommentsFilter $
|
685 |
-
$
|
686 |
if ( $bEnabled ) { // we don't disable the whole module
|
687 |
-
$
|
688 |
}
|
689 |
-
$
|
690 |
-
|
691 |
|
692 |
-
$bSuccess = $
|
693 |
if ( $bSuccess ) {
|
694 |
$sMessage = sprintf( '%s has been %s.', __( 'Comment SPAM Protection', 'wp-simple-firewall' ),
|
695 |
$bEnabled ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
213 |
case 'optin':
|
214 |
$oUser = Services::WpUsers()->getCurrentWpUser();
|
215 |
$aAdditional = [
|
216 |
+
'vars' => [
|
217 |
'name' => $oUser->first_name,
|
218 |
'user_email' => $oUser->user_email
|
219 |
],
|
220 |
+
'hrefs' => [
|
221 |
'privacy_policy' => $this->getMod()->getDef( 'href_privacy_policy' )
|
222 |
],
|
223 |
];
|
347 |
$sMessage = __( "The address source couldn't be found from this IP.", 'wp-simple-firewall' );
|
348 |
}
|
349 |
else {
|
350 |
+
$oMod = $this->getCon()
|
351 |
+
->getModule_Plugin();
|
352 |
+
$oMod->setVisitorAddressSource( $sSource );
|
353 |
+
$oMod->saveModOptions();
|
354 |
$oResponse->setSuccessful( true );
|
355 |
$sMessage = __( 'Success!', 'wp-simple-firewall' ).' '
|
356 |
.sprintf( '"%s" was found to be the best source of visitor IP addresses for your site.', $sSource );
|
471 |
if ( !empty( $sInput ) ) {
|
472 |
$bEnabled = $sInput === 'Y';
|
473 |
|
474 |
+
$oMod = $this->getCon()
|
475 |
+
->getModule_AuditTrail();
|
476 |
+
$oMod->setIsMainFeatureEnabled( $bEnabled );
|
477 |
+
$oMod->saveModOptions();
|
478 |
|
479 |
+
$bSuccess = $oMod->isModuleEnabled() === $bEnabled;
|
480 |
if ( $bSuccess ) {
|
481 |
$sMessage = sprintf( '%s has been %s.', __( 'Audit Trail', 'wp-simple-firewall' ),
|
482 |
+
$oMod->isModuleEnabled() ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
483 |
);
|
484 |
}
|
485 |
else {
|
504 |
if ( !empty( $sInput ) ) {
|
505 |
$bEnabled = $sInput === 'Y';
|
506 |
|
507 |
+
$oMod = $this->getCon()
|
508 |
+
->getModule_IPs();
|
509 |
+
$oMod->setIsMainFeatureEnabled( $bEnabled );
|
510 |
+
$oMod->saveModOptions();
|
511 |
|
512 |
+
$bSuccess = $oMod->isModuleEnabled() === $bEnabled;
|
513 |
if ( $bSuccess ) {
|
514 |
$sMessage = sprintf( '%s has been %s.', __( 'IP Manager', 'wp-simple-firewall' ),
|
515 |
+
$oMod->isModuleEnabled() ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
516 |
);
|
517 |
}
|
518 |
else {
|
537 |
if ( !empty( $sInput ) ) {
|
538 |
$bEnabled = $sInput === 'Y';
|
539 |
|
540 |
+
$oMod = $this->getCon()->getModule_LoginGuard();
|
|
|
541 |
if ( $bEnabled ) { // we don't disable the whole module
|
542 |
+
$oMod->setIsMainFeatureEnabled( true );
|
543 |
}
|
544 |
+
$oMod->setEnabledGaspCheck( $bEnabled );
|
545 |
+
$oMod->saveModOptions();
|
546 |
|
547 |
+
$bSuccess = $oMod->isEnabledGaspCheck() === $bEnabled;
|
548 |
if ( $bSuccess ) {
|
549 |
$sMessage = sprintf( '%s has been %s.', __( 'Login Guard', 'wp-simple-firewall' ),
|
550 |
$bEnabled ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
680 |
if ( !empty( $sInput ) ) {
|
681 |
$bEnabled = $sInput === 'Y';
|
682 |
|
683 |
+
/** @var ICWP_WPSF_FeatureHandler_CommentsFilter $oMod */
|
684 |
+
$oMod = $this->getCon()->getModule( 'comments_filter' );
|
685 |
if ( $bEnabled ) { // we don't disable the whole module
|
686 |
+
$oMod->setIsMainFeatureEnabled( true );
|
687 |
}
|
688 |
+
$oMod->setEnabledGasp( $bEnabled );
|
689 |
+
$oMod->saveModOptions();
|
690 |
|
691 |
+
$bSuccess = $oMod->isEnabledGaspCheck() === $bEnabled;
|
692 |
if ( $bSuccess ) {
|
693 |
$sMessage = sprintf( '%s has been %s.', __( 'Comment SPAM Protection', 'wp-simple-firewall' ),
|
694 |
$bEnabled ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
|
templates/html/plugin_badge.html
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
<style type="text/css">
|
2 |
-
#icwpWpsfSiteBadge {
|
3 |
-
background-color: rgba(241, 241, 241, 0.99);
|
4 |
-
border-radius: 5px;
|
5 |
-
bottom: 9px;
|
6 |
-
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.47);
|
7 |
-
box-sizing: content-box;
|
8 |
-
color: #000000;
|
9 |
-
height: 33px;
|
10 |
-
left: 9px;
|
11 |
-
opacity: 0.9;
|
12 |
-
padding: 7px 4px 7px 10px;
|
13 |
-
position: fixed;
|
14 |
-
text-align: left;
|
15 |
-
width: auto;
|
16 |
-
z-index: 10000;
|
17 |
-
-webkit-transition: width 0.5s; /* Safari */
|
18 |
-
transition: width 0.5s;
|
19 |
-
}
|
20 |
-
#icwpWpsfSiteBadge:hover {
|
21 |
-
opacity: 1.0;
|
22 |
-
}
|
23 |
-
#icwpWpsfSiteBadge a {
|
24 |
-
border: 0 none;
|
25 |
-
box-sizing: inherit;
|
26 |
-
color: inherit !important;
|
27 |
-
display: block;
|
28 |
-
line-height: 8px;
|
29 |
-
padding: 0;
|
30 |
-
text-decoration: none !important;
|
31 |
-
}
|
32 |
-
#icwpWpsfSiteBadge a:hover {
|
33 |
-
text-decoration: none;
|
34 |
-
}
|
35 |
-
#icwpWpsfSiteBadge .badge-text {
|
36 |
-
font-family: sans-serif;
|
37 |
-
font-size: 12px;
|
38 |
-
font-weight: normal;
|
39 |
-
line-height: 17px;
|
40 |
-
padding-left: 43px;
|
41 |
-
letter-spacing: 0;
|
42 |
-
-webkit-transition: opacity 1s; /* Safari */
|
43 |
-
transition: opacity 1s;
|
44 |
-
}
|
45 |
-
#icwpWpsfSiteBadge img {
|
46 |
-
float: left;
|
47 |
-
}
|
48 |
-
a#icwpWpsfCloseButton {
|
49 |
-
background-color: #ffffff;
|
50 |
-
border: 1px solid #ddd;
|
51 |
-
border-radius: 4px;
|
52 |
-
font-size: 10px;
|
53 |
-
height: 10px;
|
54 |
-
left: -2px;
|
55 |
-
line-height: 6px;
|
56 |
-
padding: 2px 1px 0 2px !important;
|
57 |
-
position: absolute;
|
58 |
-
text-align: center;
|
59 |
-
top: -3px;
|
60 |
-
width: 10px;
|
61 |
-
z-index: 1001;
|
62 |
-
}
|
63 |
-
#icwpWpsfCloseButton:hover {
|
64 |
-
cursor: pointer;
|
65 |
-
}
|
66 |
-
@media (max-width: 600px) {
|
67 |
-
#icwpWpsfSiteBadge {
|
68 |
-
height: 16px;
|
69 |
-
width: 112px;
|
70 |
-
}
|
71 |
-
#icwpWpsfSiteBadge .badge-text {
|
72 |
-
font-size: 8px;
|
73 |
-
font-weight: normal;
|
74 |
-
line-height: 10px;
|
75 |
-
padding-left: 20px;
|
76 |
-
}
|
77 |
-
#icwpWpsfSiteBadge img {
|
78 |
-
height: 16px;
|
79 |
-
width: 16px;
|
80 |
-
}
|
81 |
-
}
|
82 |
-
</style>
|
83 |
-
<div id="icwpWpsfSiteBadge">
|
84 |
-
<a id="icwpWpsfCloseButton" onclick="getElementById('icwpWpsfSiteBadge').remove();">x</a>
|
85 |
-
<a href="https://icwp.io/wpsecurityfirewall" target="_blank" title="This site is protected by the Shield Security plugin.">
|
86 |
-
<img src="%s" alt="%s Logo" />
|
87 |
-
<div class="badge-text">%s</div>
|
88 |
-
</a>
|
89 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/admin-notice-template.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php $sBaseDirName = __DIR__.DIRECTORY_SEPARATOR; ?>
|
2 |
-
|
3 |
-
<div id="<?php echo $unique_render_id; ?>"
|
4 |
-
class="<?php echo $notice_classes; ?> odp-admin-notice notice is-dismissible notice-<?php echo $icwp_admin_notice_template; ?>">
|
5 |
-
|
6 |
-
<div class="notice-icon">
|
7 |
-
<span class="dashicons dashicons-shield"></span>
|
8 |
-
</div>
|
9 |
-
|
10 |
-
<div class="notice-content">
|
11 |
-
<h3 class="notice-title"><?php echo $strings[ 'title' ]; ?></h3>
|
12 |
-
<?php require_once( $sBaseDirName.$icwp_admin_notice_template.'.php' ); ?>
|
13 |
-
</div>
|
14 |
-
|
15 |
-
<?php if ( !empty( $strings[ 'dismiss' ] ) ) : ?>
|
16 |
-
<div class="dismiss-p">
|
17 |
-
<a class="icwp-notice-dismiss" href="#"><?php echo $strings[ 'dismiss' ]; ?></a>
|
18 |
-
</div>
|
19 |
-
<?php endif; ?>
|
20 |
-
|
21 |
-
<div style="clear:both;"></div>
|
22 |
-
</div>
|
23 |
-
|
24 |
-
<script type="text/javascript">
|
25 |
-
jQuery( document ).on(
|
26 |
-
'click',
|
27 |
-
'#<?php echo $unique_render_id; ?> button.notice-dismiss, #<?php echo $unique_render_id; ?> a.icwp-notice-dismiss',
|
28 |
-
icwp_dismiss_notice
|
29 |
-
);
|
30 |
-
|
31 |
-
function icwp_dismiss_notice() {
|
32 |
-
var $oContainer = jQuery( '#<?php echo $unique_render_id; ?>' );
|
33 |
-
var aData = <?php echo $ajax[ 'dismiss_admin_notice' ]; ?>;
|
34 |
-
jQuery.get( ajaxurl, aData );
|
35 |
-
$oContainer.fadeOut( 500, function () {
|
36 |
-
$oContainer.remove();
|
37 |
-
} );
|
38 |
-
}
|
39 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/admin-users-restricted.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<?php echo $strings[ 'notice_message' ]; ?>
|
3 |
-
<br />→ <?php echo $strings[ 'unlock_link' ]; ?>
|
4 |
-
</p>
|
5 |
-
<p><?php echo $hrefs[ 'setting_page' ]; ?></p>
|
|
|
|
|
|
|
|
|
|
templates/php/notices/akismet-running.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<?php echo $strings['appears_running_akismet']; ?>
|
3 |
-
<br /><strong><?php echo $strings['not_recommended']; ?></strong>
|
4 |
-
<a href="<?php echo $hrefs['deactivate']; ?>"><?php echo $strings['click_to_deactivate']; ?></a>
|
5 |
-
</p>
|
|
|
|
|
|
|
|
|
|
templates/php/notices/allow-tracking.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<p><?php echo $strings[ 'want_to_track' ]; ?><?php echo $strings[ 'what_we_collect' ]; ?></p>
|
2 |
-
<p><?php echo $strings[ 'data_anon' ]; ?> <?php echo $strings[ 'can_turn_off' ]; ?>
|
3 |
-
<a target="_blank" href="<?php echo $hrefs[ 'link_to_see' ]; ?>"><?php echo $strings[ 'click_to_see' ]; ?></a>
|
4 |
-
</p>
|
5 |
-
<p>
|
6 |
-
<a href="#" class="button button-primary" id="icwpButtonPluginTrackingAgree">
|
7 |
-
Yes, I'll share this info!</a>
|
8 |
-
<a target="_blank" href="<?php echo $hrefs[ 'link_to_moreinfo' ]; ?>" class="button"
|
9 |
-
id="icwpButtonPluginTrackingMore">Hmm, I'd like to learn more, please.</a>
|
10 |
-
</p><p>
|
11 |
-
<a href="#" id="icwpButtonPluginTrackingDisagree" style="float:right">No, I don't want to help!</a>
|
12 |
-
</p>
|
13 |
-
|
14 |
-
<script type="text/javascript">
|
15 |
-
var $oContainer = jQuery( '#<?php echo $unique_render_id; ?>' );
|
16 |
-
|
17 |
-
jQuery( document ).on( 'click', 'a#icwpButtonPluginTrackingAgree', icwp_PluginTrackingAgree );
|
18 |
-
jQuery( document ).on( 'click', 'a#icwpButtonPluginTrackingDisagree', icwp_PluginTrackingDisagree );
|
19 |
-
|
20 |
-
function icwp_PluginTrackingAgree() {
|
21 |
-
icwp_PluginTrackingAgreement( 1 );
|
22 |
-
}
|
23 |
-
|
24 |
-
function icwp_PluginTrackingDisagree() {
|
25 |
-
icwp_PluginTrackingAgreement( 0 );
|
26 |
-
}
|
27 |
-
|
28 |
-
function icwp_PluginTrackingAgreement( bAgree ) {
|
29 |
-
var requestData = <?php echo $ajax[ 'set_plugin_tracking' ]; ?>;
|
30 |
-
requestData[ 'agree' ] = bAgree;
|
31 |
-
requestData[ 'hide' ] = 1;
|
32 |
-
requestData[ 'notice_id' ] = '<?php echo $notice_attributes[ 'notice_id' ]; ?>';
|
33 |
-
|
34 |
-
jQuery.get( ajaxurl, requestData );
|
35 |
-
$oContainer.fadeOut( 500, function () {
|
36 |
-
$oContainer.remove();
|
37 |
-
} );
|
38 |
-
}
|
39 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/certain-options-restricted.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<p><?php echo $strings['notice_message']; ?></p>
|
2 |
-
<p><?php echo $hrefs['setting_page']; ?></p>
|
|
|
|
templates/php/notices/does-not-meet-requirements.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<div class="error odp-admin-notice">
|
2 |
-
<ul style="list-style: inside none disc;">
|
3 |
-
<?php foreach ( $strings['requirements'] as $req ) : ?>
|
4 |
-
<li><?php echo $req; ?></li>
|
5 |
-
<?php endforeach; ?>
|
6 |
-
</ul>
|
7 |
-
<a href="<?php echo $hrefs['more_information']; ?>" target="_blank"><?php echo $strings['more_information']; ?></a>
|
8 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/flash-message.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<div class="updated odp-admin-notice">
|
2 |
-
<p><?php echo $message; ?></p>
|
3 |
-
</div>
|
|
|
|
|
|
templates/php/notices/override-forceoff.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<p><?php echo $strings[ 'message' ]; ?>. (<a href="#" id="ForceOffDelete"><?php echo $strings[ 'delete' ]; ?></a>)</p>
|
2 |
-
|
3 |
-
<script type="text/javascript">
|
4 |
-
jQuery( document ).on(
|
5 |
-
'click',
|
6 |
-
'a#ForceOffDelete',
|
7 |
-
delete_force_off
|
8 |
-
);
|
9 |
-
|
10 |
-
function delete_force_off() {
|
11 |
-
iCWP_WPSF_BodyOverlay.show();
|
12 |
-
jQuery.get( ajaxurl, <?php echo $ajax[ 'delete_forceoff' ]; ?> )
|
13 |
-
.always(
|
14 |
-
function () {
|
15 |
-
location.reload( true );
|
16 |
-
}
|
17 |
-
);
|
18 |
-
|
19 |
-
}
|
20 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/php54_version_warning.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<?php echo $strings[ 'not_supported' ]; ?>
|
3 |
-
<br /><?php echo $strings[ 'ask_host' ]; ?>
|
4 |
-
<br /><?php echo $strings[ 'questions' ]; ?>
|
5 |
-
<a href="<?php echo $hrefs[ 'help' ]; ?>" target="_blank"><?php echo $strings[ 'help' ]; ?></a>
|
6 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/plugin-failed-to-load.php
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<div class="error odp-admin-notice">
|
2 |
-
<h3><?php echo $strings['summary_title']; ?></h3>
|
3 |
-
<p><?php echo $strings['more_information']; ?></p>
|
4 |
-
</div>
|
|
|
|
|
|
|
|
templates/php/notices/plugin-mailing-list-signup.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<div id="mc_embed_signup">
|
2 |
-
<form class="form form-inline validate" action="<?php echo $hrefs[ 'form_action' ]; ?>"
|
3 |
-
method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" novalidate>
|
4 |
-
<p><?php echo $strings[ 'summary' ]; ?></p>
|
5 |
-
<input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL"
|
6 |
-
placeholder="<?php echo $strings[ 'your_email' ]; ?>" />
|
7 |
-
<input type="text" value="" name="FNAME" class="" id="mce-FNAME"
|
8 |
-
placeholder="<?php echo $strings[ 'your_name' ]; ?>" />
|
9 |
-
<input type="hidden" value="<?php echo $install_days; ?>" name="DAYS" class="" id="mce-DAYS" />
|
10 |
-
|
11 |
-
<br />
|
12 |
-
<label>
|
13 |
-
<input type="checkbox" style="margin:12px 8px" id="OptinConsent" />I certify that I have read and agree to the
|
14 |
-
<a href="<?php echo $hrefs[ 'privacy_policy' ]; ?>" target="_blank">Privacy Policy</a>
|
15 |
-
</label>
|
16 |
-
<br />
|
17 |
-
|
18 |
-
<button type="submit" name="subscribe" id="mc-embedded-subscribe"
|
19 |
-
class="button button-primary"><?php echo $strings[ 'yes' ]; ?></button>
|
20 |
-
<br /><?php echo $strings[ 'we_dont_spam' ]; ?>
|
21 |
-
<div id="mce-responses" class="clear">
|
22 |
-
<div class="response" id="mce-error-response" style="display:none"></div>
|
23 |
-
<div class="response" id="mce-success-response" style="display:none"></div>
|
24 |
-
</div>
|
25 |
-
<div style="position: absolute; left: -5000px;"><input type="text" name="b_e736870223389e44fb8915c9a_0e1d527259"
|
26 |
-
tabindex="-1" value=""></div>
|
27 |
-
<div class="clear"></div>
|
28 |
-
</form>
|
29 |
-
|
30 |
-
<script type="text/javascript">
|
31 |
-
jQuery( document ).ready( function ( $ ) {
|
32 |
-
var $oSubButton = $( 'form#mc-embedded-subscribe-form button' );
|
33 |
-
var $oCheck = $( '#OptinConsent' );
|
34 |
-
$oSubButton.attr( "disabled", "disabled" );
|
35 |
-
$( document ).on( 'change', $oCheck, function () {
|
36 |
-
$oSubButton.prop( "disabled", ! $oCheck.is(":checked") );
|
37 |
-
} );
|
38 |
-
} );
|
39 |
-
</script>
|
40 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/plugin-update-available.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<p><a href="<?php echo $hrefs['upgrade_link']; ?>"><?php echo $strings['click_update']; ?></a></p>
|
|
templates/php/notices/rate-plugin.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<p>We need your help to spread the word about Shield Security :)</p>
|
2 |
-
<p>Talking about us in your WP community, and how effective Shield has been for your site,
|
3 |
-
will lend us your invaluable support.</p>
|
4 |
-
<p>You'll help others find us; help them to trust us; and of course, you'll help build a more secure
|
5 |
-
WordPress community.
|
6 |
-
<br/><span style="text-decoration: underline">We simply need your help help to reach others</span>...</p>
|
7 |
-
<p>
|
8 |
-
<a href="https://icwp.io/wpsfreview" class="button button-primary" target="_blank">
|
9 |
-
Please, could you leave us a review on WordPress.org?</a>
|
10 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/notices/translate-plugin.php
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<?php echo $strings['like_to_help']; ?>
|
3 |
-
<?php echo $strings['head_over_to']; ?> <a href="<?php echo $hrefs['translate']; ?>" target="_blank"> <strong><?php echo $strings['site_url']; ?></a></strong>
|
4 |
-
</p>
|
|
|
|
|
|
|
|
templates/php/notices/visitor-whitelisted.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<p>
|
2 |
-
<?php echo $strings['notice_message']; ?>
|
3 |
-
<br/>- <strong><?php echo $strings['including_message']; ?></strong>
|
4 |
-
<br/><?php echo $strings['your_ip']; ?>
|
5 |
-
</p>
|
|
|
|
|
|
|
|
|
|
templates/php/notices/wizard_welcome.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<p><strong><a href="<?php echo $hrefs[ 'wizard' ]; ?>" target="_blank">Launch Setup Wizard</a></strong>
|
2 |
-
- <?php echo $strings[ 'setup' ]; ?></p>
|
|
|
|
templates/php/snippets/plugin_badge.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<style type="text/css">
|
2 |
-
#icwpWpsfSiteBadge {
|
3 |
-
background-color: rgba(241, 241, 241, 0.99);
|
4 |
-
border-radius: 5px;
|
5 |
-
bottom: 9px;
|
6 |
-
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.47);
|
7 |
-
box-sizing: content-box;
|
8 |
-
color: #000000;
|
9 |
-
height: 33px;
|
10 |
-
left: 9px;
|
11 |
-
opacity: 0.8;
|
12 |
-
padding: 7px 4px 7px 10px;
|
13 |
-
position: fixed;
|
14 |
-
text-align: left;
|
15 |
-
width: 38px;
|
16 |
-
z-index: 10000;
|
17 |
-
text-wrap: none;
|
18 |
-
|
19 |
-
-webkit-transition: width 0.25s; /* Safari */
|
20 |
-
transition: width 0.25s;
|
21 |
-
transition-delay: 1s
|
22 |
-
}
|
23 |
-
#icwpWpsfSiteBadge:hover {
|
24 |
-
opacity: 1.0;
|
25 |
-
width: 220px;
|
26 |
-
transition-delay: 0s;
|
27 |
-
}
|
28 |
-
#icwpWpsfSiteBadge a {
|
29 |
-
border: 0 none;
|
30 |
-
box-sizing: inherit;
|
31 |
-
color: inherit !important;
|
32 |
-
display: block;
|
33 |
-
line-height: 8px;
|
34 |
-
padding: 0;
|
35 |
-
text-decoration: none !important;
|
36 |
-
}
|
37 |
-
#icwpWpsfSiteBadge a:hover {
|
38 |
-
text-decoration: none;
|
39 |
-
}
|
40 |
-
#icwpWpsfSiteBadge .badge-text {
|
41 |
-
font-family: sans-serif;
|
42 |
-
font-size: 12px;
|
43 |
-
font-weight: normal;
|
44 |
-
line-height: 17px;
|
45 |
-
padding-left: 43px;
|
46 |
-
letter-spacing: 0;
|
47 |
-
-webkit-transition: opacity 1s; /* Safari */
|
48 |
-
|
49 |
-
opacity: 0;
|
50 |
-
transition: opacity 0.3s;
|
51 |
-
transition-delay: 1s;
|
52 |
-
}
|
53 |
-
#icwpWpsfSiteBadge:hover .badge-text {
|
54 |
-
opacity: 1;
|
55 |
-
transition-delay: 0s;
|
56 |
-
}
|
57 |
-
#icwpWpsfSiteBadge img {
|
58 |
-
float: left;
|
59 |
-
}
|
60 |
-
a#icwpWpsfCloseButton {
|
61 |
-
background-color: #ffffff;
|
62 |
-
border: 1px solid #ddd;
|
63 |
-
border-radius: 4px;
|
64 |
-
display: none;
|
65 |
-
font-size: 10px;
|
66 |
-
height: 10px;
|
67 |
-
left: -2px;
|
68 |
-
line-height: 6px;
|
69 |
-
padding: 2px 1px 0 2px !important;
|
70 |
-
position: absolute;
|
71 |
-
text-align: center;
|
72 |
-
top: -3px;
|
73 |
-
width: 10px;
|
74 |
-
z-index: 1001;
|
75 |
-
}
|
76 |
-
#icwpWpsfSiteBadge:hover a#icwpWpsfCloseButton {
|
77 |
-
display: block;
|
78 |
-
}
|
79 |
-
#icwpWpsfCloseButton:hover {
|
80 |
-
cursor: pointer;
|
81 |
-
}
|
82 |
-
@media (max-width: 600px) {
|
83 |
-
#icwpWpsfSiteBadge {
|
84 |
-
height: 16px;
|
85 |
-
width: 112px;
|
86 |
-
}
|
87 |
-
#icwpWpsfSiteBadge .badge-text {
|
88 |
-
font-size: 8px;
|
89 |
-
font-weight: normal;
|
90 |
-
line-height: 10px;
|
91 |
-
padding-left: 20px;
|
92 |
-
}
|
93 |
-
#icwpWpsfSiteBadge img {
|
94 |
-
height: 16px;
|
95 |
-
width: 16px;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
</style>
|
99 |
-
<div id="icwpWpsfSiteBadge">
|
100 |
-
<a id="icwpWpsfCloseButton">x</a>
|
101 |
-
<a href="https://icwp.io/wpsecurityfirewall" target="_blank"
|
102 |
-
title="This site is protected by the Shield Security plugin."
|
103 |
-
<?php echo $flags[ 'nofollow' ] ? 'rel="nofollow"' : '' ?>
|
104 |
-
><img src="<?php echo $hrefs[ 'logo' ]; ?>" alt="<?php echo $strings[ 'name' ]; ?> Logo" />
|
105 |
-
<div class="badge-text"><?php echo $strings[ 'link' ]; ?></div>
|
106 |
-
</a>
|
107 |
-
</div>
|
108 |
-
|
109 |
-
<script type="text/javascript">
|
110 |
-
let iCWP_WPSF_PluginBadgeClose = new function () {
|
111 |
-
|
112 |
-
let closeBadge = function () {
|
113 |
-
|
114 |
-
let aData = <?php echo $ajax[ 'plugin_badge_close' ]; ?>;
|
115 |
-
jQuery.post( aData[ 'ajaxurl' ], aData,
|
116 |
-
function ( oResponse ) {
|
117 |
-
}
|
118 |
-
).always( function () {
|
119 |
-
jQuery( '#icwpWpsfSiteBadge' ).remove();
|
120 |
-
}
|
121 |
-
);
|
122 |
-
|
123 |
-
return true;
|
124 |
-
};
|
125 |
-
|
126 |
-
this.initialise = function () {
|
127 |
-
jQuery( document ).ready( function () {
|
128 |
-
jQuery( document ).on( "click", "a#icwpWpsfCloseButton", closeBadge );
|
129 |
-
} );
|
130 |
-
};
|
131 |
-
|
132 |
-
}();
|
133 |
-
|
134 |
-
iCWP_WPSF_PluginBadgeClose.initialise();
|
135 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/php/snippets/plugin_badge_widget.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<style type="text/css">
|
2 |
-
.icwp_wpsf_site_badge {
|
3 |
-
background-color: rgba(255, 255, 255, 0.9);
|
4 |
-
box-sizing: content-box;
|
5 |
-
color: #000000;
|
6 |
-
height: 33px;
|
7 |
-
padding: 7px 7px 4px;
|
8 |
-
text-align: left;
|
9 |
-
z-index: 100;
|
10 |
-
}
|
11 |
-
.icwp_wpsf_site_badge a {
|
12 |
-
border: 0 none;
|
13 |
-
box-sizing: inherit;
|
14 |
-
color: inherit !important;
|
15 |
-
display: block;
|
16 |
-
text-decoration: none !important;
|
17 |
-
}
|
18 |
-
.icwp_wpsf_site_badge a:hover {
|
19 |
-
text-decoration: none;
|
20 |
-
}
|
21 |
-
.icwp_wpsf_site_badge .badge-text {
|
22 |
-
font-size: 10px;
|
23 |
-
line-height: 17px;
|
24 |
-
padding-left: 43px;
|
25 |
-
}
|
26 |
-
.icwp_wpsf_site_badge img {
|
27 |
-
float: left;
|
28 |
-
}
|
29 |
-
</style>
|
30 |
-
<div id="icwpWpsfSiteBadge" class="icwp_wpsf_site_badge">
|
31 |
-
<a href="https://icwp.io/wpsecurityfirewall" target="_blank" title="<?php echo $strings['plugin_name']; ?>">
|
32 |
-
<img src="<?php echo $hrefs['img_src']; ?>" alt="<?php echo $strings['plugin_name']; ?> Logo" />
|
33 |
-
<div class="badge-text">
|
34 |
-
This Site Is Protected By <span style="font-style: italic;">The</span><br/><?php echo $strings['plugin_name']; ?> →
|
35 |
-
</div>
|
36 |
-
</a>
|
37 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/twig/wpadmin_pages/insights/audit/audit_table.twig
CHANGED
@@ -22,10 +22,11 @@
|
|
22 |
<div class="" id="">
|
23 |
<form id="AuditFilterForm" autocomplete="off">
|
24 |
<div class="form-group">
|
25 |
-
<label for="
|
26 |
-
<select id="
|
27 |
-
|
28 |
-
|
|
|
29 |
{% endfor %}
|
30 |
</select>
|
31 |
</div>
|
@@ -40,9 +41,9 @@
|
|
40 |
</select>
|
41 |
</div>
|
42 |
<div class="form-group">
|
43 |
-
<label class="form-check-label" for="
|
44 |
{{ strings.exclude_your_ip }}?</label>
|
45 |
-
<input type="checkbox" id="
|
46 |
class="form-control" />
|
47 |
</div>
|
48 |
|
22 |
<div class="" id="">
|
23 |
<form id="AuditFilterForm" autocomplete="off">
|
24 |
<div class="form-group">
|
25 |
+
<label for="_fEvent">{{ strings.event }}</label>
|
26 |
+
<select id="_fEvent" name="fEvent" class="form-control">
|
27 |
+
<option value="">-- {{ strings.select }} --</option>
|
28 |
+
{% for event_key,event_name in vars.events_for_select %}
|
29 |
+
<option value="{{ event_key }}">{{ event_name }}</option>
|
30 |
{% endfor %}
|
31 |
</select>
|
32 |
</div>
|
41 |
</select>
|
42 |
</div>
|
43 |
<div class="form-group">
|
44 |
+
<label class="form-check-label" for="_fExcludeYou" title="{{ strings.exclude_your_ip_tooltip }}">
|
45 |
{{ strings.exclude_your_ip }}?</label>
|
46 |
+
<input type="checkbox" id="_fExcludeYou" name="fExcludeYou" value="Y"
|
47 |
class="form-control" />
|
48 |
</div>
|
49 |
|
templates/twig/wpadmin_pages/insights/traffic/traffic_table.twig
CHANGED
@@ -69,9 +69,9 @@
|
|
69 |
</select>
|
70 |
</div>
|
71 |
<div class="form-group">
|
72 |
-
<label class="form-check-label" for="
|
73 |
{{ strings.exclude_your_ip }}?</label>
|
74 |
-
<input type="checkbox" id="
|
75 |
class="form-control" />
|
76 |
</div>
|
77 |
|
69 |
</select>
|
70 |
</div>
|
71 |
<div class="form-group">
|
72 |
+
<label class="form-check-label" for="_fExcludeYou" title="{{ strings.exclude_your_ip_tooltip }}">
|
73 |
{{ strings.exclude_your_ip }}?</label>
|
74 |
+
<input type="checkbox" id="_fExcludeYou" name="fExcludeYou" value="Y"
|
75 |
class="form-control" />
|
76 |
</div>
|
77 |
|