Shield Security for WordPress - Version 15.0.1

Version Description

Download this release

Release Info

Developer paultgoodchild
Plugin Icon 128x128 Shield Security for WordPress
Version 15.0.1
Comparing to
See all releases

Code changes from version 15.0.0 to 15.0.1

Files changed (67) hide show
  1. cl.json +55 -8
  2. config/audit_trail.json +11 -11
  3. config/deprecated/audit_trail.php +11 -11
  4. config/deprecated/firewall.php +1 -1
  5. config/deprecated/hack_protect.php +1 -0
  6. config/deprecated/plugin.php +1 -1
  7. config/firewall.json +1 -1
  8. config/hack_protect.json +1 -0
  9. config/plugin.json +1 -1
  10. icwp-wpsf.php +1 -1
  11. init.php +8 -4
  12. plugin-spec.php +4 -4
  13. plugin.json +4 -4
  14. readme.txt +1 -1
  15. resources/css/global-plugin.css +1 -0
  16. src/lib/src/Blocks/RenderBlockPages/RenderBlockAuthorFishing.php +1 -1
  17. src/lib/src/Blocks/RenderBlockPages/RenderBlockFirewall.php +1 -1
  18. src/lib/src/Blocks/RenderBlockPages/RenderBlockIP.php +1 -1
  19. src/lib/src/Controller/Config/Ops/LoadConfig.php +11 -2
  20. src/lib/src/Controller/Controller.php +5 -39
  21. src/lib/src/Controller/Exceptions/VersionMismatchException.php +7 -0
  22. src/lib/src/Modules/AuditTrail/AjaxHandler.php +1 -1
  23. src/lib/src/Modules/AuditTrail/ModCon.php +2 -2
  24. src/lib/src/Modules/AuditTrail/Strings.php +6 -6
  25. src/lib/src/Modules/AuditTrail/UI.php +1 -1
  26. src/lib/src/Modules/Firewall/Strings.php +1 -1
  27. src/lib/src/Modules/HackGuard/Lib/Reports/ScanRepairs.php +1 -1
  28. src/lib/src/Modules/HackGuard/Lib/ScanTables/LoadRawTableData.php +0 -2
  29. src/lib/src/Modules/HackGuard/Lib/ScanTables/Modals/FileContents.php +2 -10
  30. src/lib/src/Modules/HackGuard/Lib/ScanTables/Modals/ScanItemView.php +10 -17
  31. src/lib/src/Modules/HackGuard/Options.php +2 -7
  32. src/lib/src/Modules/HackGuard/Render/ScanResults/SectionMalware.php +7 -8
  33. src/lib/src/Modules/HackGuard/Render/ScanResults/SectionPluginThemesBase.php +15 -15
  34. src/lib/src/Modules/HackGuard/Render/ScanResults/SectionPlugins.php +4 -5
  35. src/lib/src/Modules/HackGuard/Render/ScanResults/SectionThemes.php +4 -7
  36. src/lib/src/Modules/HackGuard/Render/ScanResults/SectionWordpress.php +7 -8
  37. src/lib/src/Modules/HackGuard/Scan/Controller/Afs.php +4 -5
  38. src/lib/src/Modules/IPs/Lib/IpAnalyse/BuildDisplay.php +1 -1
  39. src/lib/src/Modules/IPs/Strings.php +1 -1
  40. src/lib/src/Modules/Insights/Lib/MeterAnalysis/Components.php +3 -3
  41. src/lib/src/Modules/Insights/Lib/MeterAnalysis/MeterFirewall.php +1 -1
  42. src/lib/src/Modules/Insights/Lib/MeterAnalysis/MeterIntegrity.php +1 -1
  43. src/lib/src/Modules/Insights/Lib/NavMenuBuilder.php +1 -1
  44. src/lib/src/Modules/Insights/UI.php +2 -2
  45. src/lib/src/Modules/License/UI.php +1 -1
  46. src/lib/src/Modules/Plugin/AdminNotices.php +1 -1
  47. src/lib/src/Modules/Plugin/Debug.php +1 -1
  48. src/lib/src/Modules/Plugin/Lib/Debug/Collate.php +1 -1
  49. src/lib/src/Modules/Plugin/Strings.php +1 -1
  50. src/lib/src/Modules/Traffic/AjaxHandler.php +1 -1
  51. src/lib/src/Render/LocateTemplateDirs.php +6 -4
  52. src/lib/src/Scans/Afs/Processing/MalFalsePositiveReporter.php +2 -1
  53. src/lib/src/Scans/Afs/ResultItem.php +3 -0
  54. src/lib/vendor/composer/autoload_classmap.php +3 -0
  55. src/lib/vendor/composer/autoload_static.php +3 -0
  56. src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php +37 -8
  57. src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php +14 -7
  58. src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Versions.php +2 -17
  59. src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Theme/Api.php +13 -8
  60. src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Theme/Versions.php +2 -17
  61. src/wizards/plugin.php +3 -3
  62. templates/twig/admin/admin_dashboard_widget.twig +3 -8
  63. templates/twig/pages/block/block_page_authorfishing.twig +1 -0
  64. templates/twig/pages/block/block_page_firewall.twig +1 -0
  65. templates/twig/pages/block/block_page_standard.twig +3 -6
  66. templates/twig/wizard/slides/gdpr/results.twig +1 -1
  67. templates/twig/wizard/slides/welcome/audit_trail.twig +3 -3
cl.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "15.0": {
3
  "version": "15.0",
4
- "released_at": 1652184000,
5
  "hrefs": {
6
  "release": "https://shsec.io/shieldrelease150",
7
  "upgrade": "https://shsec.io/shieldupgradeguide150"
@@ -37,17 +37,17 @@
37
  },
38
  {
39
  "type": "new",
40
- "title": "Removed: Legacy Comment SPAM Detection",
41
  "description": [
42
- "We've completely removed the older, less reliable comment spam detection using Javascript and CAPTCHAs.",
43
- "Please use the newer AntiBot Detection Engine."
44
  ]
45
  },
46
  {
47
  "type": "new",
48
- "title": "All-New WordPress Dashboard Widget",
49
  "description": [
50
- "The original WordPress Admin Dashboard widget was pretty basic, so we've completely revamped it with some of your latest site activity."
 
51
  ]
52
  },
53
  {
@@ -81,7 +81,7 @@
81
  "type": "improved",
82
  "title": "Author Discovery/Fishing",
83
  "description": [
84
- "This feature is now a Bot Signal which is logged in the Audit Trail and triggers offenses."
85
  ]
86
  },
87
  {
@@ -93,9 +93,56 @@
93
  },
94
  {
95
  "type": "improved",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  "title": "Option Removed: Auto-Filter Scan Results",
97
  "description": [
98
- "Shield will now filter unnecessary scan results automatically. This can be adjusted using a WP filter."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  ]
100
  }
101
  ],
1
  {
2
  "15.0": {
3
  "version": "15.0",
4
+ "released_at": 1652090000,
5
  "hrefs": {
6
  "release": "https://shsec.io/shieldrelease150",
7
  "upgrade": "https://shsec.io/shieldupgradeguide150"
37
  },
38
  {
39
  "type": "new",
40
+ "title": "All-New WordPress Dashboard Widget",
41
  "description": [
42
+ "The original WordPress Admin Dashboard widget was pretty basic, so we've completely revamped it with some of your latest site activity."
 
43
  ]
44
  },
45
  {
46
  "type": "new",
47
+ "title": "Removed: Legacy Comment SPAM Detection",
48
  "description": [
49
+ "We've completely removed the older, less reliable comment spam detection using Javascript and CAPTCHAs.",
50
+ "Please use the newer AntiBot Detection Engine."
51
  ]
52
  },
53
  {
81
  "type": "improved",
82
  "title": "Author Discovery/Fishing",
83
  "description": [
84
+ "This feature is now a Bot Signal which is recorded in the Activity Log and triggers offenses."
85
  ]
86
  },
87
  {
93
  },
94
  {
95
  "type": "improved",
96
+ "title": "A New WP Filter To Add Custom Shield Template Directory",
97
+ "description": [
98
+ "If you're looking to adjust some of our page templates, such as the block pages, you can now provide custom templates more easily using the new filter."
99
+ ]
100
+ },
101
+ {
102
+ "type": "changed",
103
+ "title": "Audit Trail Renamed to Activity Log",
104
+ "description": [
105
+ ]
106
+ },
107
+ {
108
+ "type": "changed",
109
+ "pro_only": false,
110
+ "title": "Deprecated: Options For CAPTCHA and GASP Bot Checking On WordPress Login Forms",
111
+ "description": [
112
+ "The options to use CAPTCHA and/or GASP Bot Checking for WordPress Login SPAM has been deprecated.",
113
+ "These options are replaced with the AntiBot Detection Engine and will be completely removed in a future release."
114
+ ]
115
+ },
116
+ {
117
+ "type": "changed",
118
  "title": "Option Removed: Auto-Filter Scan Results",
119
  "description": [
120
+ "Shield will now filter unnecessary scan results automatically. This option can now be adjusted using a WP filter."
121
+ ]
122
+ },
123
+ {
124
+ "type": "changed",
125
+ "title": "Option Removed: XML-RPC bypass option",
126
+ "description": [
127
+ "This option can now be adjusted using a WP filter."
128
+ ]
129
+ },
130
+ {
131
+ "type": "changed",
132
+ "title": "Options Removed: XML-RPC bypass option",
133
+ "description": [
134
+ "This option can now be adjusted using a WP filter."
135
+ ]
136
+ },
137
+ {
138
+ "type": "fixed",
139
+ "title": "Numerous bug fixes",
140
+ "description": [
141
+ ],
142
+ "list": [
143
+ "Broken password reset links in some cases when using hidden login page",
144
+ "fix for some scan results browsing errors",
145
+ "help ensure forward compatibility for sites with newer TWIG libraries also installed"
146
  ]
147
  }
148
  ],
config/audit_trail.json CHANGED
@@ -2,10 +2,10 @@
2
  "slug": "audit_trail",
3
  "properties": {
4
  "slug": "audit_trail",
5
- "name": "Audit Trail",
6
  "load_priority": 11,
7
  "menu_priority": 40,
8
- "sidebar_name": "Audit Trail",
9
  "show_module_menu_item": false,
10
  "show_module_options": true,
11
  "storage_key": "audit_trail",
@@ -26,7 +26,7 @@
26
  },
27
  "menu_items": [
28
  {
29
- "title": "Audit Trail",
30
  "slug": "audit-redirect"
31
  }
32
  ],
@@ -49,7 +49,7 @@
49
  "title_short": "Log To DB",
50
  "beacon_id": 241,
51
  "summary": [
52
- "Purpose - Provides finer control over the audit trail itself.",
53
  "Recommendation - These settings are dependent on your requirements."
54
  ]
55
  },
@@ -59,18 +59,18 @@
59
  "title_short": "Log To File",
60
  "beacon_id": 241,
61
  "summary": [
62
- "Purpose - Provides finer control over the audit trail itself.",
63
  "Recommendation - These settings are dependent on your requirements."
64
  ]
65
  },
66
  {
67
  "slug": "section_enable_plugin_feature_audit_trail",
68
- "title": "Enable Module: Audit Trail",
69
  "title_short": "Disable Module",
70
  "beacon_id": 241,
71
  "summary": [
72
- "Purpose - The Audit Trail is designed so you can look back on events and analyse what happened and what may have gone wrong.",
73
- "Recommendation - Keep the Audit Trail feature turned on."
74
  ]
75
  },
76
  {
@@ -88,9 +88,9 @@
88
  "link_info": "https://shsec.io/5p",
89
  "link_blog": "https://shsec.io/a1",
90
  "beacon_id": 241,
91
- "name": "Enable Audit Trail",
92
- "summary": "Enable (or Disable) The Audit Trail module",
93
- "description": "Un-Checking this option will completely disable the Audit Trail module"
94
  },
95
  {
96
  "key": "log_level_db",
2
  "slug": "audit_trail",
3
  "properties": {
4
  "slug": "audit_trail",
5
+ "name": "Activity Log",
6
  "load_priority": 11,
7
  "menu_priority": 40,
8
+ "sidebar_name": "Activity Log",
9
  "show_module_menu_item": false,
10
  "show_module_options": true,
11
  "storage_key": "audit_trail",
26
  },
27
  "menu_items": [
28
  {
29
+ "title": "Activity Log",
30
  "slug": "audit-redirect"
31
  }
32
  ],
49
  "title_short": "Log To DB",
50
  "beacon_id": 241,
51
  "summary": [
52
+ "Purpose - Provides finer control over the Activity Log itself.",
53
  "Recommendation - These settings are dependent on your requirements."
54
  ]
55
  },
59
  "title_short": "Log To File",
60
  "beacon_id": 241,
61
  "summary": [
62
+ "Purpose - Provides finer control over the Activity Log itself.",
63
  "Recommendation - These settings are dependent on your requirements."
64
  ]
65
  },
66
  {
67
  "slug": "section_enable_plugin_feature_audit_trail",
68
+ "title": "Enable Module: Activity Log",
69
  "title_short": "Disable Module",
70
  "beacon_id": 241,
71
  "summary": [
72
+ "Purpose - The Activity Log is designed so you can look back on events and analyse what happened and what may have gone wrong.",
73
+ "Recommendation - Keep the Activity Log feature turned on."
74
  ]
75
  },
76
  {
88
  "link_info": "https://shsec.io/5p",
89
  "link_blog": "https://shsec.io/a1",
90
  "beacon_id": 241,
91
+ "name": "Enable Activity Log",
92
+ "summary": "Enable (or Disable) The Activity Log module",
93
+ "description": "Un-Checking this option will completely disable the Activity Log module"
94
  },
95
  {
96
  "key": "log_level_db",
config/deprecated/audit_trail.php CHANGED
@@ -2,10 +2,10 @@
2
  "slug": "audit_trail",
3
  "properties": {
4
  "slug": "audit_trail",
5
- "name": "Audit Trail",
6
  "load_priority": 11,
7
  "menu_priority": 40,
8
- "sidebar_name": "Audit Trail",
9
  "show_module_menu_item": false,
10
  "show_module_options": true,
11
  "storage_key": "audit_trail",
@@ -26,7 +26,7 @@
26
  },
27
  "menu_items": [
28
  {
29
- "title": "Audit Trail",
30
  "slug": "audit-redirect"
31
  }
32
  ],
@@ -49,7 +49,7 @@
49
  "title_short": "Log To DB",
50
  "beacon_id": 241,
51
  "summary": [
52
- "Purpose - Provides finer control over the audit trail itself.",
53
  "Recommendation - These settings are dependent on your requirements."
54
  ]
55
  },
@@ -59,18 +59,18 @@
59
  "title_short": "Log To File",
60
  "beacon_id": 241,
61
  "summary": [
62
- "Purpose - Provides finer control over the audit trail itself.",
63
  "Recommendation - These settings are dependent on your requirements."
64
  ]
65
  },
66
  {
67
  "slug": "section_enable_plugin_feature_audit_trail",
68
- "title": "Enable Module: Audit Trail",
69
  "title_short": "Disable Module",
70
  "beacon_id": 241,
71
  "summary": [
72
- "Purpose - The Audit Trail is designed so you can look back on events and analyse what happened and what may have gone wrong.",
73
- "Recommendation - Keep the Audit Trail feature turned on."
74
  ]
75
  },
76
  {
@@ -88,9 +88,9 @@
88
  "link_info": "https://shsec.io/5p",
89
  "link_blog": "https://shsec.io/a1",
90
  "beacon_id": 241,
91
- "name": "Enable Audit Trail",
92
- "summary": "Enable (or Disable) The Audit Trail module",
93
- "description": "Un-Checking this option will completely disable the Audit Trail module"
94
  },
95
  {
96
  "key": "log_level_db",
2
  "slug": "audit_trail",
3
  "properties": {
4
  "slug": "audit_trail",
5
+ "name": "Activity Log",
6
  "load_priority": 11,
7
  "menu_priority": 40,
8
+ "sidebar_name": "Activity Log",
9
  "show_module_menu_item": false,
10
  "show_module_options": true,
11
  "storage_key": "audit_trail",
26
  },
27
  "menu_items": [
28
  {
29
+ "title": "Activity Log",
30
  "slug": "audit-redirect"
31
  }
32
  ],
49
  "title_short": "Log To DB",
50
  "beacon_id": 241,
51
  "summary": [
52
+ "Purpose - Provides finer control over the Activity Log itself.",
53
  "Recommendation - These settings are dependent on your requirements."
54
  ]
55
  },
59
  "title_short": "Log To File",
60
  "beacon_id": 241,
61
  "summary": [
62
+ "Purpose - Provides finer control over the Activity Log itself.",
63
  "Recommendation - These settings are dependent on your requirements."
64
  ]
65
  },
66
  {
67
  "slug": "section_enable_plugin_feature_audit_trail",
68
+ "title": "Enable Module: Activity Log",
69
  "title_short": "Disable Module",
70
  "beacon_id": 241,
71
  "summary": [
72
+ "Purpose - The Activity Log is designed so you can look back on events and analyse what happened and what may have gone wrong.",
73
+ "Recommendation - Keep the Activity Log feature turned on."
74
  ]
75
  },
76
  {
88
  "link_info": "https://shsec.io/5p",
89
  "link_blog": "https://shsec.io/a1",
90
  "beacon_id": 241,
91
+ "name": "Enable Activity Log",
92
+ "summary": "Enable (or Disable) The Activity Log module",
93
+ "description": "Un-Checking this option will completely disable the Activity Log module"
94
  },
95
  {
96
  "key": "log_level_db",
config/deprecated/firewall.php CHANGED
@@ -32,7 +32,7 @@
32
  "beacon_id": 333,
33
  "summary": [
34
  "Here you choose what kind of malicious data to scan for.",
35
- "Recommendation - Turn on as many options here as you can. If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Audit Trail."
36
  ]
37
  },
38
  {
32
  "beacon_id": 333,
33
  "summary": [
34
  "Here you choose what kind of malicious data to scan for.",
35
+ "Recommendation - Turn on as many options here as you can. If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Activity Log."
36
  ]
37
  },
38
  {
config/deprecated/hack_protect.php CHANGED
@@ -565,6 +565,7 @@
565
  "wp-content/uploads/bb-plugin/cache/*",
566
  "wp-content/uploads/cache/wpml/twig/*",
567
  "wp-content/cache/*",
 
568
  "*/error_log",
569
  "*/php_error_log",
570
  "*/mail.log",
565
  "wp-content/uploads/bb-plugin/cache/*",
566
  "wp-content/uploads/cache/wpml/twig/*",
567
  "wp-content/cache/*",
568
+ "src/lib/src/Rules/rules.json",
569
  "*/error_log",
570
  "*/php_error_log",
571
  "*/mail.log",
config/deprecated/plugin.php CHANGED
@@ -681,7 +681,7 @@
681
  "title": "Security Admin"
682
  },
683
  "audit_trail": {
684
- "title": "Audit Trail"
685
  },
686
  "ips": {
687
  "title": "IP Blacklist"
681
  "title": "Security Admin"
682
  },
683
  "audit_trail": {
684
+ "title": "Activity Log"
685
  },
686
  "ips": {
687
  "title": "IP Blacklist"
config/firewall.json CHANGED
@@ -32,7 +32,7 @@
32
  "beacon_id": 333,
33
  "summary": [
34
  "Here you choose what kind of malicious data to scan for.",
35
- "Recommendation - Turn on as many options here as you can. If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Audit Trail."
36
  ]
37
  },
38
  {
32
  "beacon_id": 333,
33
  "summary": [
34
  "Here you choose what kind of malicious data to scan for.",
35
+ "Recommendation - Turn on as many options here as you can. If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Activity Log."
36
  ]
37
  },
38
  {
config/hack_protect.json CHANGED
@@ -565,6 +565,7 @@
565
  "wp-content/uploads/bb-plugin/cache/*",
566
  "wp-content/uploads/cache/wpml/twig/*",
567
  "wp-content/cache/*",
 
568
  "*/error_log",
569
  "*/php_error_log",
570
  "*/mail.log",
565
  "wp-content/uploads/bb-plugin/cache/*",
566
  "wp-content/uploads/cache/wpml/twig/*",
567
  "wp-content/cache/*",
568
+ "src/lib/src/Rules/rules.json",
569
  "*/error_log",
570
  "*/php_error_log",
571
  "*/mail.log",
config/plugin.json CHANGED
@@ -681,7 +681,7 @@
681
  "title": "Security Admin"
682
  },
683
  "audit_trail": {
684
- "title": "Audit Trail"
685
  },
686
  "ips": {
687
  "title": "IP Blacklist"
681
  "title": "Security Admin"
682
  },
683
  "audit_trail": {
684
+ "title": "Activity Log"
685
  },
686
  "ips": {
687
  "title": "IP Blacklist"
icwp-wpsf.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
- * Version: 15.0.0
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
3
  * Plugin Name: Shield Security
4
  * Plugin URI: https://shsec.io/2f
5
  * Description: Powerful, Easy-To-Use #1 Rated WordPress Security System
6
+ * Version: 15.0.1
7
  * Text Domain: wp-simple-firewall
8
  * Domain Path: /languages
9
  * Author: Shield Security
init.php CHANGED
@@ -59,9 +59,13 @@ try {
59
  $oICWP_Wpsf = ICWP_WPSF_Shield_Security::GetInstance( $oICWP_Wpsf_Controller );
60
  $oICWP_Wpsf->start();
61
  }
 
 
 
 
 
 
62
  catch ( \Exception $e ) {
63
- if ( is_admin() ) {
64
- error_log( 'Perhaps due to a failed upgrade, the Shield plugin failed to load certain component(s) - you should remove the plugin and reinstall.' );
65
- error_log( $e->getMessage() );
66
- }
67
  }
59
  $oICWP_Wpsf = ICWP_WPSF_Shield_Security::GetInstance( $oICWP_Wpsf_Controller );
60
  $oICWP_Wpsf->start();
61
  }
62
+ catch ( Shield\Controller\Exceptions\VersionMismatchException $e ) {
63
+ add_action( 'admin_notices', function () use ( $e ) {
64
+ echo sprintf( '<div class="notice error"><p>%s</p></div>',
65
+ 'Shield Security: There appears to be a configuration issue - please reinstall the Shield Security plugin.' );
66
+ } );
67
+ }
68
  catch ( \Exception $e ) {
69
+ error_log( 'Perhaps due to a failed upgrade, the Shield plugin failed to load certain component(s) - you should remove the plugin and reinstall.' );
70
+ error_log( $e->getMessage() );
 
 
71
  }
plugin-spec.php CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "15.0.0",
4
- "release_timestamp": 1652184000,
5
- "build": "202205.0501",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
@@ -430,7 +430,7 @@
430
  },
431
  "labels": {
432
  "Name": "Shield Security",
433
- "Description": "Ultimate WP Security Protection - Scans, 2FA, Firewall, SPAM, Audit Trail, Security Admin, and so much more.",
434
  "Title": "Shield Security",
435
  "Author": "Shield Security",
436
  "AuthorName": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "15.0.1",
4
+ "release_timestamp": 1652090000,
5
+ "build": "202205.0901",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
430
  },
431
  "labels": {
432
  "Name": "Shield Security",
433
+ "Description": "Ultimate WP Security Protection - Scans, 2FA, Firewall, SPAM, Activity Log, Security Admin, and so much more.",
434
  "Title": "Shield Security",
435
  "Author": "Shield Security",
436
  "AuthorName": "Shield Security",
plugin.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "properties": {
3
- "version": "15.0.0",
4
- "release_timestamp": 1652184000,
5
- "build": "202205.0501",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
@@ -430,7 +430,7 @@
430
  },
431
  "labels": {
432
  "Name": "Shield Security",
433
- "Description": "Ultimate WP Security Protection - Scans, 2FA, Firewall, SPAM, Audit Trail, Security Admin, and so much more.",
434
  "Title": "Shield Security",
435
  "Author": "Shield Security",
436
  "AuthorName": "Shield Security",
1
  {
2
  "properties": {
3
+ "version": "15.0.1",
4
+ "release_timestamp": 1652090000,
5
+ "build": "202205.0901",
6
  "slug_parent": "icwp",
7
  "slug_plugin": "wpsf",
8
  "human_name": "Shield Security",
430
  },
431
  "labels": {
432
  "Name": "Shield Security",
433
+ "Description": "Ultimate WP Security Protection - Scans, 2FA, Firewall, SPAM, Activity Log, Security Admin, and so much more.",
434
  "Title": "Shield Security",
435
  "Author": "Shield Security",
436
  "AuthorName": "Shield Security",
readme.txt CHANGED
@@ -8,7 +8,7 @@ Requires at least: 3.7
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 6.0
11
- Stable tag: 15.0.0
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
8
  Requires PHP: 7.0
9
  Recommended PHP: 7.4
10
  Tested up to: 6.0
11
+ Stable tag: 15.0.1
12
 
13
  No-Nonsense Security Hardening that protects WordPress against hackers, malicious bots, and spammers (no captchas!). Now with exclusive ShieldNET Technology.
14
 
resources/css/global-plugin.css CHANGED
@@ -323,6 +323,7 @@ tr.icwp-plugin-vulnerability dd {
323
  #ShieldDashboardWidget .shield-progress-bar > .thebar {
324
  display: block;
325
  height: 100%;
 
326
  border-top-right-radius: 8px;
327
  border-bottom-right-radius: 8px;
328
  border-top-left-radius: 20px;
323
  #ShieldDashboardWidget .shield-progress-bar > .thebar {
324
  display: block;
325
  height: 100%;
326
+ text-decoration: none;
327
  border-top-right-radius: 8px;
328
  border-bottom-right-radius: 8px;
329
  border-top-left-radius: 20px;
src/lib/src/Blocks/RenderBlockPages/RenderBlockAuthorFishing.php CHANGED
@@ -38,6 +38,6 @@ class RenderBlockAuthorFishing extends BaseBlockPage {
38
  }
39
 
40
  protected function getTemplateStub() :string {
41
- return 'block_page_standard';
42
  }
43
  }
38
  }
39
 
40
  protected function getTemplateStub() :string {
41
+ return 'block_page_authorfishing';
42
  }
43
  }
src/lib/src/Blocks/RenderBlockPages/RenderBlockFirewall.php CHANGED
@@ -52,6 +52,6 @@ class RenderBlockFirewall extends BaseBlockPage {
52
  }
53
 
54
  protected function getTemplateStub() :string {
55
- return 'block_page_standard';
56
  }
57
  }
52
  }
53
 
54
  protected function getTemplateStub() :string {
55
+ return 'block_page_firewall';
56
  }
57
  }
src/lib/src/Blocks/RenderBlockPages/RenderBlockIP.php CHANGED
@@ -132,7 +132,7 @@ class RenderBlockIP extends BaseBlockPage {
132
  'this_will_send' => __( 'Clicking the button will send you an email letting you unblock your IP address.', 'wp-simple-firewall' ),
133
  'assumes_email' => __( 'This assumes that your WordPress site has been properly configured to send email - many are not.', 'wp-simple-firewall' ),
134
  'dont_receive' => __( "If you don't receive the email, check your spam and contact your site admin.", 'wp-simple-firewall' ),
135
- 'limit_60' => __( "You may only use this link once every 60 minutes. If you're repeatedly blocked, ask your site admin to review the audit trail to determine the cause.", 'wp-simple-firewall' ),
136
  'same_browser' => __( "When you click the link from your email, it must open up in this web browser.", 'wp-simple-firewall' ),
137
  'click_to_send' => __( 'Send Auto-Unblock Link To My Email', 'wp-simple-firewall' )
138
  ],
132
  'this_will_send' => __( 'Clicking the button will send you an email letting you unblock your IP address.', 'wp-simple-firewall' ),
133
  'assumes_email' => __( 'This assumes that your WordPress site has been properly configured to send email - many are not.', 'wp-simple-firewall' ),
134
  'dont_receive' => __( "If you don't receive the email, check your spam and contact your site admin.", 'wp-simple-firewall' ),
135
+ 'limit_60' => __( "You may only use this link once every 60 minutes. If you're repeatedly blocked, ask your site admin to review the Activity Log to determine the cause.", 'wp-simple-firewall' ),
136
  'same_browser' => __( "When you click the link from your email, it must open up in this web browser.", 'wp-simple-firewall' ),
137
  'click_to_send' => __( 'Send Auto-Unblock Link To My Email', 'wp-simple-firewall' )
138
  ],
src/lib/src/Controller/Config/Ops/LoadConfig.php CHANGED
@@ -2,7 +2,10 @@
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Controller\Config\Ops;
4
 
5
- use FernleafSystems\Wordpress\Plugin\Shield\Controller\Config\ConfigVO;
 
 
 
6
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
7
  use FernleafSystems\Wordpress\Services\Services;
8
  use FernleafSystems\Wordpress\Services\Utilities\Options\Transient;
@@ -31,6 +34,8 @@ class LoadConfig {
31
  */
32
  public function run() :ConfigVO {
33
  $con = $this->getCon();
 
 
34
  $def = $this->fromWp();
35
  $rebuild = empty( $def ) || !is_array( $def );
36
 
@@ -40,7 +45,7 @@ class LoadConfig {
40
  $version = $def[ 'properties' ][ 'version' ] ?? '0';
41
 
42
  $rebuild = empty( $def[ 'hash' ] ) || !hash_equals( $def[ 'hash' ], $specHash )
43
- || ( $version !== Services::WpPlugins()->getPluginAsVo( $con->base_file )->Version );
44
  $def[ 'hash' ] = $specHash;
45
  }
46
 
@@ -57,6 +62,10 @@ class LoadConfig {
57
  $cfg->previous_version = $cfg->properties[ 'version' ];
58
  }
59
 
 
 
 
 
60
  return $cfg;
61
  }
62
 
2
 
3
  namespace FernleafSystems\Wordpress\Plugin\Shield\Controller\Config\Ops;
4
 
5
+ use FernleafSystems\Wordpress\Plugin\Shield\Controller\{
6
+ Config\ConfigVO,
7
+ Exceptions\VersionMismatchException
8
+ };
9
  use FernleafSystems\Wordpress\Plugin\Shield\Modules\PluginControllerConsumer;
10
  use FernleafSystems\Wordpress\Services\Services;
11
  use FernleafSystems\Wordpress\Services\Utilities\Options\Transient;
34
  */
35
  public function run() :ConfigVO {
36
  $con = $this->getCon();
37
+ $WPP = Services::WpPlugins();
38
+
39
  $def = $this->fromWp();
40
  $rebuild = empty( $def ) || !is_array( $def );
41
 
45
  $version = $def[ 'properties' ][ 'version' ] ?? '0';
46
 
47
  $rebuild = empty( $def[ 'hash' ] ) || !hash_equals( $def[ 'hash' ], $specHash )
48
+ || ( $version !== $WPP->getPluginAsVo( $con->base_file )->Version );
49
  $def[ 'hash' ] = $specHash;
50
  }
51
 
62
  $cfg->previous_version = $cfg->properties[ 'version' ];
63
  }
64
 
65
+ if ( $cfg->properties[ 'version' ] !== $WPP->getPluginAsVo( $con->base_file )->Version ) {
66
+ throw new VersionMismatchException();
67
+ }
68
+
69
  return $cfg;
70
  }
71
 
src/lib/src/Controller/Controller.php CHANGED
@@ -25,7 +25,6 @@ use FernleafSystems\Wordpress\Services\Utilities\Options\Transient;
25
  * @property bool $plugin_deactivating
26
  * @property bool $plugin_deleting
27
  * @property bool $plugin_reset
28
- * @property bool $rebuild_options
29
  * @property Shield\Utilities\CacheDir $cache_dir_handler
30
  * @property bool $user_can_base_permissions
31
  * @property false|string $file_forceoff
@@ -73,7 +72,6 @@ class Controller extends DynPropertiesClass {
73
  if ( !isset( $this->service_events ) ) {
74
  $this->service_events = ( new Shield\Modules\Events\Lib\EventsService() )
75
  ->setCon( $this );
76
- $this->oEventsService = $this->service_events;
77
  }
78
  return $this->service_events;
79
  }
@@ -106,7 +104,6 @@ class Controller extends DynPropertiesClass {
106
  Services::WpPlugins()->activate( $this->base_file );
107
  }
108
  $this->loadConfig();
109
-
110
  $this->checkMinimumRequirements();
111
  $this->doRegisterHooks();
112
 
@@ -143,7 +140,6 @@ class Controller extends DynPropertiesClass {
143
  case 'plugin_deactivating':
144
  case 'plugin_deleting':
145
  case 'plugin_reset':
146
- case 'rebuild_options':
147
  case 'user_can_base_permissions':
148
  $val = (bool)$val;
149
  break;
@@ -164,12 +160,6 @@ class Controller extends DynPropertiesClass {
164
  }
165
  break;
166
 
167
- case 'cfg':
168
- if ( !$val instanceof Config\ConfigVO ) {
169
- $val = $this->loadConfig();
170
- }
171
- break;
172
-
173
  case 'urls':
174
  if ( !$val instanceof Shield\Controller\Assets\Urls ) {
175
  $val = ( new Shield\Controller\Assets\Urls() )->setCon( $this );
@@ -341,38 +331,19 @@ class Controller extends DynPropertiesClass {
341
  }
342
  }
343
 
 
 
 
344
  public function adminNoticePluginFailedToLoad() {
345
- $this->getRenderer()
346
- ->setTemplate( 'notices/plugin-failed-to-load' )
347
- ->setRenderVars( [
348
- 'strings' => [
349
- 'summary_title' => 'Perhaps due to a failed upgrade, the Shield plugin failed to load certain component(s) - you should remove the plugin and reinstall.',
350
- 'more_information' => $this->sAdminNoticeError
351
- ]
352
- ] )
353
- ->display();
354
  }
355
 
356
  /**
357
  * All our module page names are prefixed
358
- * @return bool
359
  */
360
- public function isThisPluginModuleRequest() {
361
  return strpos( Services::Request()->query( 'page' ), $this->prefix() ) === 0;
362
  }
363
 
364
- /**
365
- * @return array
366
- */
367
- protected function getRequirementsMessages() {
368
- if ( !isset( $this->aRequirementsMessages ) ) {
369
- $this->aRequirementsMessages = [
370
- '<h4>Shield Security Plugin - minimum site requirements are not met:</h4>'
371
- ];
372
- }
373
- return $this->aRequirementsMessages;
374
- }
375
-
376
  public function onWpDeactivatePlugin() {
377
  do_action( $this->prefix( 'pre_deactivate_plugin' ) );
378
  if ( $this->isPluginAdmin() ) {
@@ -923,7 +894,6 @@ class Controller extends DynPropertiesClass {
923
  ->setCon( $this )
924
  ->run();
925
  }
926
- $this->rebuild_options = $this->cfg->rebuilt;
927
  return $this->cfg;
928
  }
929
 
@@ -1233,11 +1203,6 @@ class Controller extends DynPropertiesClass {
1233
  $this->getModule( $cfg->slug );
1234
  }
1235
  catch ( \Exception $e ) {
1236
- if ( $this->isValidAdminArea() && $this->isPluginAdmin() ) {
1237
- $this->sAdminNoticeError = $e->getMessage();
1238
- add_action( 'admin_notices', [ $this, 'adminNoticePluginFailedToLoad' ] );
1239
- add_action( 'network_admin_notices', [ $this, 'adminNoticePluginFailedToLoad' ] );
1240
- }
1241
  }
1242
  }
1243
 
@@ -1251,6 +1216,7 @@ class Controller extends DynPropertiesClass {
1251
  do_action( $this->prefix( 'modules_loaded' ) );
1252
 
1253
  $this->rules->execute();
 
1254
  if ( !$this->cfg->rebuilt && $this->rules->isRulesEngineReady() ) {
1255
 
1256
  $this->rules->processRules();
25
  * @property bool $plugin_deactivating
26
  * @property bool $plugin_deleting
27
  * @property bool $plugin_reset
 
28
  * @property Shield\Utilities\CacheDir $cache_dir_handler
29
  * @property bool $user_can_base_permissions
30
  * @property false|string $file_forceoff
72
  if ( !isset( $this->service_events ) ) {
73
  $this->service_events = ( new Shield\Modules\Events\Lib\EventsService() )
74
  ->setCon( $this );
 
75
  }
76
  return $this->service_events;
77
  }
104
  Services::WpPlugins()->activate( $this->base_file );
105
  }
106
  $this->loadConfig();
 
107
  $this->checkMinimumRequirements();
108
  $this->doRegisterHooks();
109
 
140
  case 'plugin_deactivating':
141
  case 'plugin_deleting':
142
  case 'plugin_reset':
 
143
  case 'user_can_base_permissions':
144
  $val = (bool)$val;
145
  break;
160
  }
161
  break;
162
 
 
 
 
 
 
 
163
  case 'urls':
164
  if ( !$val instanceof Shield\Controller\Assets\Urls ) {
165
  $val = ( new Shield\Controller\Assets\Urls() )->setCon( $this );
331
  }
332
  }
333
 
334
+ /**
335
+ * @deprecated 15.0
336
+ */
337
  public function adminNoticePluginFailedToLoad() {
 
 
 
 
 
 
 
 
 
338
  }
339
 
340
  /**
341
  * All our module page names are prefixed
 
342
  */
343
+ public function isThisPluginModuleRequest() :bool {
344
  return strpos( Services::Request()->query( 'page' ), $this->prefix() ) === 0;
345
  }
346
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  public function onWpDeactivatePlugin() {
348
  do_action( $this->prefix( 'pre_deactivate_plugin' ) );
349
  if ( $this->isPluginAdmin() ) {
894
  ->setCon( $this )
895
  ->run();
896
  }
 
897
  return $this->cfg;
898
  }
899
 
1203
  $this->getModule( $cfg->slug );
1204
  }
1205
  catch ( \Exception $e ) {
 
 
 
 
 
1206
  }
1207
  }
1208
 
1216
  do_action( $this->prefix( 'modules_loaded' ) );
1217
 
1218
  $this->rules->execute();
1219
+
1220
  if ( !$this->cfg->rebuilt && $this->rules->isRulesEngineReady() ) {
1221
 
1222
  $this->rules->processRules();
src/lib/src/Controller/Exceptions/VersionMismatchException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php declare( strict_types=1 );
2
+
3
+ namespace FernleafSystems\Wordpress\Plugin\Shield\Controller\Exceptions;
4
+
5
+ class VersionMismatchException extends \LogicException {
6
+
7
+ }
src/lib/src/Modules/AuditTrail/AjaxHandler.php CHANGED
@@ -32,7 +32,7 @@ class AjaxHandler extends Shield\Modules\BaseShield\AjaxHandler {
32
  break;
33
 
34
  default:
35
- throw new \Exception( 'Not a supported Audit Trail table sub_action: '.$action );
36
  }
37
  }
38
  catch ( \Exception $e ) {
32
  break;
33
 
34
  default:
35
+ throw new \Exception( 'Not a supported Activity Log table sub_action: '.$action );
36
  }
37
  }
38
  catch ( \Exception $e ) {
src/lib/src/Modules/AuditTrail/ModCon.php CHANGED
@@ -95,9 +95,9 @@ class ModCon extends BaseShield\ModCon {
95
  if ( !empty( $exportData ) ) {
96
  $exportItems[] = [
97
  'group_id' => $this->getModSlug(),
98
- 'group_label' => sprintf( __( '[%s] Audit Trail Entries', 'wp-simple-firewall' ),
99
  $con->getHumanName() ),
100
- 'group_description' => sprintf( __( '[%s] Audit Trail Entries referencing the given user.', 'wp-simple-firewall' ),
101
  $con->getHumanName() ),
102
  'item_id' => $con->prefix( 'audit-trail' ),
103
  'data' => $exportData,
95
  if ( !empty( $exportData ) ) {
96
  $exportItems[] = [
97
  'group_id' => $this->getModSlug(),
98
+ 'group_label' => sprintf( __( '[%s] Activity Log Entries', 'wp-simple-firewall' ),
99
  $con->getHumanName() ),
100
+ 'group_description' => sprintf( __( '[%s] Activity Log Entries referencing the given user.', 'wp-simple-firewall' ),
101
  $con->getHumanName() ),
102
  'item_id' => $con->prefix( 'audit-trail' ),
103
  'data' => $exportData,
src/lib/src/Modules/AuditTrail/Strings.php CHANGED
@@ -47,7 +47,7 @@ class Strings extends Base\Strings {
47
  __( 'Theme "{{theme}}" was activated.', 'wp-simple-firewall' ),
48
  ],
49
  ],
50
- 'theme_installed' => [
51
  'name' => __( 'Theme Installed', 'wp-simple-firewall' ),
52
  'audit' => [
53
  __( 'Theme "{{theme}}" was installed.', 'wp-simple-firewall' )
@@ -224,18 +224,18 @@ class Strings extends Base\Strings {
224
 
225
  case 'section_enable_plugin_feature_audit_trail' :
226
  $titleShort = sprintf( '%s/%s', __( 'On', 'wp-simple-firewall' ), __( 'Off', 'wp-simple-firewall' ) );
227
- $title = sprintf( __( 'Enable Module: %s', 'wp-simple-firewall' ), $this->getMod()
228
- ->getMainFeatureName() );
229
  $summary = [
230
- sprintf( '%s - %s', __( 'Purpose', 'wp-simple-firewall' ), __( 'The Audit Trail is designed so you can look back on events and analyse what happened and what may have gone wrong.', 'wp-simple-firewall' ) ),
231
- sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ), sprintf( __( 'Keep the %s feature turned on.', 'wp-simple-firewall' ), __( 'Audit Trail', 'wp-simple-firewall' ) ) )
232
  ];
233
  break;
234
 
235
  case 'section_localdb' :
236
  $title = __( 'Log To DB', 'wp-simple-firewall' );
237
  $summary = [
238
- sprintf( '%s - %s', __( 'Purpose', 'wp-simple-firewall' ), __( 'Provides finer control over the audit trail itself.', 'wp-simple-firewall' ) ),
239
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ), __( 'These settings are dependent on your requirements.', 'wp-simple-firewall' ) )
240
  ];
241
  $titleShort = __( 'Log To DB', 'wp-simple-firewall' );
47
  __( 'Theme "{{theme}}" was activated.', 'wp-simple-firewall' ),
48
  ],
49
  ],
50
+ 'theme_installed' => [
51
  'name' => __( 'Theme Installed', 'wp-simple-firewall' ),
52
  'audit' => [
53
  __( 'Theme "{{theme}}" was installed.', 'wp-simple-firewall' )
224
 
225
  case 'section_enable_plugin_feature_audit_trail' :
226
  $titleShort = sprintf( '%s/%s', __( 'On', 'wp-simple-firewall' ), __( 'Off', 'wp-simple-firewall' ) );
227
+ $title = sprintf( __( 'Enable Module: %s', 'wp-simple-firewall' ),
228
+ $this->getMod()->getMainFeatureName() );
229
  $summary = [
230
+ sprintf( '%s - %s', __( 'Purpose', 'wp-simple-firewall' ), __( 'The Activity Log is designed so you can look back on events and analyse what happened and what may have gone wrong.', 'wp-simple-firewall' ) ),
231
+ sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ), sprintf( __( 'Keep the %s feature turned on.', 'wp-simple-firewall' ), __( 'Activity Log', 'wp-simple-firewall' ) ) )
232
  ];
233
  break;
234
 
235
  case 'section_localdb' :
236
  $title = __( 'Log To DB', 'wp-simple-firewall' );
237
  $summary = [
238
+ sprintf( '%s - %s', __( 'Purpose', 'wp-simple-firewall' ), __( 'Provides finer control over the Activity Log itself.', 'wp-simple-firewall' ) ),
239
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ), __( 'These settings are dependent on your requirements.', 'wp-simple-firewall' ) )
240
  ];
241
  $titleShort = __( 'Log To DB', 'wp-simple-firewall' );
src/lib/src/Modules/AuditTrail/UI.php CHANGED
@@ -19,7 +19,7 @@ class UI extends BaseShield\UI {
19
  ],
20
  'flags' => [],
21
  'strings' => [
22
- 'table_title' => sprintf( '%s: %s', __( 'Logs', 'wp-simple-firewall' ), __( 'Audit Trail', 'wp-simple-firewall' ) ),
23
  ],
24
  'vars' => [
25
  'datatables_init' => ( new ForAuditTrail() )
19
  ],
20
  'flags' => [],
21
  'strings' => [
22
+ 'table_title' => __( 'Activity Log', 'wp-simple-firewall' ),
23
  ],
24
  'vars' => [
25
  'datatables_init' => ( new ForAuditTrail() )
src/lib/src/Modules/Firewall/Strings.php CHANGED
@@ -26,7 +26,7 @@ class Strings extends Base\Strings {
26
  __( 'Here you choose what kind of malicious data to scan for.', 'wp-simple-firewall' ),
27
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ),
28
  __( 'Turn on as many options here as you can.', 'wp-simple-firewall' ) )
29
- .' '.__( 'If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Audit Trail.', 'wp-simple-firewall' ),
30
  ];
31
  $titleShort = __( 'Firewall Blocking', 'wp-simple-firewall' );
32
  break;
26
  __( 'Here you choose what kind of malicious data to scan for.', 'wp-simple-firewall' ),
27
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ),
28
  __( 'Turn on as many options here as you can.', 'wp-simple-firewall' ) )
29
+ .' '.__( 'If you find an incompatibility or something stops working, un-check 1 option at a time until you find the problem or review the Activity Log.', 'wp-simple-firewall' ),
30
  ];
31
  $titleShort = __( 'Firewall Blocking', 'wp-simple-firewall' );
32
  break;
src/lib/src/Modules/HackGuard/Lib/Reports/ScanRepairs.php CHANGED
@@ -80,7 +80,7 @@ class ScanRepairs extends BaseReporter {
80
  ],
81
  'strings' => [
82
  'title' => \__( 'Scanner Repairs', 'wp-simple-firewall' ),
83
- 'audit_trail' => \__( 'View all repairs and file deletions in the Audit Trail', 'wp-simple-firewall' ),
84
  ],
85
  'hrefs' => [
86
  'audit_trail' => $this->getCon()
80
  ],
81
  'strings' => [
82
  'title' => \__( 'Scanner Repairs', 'wp-simple-firewall' ),
83
+ 'audit_trail' => \__( 'View all repairs and file deletions in the Activity Log', 'wp-simple-firewall' ),
84
  ],
85
  'hrefs' => [
86
  'audit_trail' => $this->getCon()
src/lib/src/Modules/HackGuard/Lib/ScanTables/LoadRawTableData.php CHANGED
@@ -219,9 +219,7 @@ class LoadRawTableData {
219
  }
220
 
221
  /**
222
- * @param string $status
223
  * @param Scans\Base\ResultItem $item
224
- * @return array
225
  * @throws \Exception
226
  */
227
  private function getActions( string $status, $item ) :array {
219
  }
220
 
221
  /**
 
222
  * @param Scans\Base\ResultItem $item
 
223
  * @throws \Exception
224
  */
225
  private function getActions( string $status, $item ) :array {
src/lib/src/Modules/HackGuard/Lib/ScanTables/Modals/FileContents.php CHANGED
@@ -13,18 +13,10 @@ class FileContents {
13
  use ModConsumer;
14
 
15
  /**
 
16
  * @throws \Exception
17
  */
18
- public function run( int $rid, bool $rawContents = false ) :array {
19
- try {
20
- $item = ( new Retrieve() )
21
- ->setMod( $this->getMod() )
22
- ->byID( $rid );
23
- }
24
- catch ( \Exception $e ) {
25
- throw new \Exception( 'Not a valid file record' );
26
- }
27
-
28
  if ( empty( $item->path_fragment ) ) {
29
  throw new \Exception( 'There is no path associated with this record' );
30
  }
13
  use ModConsumer;
14
 
15
  /**
16
+ * @param Scans\Afs\ResultItem $item
17
  * @throws \Exception
18
  */
19
+ public function run( $item, bool $rawContents = false ) :array {
 
 
 
 
 
 
 
 
 
20
  if ( empty( $item->path_fragment ) ) {
21
  throw new \Exception( 'There is no path associated with this record' );
22
  }
src/lib/src/Modules/HackGuard/Lib/ScanTables/Modals/ScanItemView.php CHANGED
@@ -36,8 +36,6 @@ class ScanItemView {
36
  throw new \Exception( 'Non-file scan items are not supported yet.' );
37
  }
38
 
39
- $canDownload = Services::WpFs()->isFile( $item->path_full );
40
-
41
  try {
42
  $diffContent = $this->getFileDiff( $item );
43
  $hasDiff = true;
@@ -50,7 +48,7 @@ class ScanItemView {
50
  try {
51
  $fileContent = ( new FileContents() )
52
  ->setMod( $mod )
53
- ->run( $rid )[ 'contents' ];
54
  $hasContent = true;
55
  }
56
  catch ( \Exception $e ) {
@@ -69,6 +67,7 @@ class ScanItemView {
69
  $hasHistory = false;
70
  }
71
 
 
72
  return [
73
  'path' => \esc_html( $item->path_fragment ),
74
  'contents' => $mod->renderTemplate(
@@ -84,7 +83,7 @@ class ScanItemView {
84
  ->run(),
85
  ],
86
  'flags' => [
87
- 'can_download' => $canDownload,
88
  'has_content' => $hasContent,
89
  'has_diff' => $hasDiff,
90
  'has_history' => $hasHistory,
@@ -115,23 +114,20 @@ class ScanItemView {
115
  }
116
 
117
  /**
118
- * @param Scans\Afs\ResultItem $resultItem
119
- * @return string
120
  * @throws \Exception
121
  */
122
- private function getFileDiff( $resultItem ) :string {
123
- $pathFull = $resultItem->path_full;
124
 
125
- if ( $resultItem->is_missing || !Services::WpFs()->isFile( $pathFull ) ) {
126
  throw new \Exception( 'Diff is unavailable for missing files.' );
127
  }
128
 
129
  $original = '';
130
  $coreHashes = Services::CoreFileHashes();
131
  if ( $coreHashes->isCoreFile( $pathFull ) ) {
132
- $original = Services::WpFs()->getFileContent(
133
- ( new WpOrg\Wp\Files() )->getOriginalFileFromVcs( $pathFull )
134
- );
135
  }
136
  else {
137
  $plugin = ( new WpOrg\Plugin\Files() )->findPluginFromFile( $pathFull );
@@ -156,11 +152,8 @@ class ScanItemView {
156
  throw new \Exception( 'There is no original file available to create a diff.' );
157
  }
158
 
159
- $converter = new ConvertLineEndings();
160
- $res = ( new Diff() )->getDiff(
161
- $converter->dosToLinux( $original ),
162
- $converter->fileDosToLinux( $pathFull )
163
- );
164
 
165
  if ( !is_array( $res ) || empty( $res[ 'html' ] ) ) {
166
  throw new \Exception( 'Could not get a valid diff for this file.' );
36
  throw new \Exception( 'Non-file scan items are not supported yet.' );
37
  }
38
 
 
 
39
  try {
40
  $diffContent = $this->getFileDiff( $item );
41
  $hasDiff = true;
48
  try {
49
  $fileContent = ( new FileContents() )
50
  ->setMod( $mod )
51
+ ->run( $item )[ 'contents' ];
52
  $hasContent = true;
53
  }
54
  catch ( \Exception $e ) {
67
  $hasHistory = false;
68
  }
69
 
70
+ $fullPath = empty( $item->path_full ) ? path_join( ABSPATH, $item->path_fragment ) : $item->path_full;
71
  return [
72
  'path' => \esc_html( $item->path_fragment ),
73
  'contents' => $mod->renderTemplate(
83
  ->run(),
84
  ],
85
  'flags' => [
86
+ 'can_download' => Services::WpFs()->isFile( $fullPath ),
87
  'has_content' => $hasContent,
88
  'has_diff' => $hasDiff,
89
  'has_history' => $hasHistory,
114
  }
115
 
116
  /**
117
+ * @param Scans\Afs\ResultItem $item
 
118
  * @throws \Exception
119
  */
120
+ private function getFileDiff( $item ) :string {
121
+ $pathFull = empty( $item->path_full ) ? path_join( ABSPATH, $item->path_fragment ) : $item->path_full;
122
 
123
+ if ( $item->is_missing || !Services::WpFs()->isFile( $pathFull ) ) {
124
  throw new \Exception( 'Diff is unavailable for missing files.' );
125
  }
126
 
127
  $original = '';
128
  $coreHashes = Services::CoreFileHashes();
129
  if ( $coreHashes->isCoreFile( $pathFull ) ) {
130
+ $original = ( new WpOrg\Wp\Files() )->getOriginalFileFromVcs( $pathFull );
 
 
131
  }
132
  else {
133
  $plugin = ( new WpOrg\Plugin\Files() )->findPluginFromFile( $pathFull );
152
  throw new \Exception( 'There is no original file available to create a diff.' );
153
  }
154
 
155
+ $conv = new ConvertLineEndings();
156
+ $res = ( new Diff() )->getDiff( $conv->dosToLinux( $original ), $conv->fileDosToLinux( $pathFull ) );
 
 
 
157
 
158
  if ( !is_array( $res ) || empty( $res[ 'html' ] ) ) {
159
  throw new \Exception( 'Could not get a valid diff for this file.' );
src/lib/src/Modules/HackGuard/Options.php CHANGED
@@ -33,14 +33,9 @@ class Options extends BaseShield\Options {
33
  * @return string[] - precise REGEX patterns to match against PATH.
34
  */
35
  public function getWhitelistedPathsAsRegex() :array {
 
36
  if ( $this->isPremium() ) {
37
- $paths = array_merge(
38
- $this->getOpt( 'scan_path_exclusions', [] ),
39
- $this->getDef( 'default_whitelist_paths' )
40
- );
41
- }
42
- else {
43
- $paths = [];
44
  }
45
 
46
  return array_map(
33
  * @return string[] - precise REGEX patterns to match against PATH.
34
  */
35
  public function getWhitelistedPathsAsRegex() :array {
36
+ $paths = $this->getDef( 'default_whitelist_paths' );
37
  if ( $this->isPremium() ) {
38
+ $paths = array_merge( $this->getOpt( 'scan_path_exclusions', [] ), $paths );
 
 
 
 
 
 
39
  }
40
 
41
  return array_map(
src/lib/src/Modules/HackGuard/Render/ScanResults/SectionMalware.php CHANGED
@@ -10,11 +10,10 @@ use FernleafSystems\Wordpress\Services\Services;
10
  class SectionMalware extends SectionBase {
11
 
12
  public function render() :string {
13
- return $this->getMod()
14
- ->renderTemplate(
15
- '/wpadmin_pages/insights/scans/results/section/malware/index.twig',
16
- $this->buildRenderData()
17
- );
18
  }
19
 
20
  protected function buildRenderData() :array {
@@ -43,9 +42,9 @@ class SectionMalware extends SectionBase {
43
  private function buildMalwareData() :array {
44
  /** @var ModCon $mod */
45
  $mod = $this->getMod();
46
- $count = $mod->getScansCon()
47
- ->getScanResultsCount()
48
- ->countMalware();
49
  $data = [
50
  'flags' => [
51
  'has_malware' => $count > 0,
10
  class SectionMalware extends SectionBase {
11
 
12
  public function render() :string {
13
+ return $this->getMod()->renderTemplate(
14
+ '/wpadmin_pages/insights/scans/results/section/malware/index.twig',
15
+ $this->buildRenderData()
16
+ );
 
17
  }
18
 
19
  protected function buildRenderData() :array {
42
  private function buildMalwareData() :array {
43
  /** @var ModCon $mod */
44
  $mod = $this->getMod();
45
+ $count = $mod->getScansCon()
46
+ ->getScanResultsCount()
47
+ ->countMalware();
48
  $data = [
49
  'flags' => [
50
  'has_malware' => $count > 0,
src/lib/src/Modules/HackGuard/Render/ScanResults/SectionPluginThemesBase.php CHANGED
@@ -12,21 +12,21 @@ use FernleafSystems\Wordpress\Services\Services;
12
  class SectionPluginThemesBase extends SectionBase {
13
 
14
  protected function getCommonRenderData() :array {
15
- return Services::DataManipulation()
16
- ->mergeArraysRecursive( parent::getCommonRenderData(), [
17
- 'strings' => [
18
- 'ptg_name' => __( 'Plugin/Theme Guard', 'wp-simple-firewall' ),
19
- 'ptg_not_available' => __( 'The Plugin & Theme File Guard Scanner is only available with ShieldPRO.', 'wp-simple-firewall' ),
20
- ],
21
- 'flags' => [
22
- 'ptg_is_restricted' => $this->getScanConAFS()->isRestrictedPluginThemeScan(),
23
- ],
24
- 'vars' => [
25
- 'datatables_init' => ( new ForPluginTheme() )
26
- ->setMod( $this->getMod() )
27
- ->build()
28
- ]
29
- ] );
30
  }
31
 
32
  protected function getVulnerabilities() :Scans\Wpv\ResultsSet {
12
  class SectionPluginThemesBase extends SectionBase {
13
 
14
  protected function getCommonRenderData() :array {
15
+ return Services::DataManipulation()->mergeArraysRecursive(
16
+ parent::getCommonRenderData(), [
17
+ 'strings' => [
18
+ 'ptg_name' => __( 'Plugin/Theme Guard', 'wp-simple-firewall' ),
19
+ 'ptg_not_available' => __( 'The Plugin & Theme File Guard Scanner is only available with ShieldPRO.', 'wp-simple-firewall' ),
20
+ ],
21
+ 'flags' => [
22
+ 'ptg_is_restricted' => $this->getScanConAFS()->isRestrictedPluginThemeScan(),
23
+ ],
24
+ 'vars' => [
25
+ 'datatables_init' => ( new ForPluginTheme() )
26
+ ->setMod( $this->getMod() )
27
+ ->build()
28
+ ]
29
+ ] );
30
  }
31
 
32
  protected function getVulnerabilities() :Scans\Wpv\ResultsSet {
src/lib/src/Modules/HackGuard/Render/ScanResults/SectionPlugins.php CHANGED
@@ -10,11 +10,10 @@ use FernleafSystems\Wordpress\Services\Utilities\Assets\DetectInstallationDate;
10
  class SectionPlugins extends SectionPluginThemesBase {
11
 
12
  public function render() :string {
13
- return $this->getMod()
14
- ->renderTemplate(
15
- '/wpadmin_pages/insights/scans/results/section/plugins/index.twig',
16
- $this->buildRenderData()
17
- );
18
  }
19
 
20
  protected function buildRenderData() :array {
10
  class SectionPlugins extends SectionPluginThemesBase {
11
 
12
  public function render() :string {
13
+ return $this->getMod()->renderTemplate(
14
+ '/wpadmin_pages/insights/scans/results/section/plugins/index.twig',
15
+ $this->buildRenderData()
16
+ );
 
17
  }
18
 
19
  protected function buildRenderData() :array {
src/lib/src/Modules/HackGuard/Render/ScanResults/SectionThemes.php CHANGED
@@ -11,12 +11,10 @@ use FernleafSystems\Wordpress\Services\Utilities\Assets\DetectInstallationDate;
11
  class SectionThemes extends SectionPluginThemesBase {
12
 
13
  public function render() :string {
14
- $renderData = $this->buildRenderData();
15
- return $this->getMod()
16
- ->renderTemplate(
17
- '/wpadmin_pages/insights/scans/results/section/themes/index.twig',
18
- $renderData
19
- );
20
  }
21
 
22
  protected function buildRenderData() :array {
@@ -118,7 +116,6 @@ class SectionThemes extends SectionPluginThemesBase {
118
  ( $isCheckUpdates && $flags[ 'has_update' ] )
119
  );
120
 
121
-
122
  if ( $theme->isWpOrg() && $flags[ 'has_warning' ] && !$flags[ 'has_update' ] ) {
123
  $wpOrgThemes = implode( '|', array_map( function ( $ver ) {
124
  return 'twenty'.$ver;
11
  class SectionThemes extends SectionPluginThemesBase {
12
 
13
  public function render() :string {
14
+ return $this->getMod()->renderTemplate(
15
+ '/wpadmin_pages/insights/scans/results/section/themes/index.twig',
16
+ $this->buildRenderData()
17
+ );
 
 
18
  }
19
 
20
  protected function buildRenderData() :array {
116
  ( $isCheckUpdates && $flags[ 'has_update' ] )
117
  );
118
 
 
119
  if ( $theme->isWpOrg() && $flags[ 'has_warning' ] && !$flags[ 'has_update' ] ) {
120
  $wpOrgThemes = implode( '|', array_map( function ( $ver ) {
121
  return 'twenty'.$ver;
src/lib/src/Modules/HackGuard/Render/ScanResults/SectionWordpress.php CHANGED
@@ -10,11 +10,10 @@ use FernleafSystems\Wordpress\Services\Services;
10
  class SectionWordpress extends SectionBase {
11
 
12
  public function render() :string {
13
- return $this->getMod()
14
- ->renderTemplate(
15
- '/wpadmin_pages/insights/scans/results/section/wordpress/index.twig',
16
- $this->buildRenderData()
17
- );
18
  }
19
 
20
  protected function buildRenderData() :array {
@@ -39,9 +38,9 @@ class SectionWordpress extends SectionBase {
39
  $WP = Services::WpGeneral();
40
  /** @var ModCon $mod */
41
  $mod = $this->getMod();
42
- $count = $mod->getScansCon()
43
- ->getScanResultsCount()
44
- ->countWPFiles();
45
  $data = [
46
  'info' => [
47
  'type' => 'wordpress',
10
  class SectionWordpress extends SectionBase {
11
 
12
  public function render() :string {
13
+ return $this->getMod()->renderTemplate(
14
+ '/wpadmin_pages/insights/scans/results/section/wordpress/index.twig',
15
+ $this->buildRenderData()
16
+ );
 
17
  }
18
 
19
  protected function buildRenderData() :array {
38
  $WP = Services::WpGeneral();
39
  /** @var ModCon $mod */
40
  $mod = $this->getMod();
41
+ $count = $mod->getScansCon()
42
+ ->getScanResultsCount()
43
+ ->countWPFiles();
44
  $data = [
45
  'info' => [
46
  'type' => 'wordpress',
src/lib/src/Modules/HackGuard/Scan/Controller/Afs.php CHANGED
@@ -151,14 +151,13 @@ class Afs extends BaseForFiles {
151
  $updater->setItemDeleted( $item->VO->resultitem_id );
152
  }
153
  elseif ( $item->is_in_core ) {
154
-
155
  $CFH = Services::CoreFileHashes();
156
- if ( $item->is_checksumfail && $CFH->isCoreFileHashValid( $item->path_full ) ) {
157
- $updater->setItemRepaired( $item->VO->resultitem_id );
158
- }
159
- elseif ( $item->is_missing && !$CFH->isCoreFile( $item->path_full ) ) {
160
  $mod->getDbH_ResultItems()->getQueryDeleter()->deleteById( $item->VO->resultitem_id );
161
  }
 
 
 
162
  }
163
  elseif ( $item->is_in_plugin || $item->is_in_theme ) {
164
  try {
151
  $updater->setItemDeleted( $item->VO->resultitem_id );
152
  }
153
  elseif ( $item->is_in_core ) {
 
154
  $CFH = Services::CoreFileHashes();
155
+ if ( $item->is_missing && !$CFH->isCoreFile( $item->path_full ) ) {
 
 
 
156
  $mod->getDbH_ResultItems()->getQueryDeleter()->deleteById( $item->VO->resultitem_id );
157
  }
158
+ elseif ( $item->is_checksumfail && $CFH->isCoreFileHashValid( $item->path_full ) ) {
159
+ $updater->setItemRepaired( $item->VO->resultitem_id );
160
+ }
161
  }
162
  elseif ( $item->is_in_plugin || $item->is_in_theme ) {
163
  try {
src/lib/src/Modules/IPs/Lib/IpAnalyse/BuildDisplay.php CHANGED
@@ -47,7 +47,7 @@ class BuildDisplay {
47
  'nav_signals' => __( 'Bot Signals', 'wp-simple-firewall' ),
48
  'nav_general' => __( 'General Info', 'wp-simple-firewall' ),
49
  'nav_sessions' => __( 'User Sessions', 'wp-simple-firewall' ),
50
- 'nav_audit' => __( 'Audit Trail', 'wp-simple-firewall' ),
51
  'nav_traffic' => __( 'Recent Traffic', 'wp-simple-firewall' ),
52
  ],
53
  'vars' => [
47
  'nav_signals' => __( 'Bot Signals', 'wp-simple-firewall' ),
48
  'nav_general' => __( 'General Info', 'wp-simple-firewall' ),
49
  'nav_sessions' => __( 'User Sessions', 'wp-simple-firewall' ),
50
+ 'nav_audit' => __( 'Activity Log', 'wp-simple-firewall' ),
51
  'nav_traffic' => __( 'Recent Traffic', 'wp-simple-firewall' ),
52
  ],
53
  'vars' => [
src/lib/src/Modules/IPs/Strings.php CHANGED
@@ -387,7 +387,7 @@ class Strings extends Base\Strings {
387
  __( "Detect when a bot tries to load WordPress directly from a file that isn't normally used to load WordPress.", 'wp-simple-firewall' ),
388
  __( 'WordPress should only be loaded in a limited number of ways.', 'wp-simple-firewall' ),
389
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ),
390
- sprintf( __( 'Set this option to "%s" and monitor the Audit Trail, since some plugins, themes, or custom integrations may trigger this.', 'wp-simple-firewall' ), __( 'Audit Log Only', 'wp-simple-firewall' ) ) )
391
  ];
392
  break;
393
 
387
  __( "Detect when a bot tries to load WordPress directly from a file that isn't normally used to load WordPress.", 'wp-simple-firewall' ),
388
  __( 'WordPress should only be loaded in a limited number of ways.', 'wp-simple-firewall' ),
389
  sprintf( '%s - %s', __( 'Recommendation', 'wp-simple-firewall' ),
390
+ sprintf( __( 'Set this option to "%s" and monitor the Activity Log, since some plugins, themes, or custom integrations may trigger this.', 'wp-simple-firewall' ), __( 'Audit Log Only', 'wp-simple-firewall' ) ) )
391
  ];
392
  break;
393
 
src/lib/src/Modules/Insights/Lib/MeterAnalysis/Components.php CHANGED
@@ -436,14 +436,14 @@ class Components {
436
  'weight' => 25,
437
  ];
438
  },
439
- 'audit_trail_enabled' => function () {
440
  $modAudit = $this->getCon()->getModule_AuditTrail();
441
  /** @var AuditTrail\Options $optsAudit */
442
  $optsAudit = $modAudit->getOptions();
443
  return [
444
  'title' => __( 'Activity Logging', 'wp-simple-firewall' ),
445
- 'desc_protected' => __( 'Tracking activity with the Audit Trail is enabled making it easier to track issues.', 'wp-simple-firewall' ),
446
- 'desc_unprotected' => __( "Activity tracking with the Audit Trail is disabled making it harder to track issues.", 'wp-simple-firewall' ),
447
  'href' => $modAudit->isModOptEnabled() ?
448
  $modAudit->getUrl_DirectLinkToOption( 'section_localdb' )
449
  : $modAudit->getUrl_DirectLinkToOption( 'enable_audit_trail' ),
436
  'weight' => 25,
437
  ];
438
  },
439
+ 'activity_log_enabled' => function () {
440
  $modAudit = $this->getCon()->getModule_AuditTrail();
441
  /** @var AuditTrail\Options $optsAudit */
442
  $optsAudit = $modAudit->getOptions();
443
  return [
444
  'title' => __( 'Activity Logging', 'wp-simple-firewall' ),
445
+ 'desc_protected' => __( 'Tracking changes with the Activity Log is enabled making it easier to track issues.', 'wp-simple-firewall' ),
446
+ 'desc_unprotected' => __( "Tracking changes with the Activity Log is disabled making it harder to track issues.", 'wp-simple-firewall' ),
447
  'href' => $modAudit->isModOptEnabled() ?
448
  $modAudit->getUrl_DirectLinkToOption( 'section_localdb' )
449
  : $modAudit->getUrl_DirectLinkToOption( 'enable_audit_trail' ),
src/lib/src/Modules/Insights/Lib/MeterAnalysis/MeterFirewall.php CHANGED
@@ -22,7 +22,7 @@ class MeterFirewall extends MeterBase {
22
  return [
23
  __( "The firewall inspects all data sent in every request to your site.", 'wp-simple-firewall' )
24
  .' '.__( "If malicious data is detected, the request will be quickly terminated before it can be misused.", 'wp-simple-firewall' ),
25
- __( "The more rules you employ, the better, but you should always monitor your Activity Audit Trail for false positives.", 'wp-simple-firewall' ),
26
  ];
27
  }
28
 
22
  return [
23
  __( "The firewall inspects all data sent in every request to your site.", 'wp-simple-firewall' )
24
  .' '.__( "If malicious data is detected, the request will be quickly terminated before it can be misused.", 'wp-simple-firewall' ),
25
+ __( "The more rules you employ, the better, but you should always monitor your Activity Log for false positives.", 'wp-simple-firewall' ),
26
  ];
27
  }
28
 
src/lib/src/Modules/Insights/Lib/MeterAnalysis/MeterIntegrity.php CHANGED
@@ -37,7 +37,7 @@ class MeterIntegrity extends MeterBase {
37
  'all',
38
  'ssl_certificate',
39
  'db_password',
40
- 'audit_trail_enabled',
41
  'traffic_log_enabled',
42
  'report_email',
43
  ];
37
  'all',
38
  'ssl_certificate',
39
  'db_password',
40
+ 'activity_log_enabled',
41
  'traffic_log_enabled',
42
  'report_email',
43
  ];
src/lib/src/Modules/Insights/Lib/NavMenuBuilder.php CHANGED
@@ -159,7 +159,7 @@ class NavMenuBuilder {
159
 
160
  return [
161
  'slug' => $slug,
162
- 'title' => __( 'Audit Trail', 'wp-simple-firewall' ),
163
  'img' => $this->getCon()->svgs->raw( 'bootstrap/person-lines-fill.svg' ),
164
  'introjs' => [
165
  'body' => __( "Track and review all important actions taken on your site - see the Who, What and When.", 'wp-simple-firewall' ),
159
 
160
  return [
161
  'slug' => $slug,
162
+ 'title' => __( 'Activity Log', 'wp-simple-firewall' ),
163
  'img' => $this->getCon()->svgs->raw( 'bootstrap/person-lines-fill.svg' ),
164
  'introjs' => [
165
  'body' => __( "Track and review all important actions taken on your site - see the Who, What and When.", 'wp-simple-firewall' ),
src/lib/src/Modules/Insights/UI.php CHANGED
@@ -201,8 +201,8 @@ class UI extends BaseShield\UI {
201
  'scans_run' => __( 'Run Scans', 'wp-simple-firewall' ),
202
  'docs' => __( 'Docs', 'wp-simple-firewall' ),
203
  'ips' => __( 'IP Management and Analysis', 'wp-simple-firewall' ),
204
- 'audit' => __( 'Audit Trail', 'wp-simple-firewall' ),
205
- 'audit_trail' => __( 'Audit Trail', 'wp-simple-firewall' ),
206
  'traffic' => __( 'Traffic', 'wp-simple-firewall' ),
207
  'notes' => __( 'Admin Notes', 'wp-simple-firewall' ),
208
  'users' => __( 'User Sessions', 'wp-simple-firewall' ),
201
  'scans_run' => __( 'Run Scans', 'wp-simple-firewall' ),
202
  'docs' => __( 'Docs', 'wp-simple-firewall' ),
203
  'ips' => __( 'IP Management and Analysis', 'wp-simple-firewall' ),
204
+ 'audit' => __( 'Activity Log', 'wp-simple-firewall' ),
205
+ 'audit_trail' => __( 'Activity Log', 'wp-simple-firewall' ),
206
  'traffic' => __( 'Traffic', 'wp-simple-firewall' ),
207
  'notes' => __( 'Admin Notes', 'wp-simple-firewall' ),
208
  'users' => __( 'User Sessions', 'wp-simple-firewall' ),
src/lib/src/Modules/License/UI.php CHANGED
@@ -192,7 +192,7 @@ class UI extends BaseShield\UI {
192
  ],
193
  ],
194
  [
195
- 'title' => __( 'Unlimited Audit Trail', 'wp-simple-firewall' ),
196
  'lines' => [
197
  __( 'Retain logs for as long as you need without limits.', 'wp-simple-firewall' ),
198
  ],
192
  ],
193
  ],
194
  [
195
+ 'title' => __( 'Unlimited Activity Log', 'wp-simple-firewall' ),
196
  'lines' => [
197
  __( 'Retain logs for as long as you need without limits.', 'wp-simple-firewall' ),
198
  ],
src/lib/src/Modules/Plugin/AdminNotices.php CHANGED
@@ -88,7 +88,7 @@ class AdminNotices extends Shield\Modules\Base\AdminNotices {
88
  $notice->render_data = [
89
  'notice_attributes' => [],
90
  'strings' => [
91
- 'title' => sprintf( '%s: %s', __( 'asdfasdf', 'wp-simple-firewall' ),
92
  sprintf( __( "%s Plugin Is Too Old", 'wp-simple-firewall' ), $name ) ),
93
  'lines' => [
94
  sprintf(
88
  $notice->render_data = [
89
  'notice_attributes' => [],
90
  'strings' => [
91
+ 'title' => sprintf( '%s: %s', __( 'Warning', 'wp-simple-firewall' ),
92
  sprintf( __( "%s Plugin Is Too Old", 'wp-simple-firewall' ), $name ) ),
93
  'lines' => [
94
  sprintf(
src/lib/src/Modules/Plugin/Debug.php CHANGED
@@ -11,7 +11,7 @@ use FernleafSystems\Wordpress\Services\Utilities\Net\IpID;
11
  class Debug extends Modules\Base\Debug {
12
 
13
  public function run() {
14
- $this->checkIP( '66.249.79.9' );
15
  die( 'finish' );
16
  }
17
 
11
  class Debug extends Modules\Base\Debug {
12
 
13
  public function run() {
14
+ $this->checkIP( '88.201.163.83' );
15
  die( 'finish' );
16
  }
17
 
src/lib/src/Modules/Plugin/Lib/Debug/Collate.php CHANGED
@@ -160,7 +160,7 @@ class Collate {
160
  $data = [];
161
 
162
  $dbh = $con->getModule_AuditTrail()->getDbH_Logs();
163
- $data[ 'DB Table: Audit Trail' ] = $dbh->isReady() ?
164
  sprintf( '%s (rows: ~%s)', 'Ready', $dbh->getQuerySelector()->count() )
165
  : 'Missing';
166
 
160
  $data = [];
161
 
162
  $dbh = $con->getModule_AuditTrail()->getDbH_Logs();
163
+ $data[ 'DB Table: Activity Log' ] = $dbh->isReady() ?
164
  sprintf( '%s (rows: ~%s)', 'Ready', $dbh->getQuerySelector()->count() )
165
  : 'Missing';
166
 
src/lib/src/Modules/Plugin/Strings.php CHANGED
@@ -515,8 +515,8 @@ class Strings extends Base\Strings {
515
  __( 'Protect your security plugin not just your WordPress site', 'wp-simple-firewall' );
516
  __( 'Security Admin', 'wp-simple-firewall' );
517
  __( 'Audit Trail', 'wp-simple-firewall' );
 
518
  __( 'Get a view on what happens on your site, when it happens', 'wp-simple-firewall' );
519
- __( 'Audit Trail Viewer', 'wp-simple-firewall' );
520
  __( 'Automatic Updates', 'wp-simple-firewall' );
521
  __( 'Take back full control of WordPress automatic updates', 'wp-simple-firewall' );
522
  __( 'Comments SPAM', 'wp-simple-firewall' );
515
  __( 'Protect your security plugin not just your WordPress site', 'wp-simple-firewall' );
516
  __( 'Security Admin', 'wp-simple-firewall' );
517
  __( 'Audit Trail', 'wp-simple-firewall' );
518
+ __( 'Activity Log', 'wp-simple-firewall' );
519
  __( 'Get a view on what happens on your site, when it happens', 'wp-simple-firewall' );
 
520
  __( 'Automatic Updates', 'wp-simple-firewall' );
521
  __( 'Take back full control of WordPress automatic updates', 'wp-simple-firewall' );
522
  __( 'Comments SPAM', 'wp-simple-firewall' );
src/lib/src/Modules/Traffic/AjaxHandler.php CHANGED
@@ -28,7 +28,7 @@ class AjaxHandler extends Shield\Modules\BaseShield\AjaxHandler {
28
  break;
29
 
30
  default:
31
- throw new \Exception( 'Not a supported Audit Trail table sub_action: '.$action );
32
  }
33
  }
34
  catch ( \Exception $e ) {
28
  break;
29
 
30
  default:
31
+ throw new \Exception( 'Not a supported Activity Log table sub_action: '.$action );
32
  }
33
  }
34
  catch ( \Exception $e ) {
src/lib/src/Render/LocateTemplateDirs.php CHANGED
@@ -28,10 +28,12 @@ class LocateTemplateDirs {
28
  */
29
  protected function getCustomTemplateDirs() :array {
30
  $dir = $this->getCon()->getPluginSpec_Path( 'custom_templates' );
31
- $dirs = array_unique( [
32
- path_join( get_stylesheet_directory(), $dir ),
33
- path_join( get_template_directory(), $dir ),
34
- ] );
 
 
35
  return $this->getCon()->isPremiumActive() ? $dirs : [];
36
  }
37
  }
28
  */
29
  protected function getCustomTemplateDirs() :array {
30
  $dir = $this->getCon()->getPluginSpec_Path( 'custom_templates' );
31
+ $dirs = apply_filters( 'shield/custom_template_dirs',
32
+ array_unique( [
33
+ path_join( get_stylesheet_directory(), $dir ),
34
+ path_join( get_template_directory(), $dir ),
35
+ ] )
36
+ );
37
  return $this->getCon()->isPremiumActive() ? $dirs : [];
38
  }
39
  }
src/lib/src/Scans/Afs/Processing/MalFalsePositiveReporter.php CHANGED
@@ -10,9 +10,10 @@ use FernleafSystems\Wordpress\Services\Utilities\Integrations\WpHashes\Malware;
10
 
11
  class MalFalsePositiveReporter {
12
 
13
- const HASH_ALGO = 'sha1';
14
  use Modules\ModConsumer;
15
 
 
 
16
  public function reportResultItem( ResultItem $item, bool $isFalsePositive = true ) {
17
  $this->reportPath( $item->path_full, $isFalsePositive );
18
  $this->reportFileLines( $item->path_full, $item->mal_file_lines, $isFalsePositive );
10
 
11
  class MalFalsePositiveReporter {
12
 
 
13
  use Modules\ModConsumer;
14
 
15
+ const HASH_ALGO = 'sha1';
16
+
17
  public function reportResultItem( ResultItem $item, bool $isFalsePositive = true ) {
18
  $this->reportPath( $item->path_full, $isFalsePositive );
19
  $this->reportFileLines( $item->path_full, $item->mal_file_lines, $isFalsePositive );
src/lib/src/Scans/Afs/ResultItem.php CHANGED
@@ -44,6 +44,9 @@ class ResultItem extends Base\ResultItem {
44
  if ( !is_array( $value ) ) {
45
  $value = json_decode( base64_decode( $value ), true );
46
  }
 
 
 
47
  break;
48
  case 'mal_sig':
49
  $value = base64_decode( $value );
44
  if ( !is_array( $value ) ) {
45
  $value = json_decode( base64_decode( $value ), true );
46
  }
47
+ if ( !is_array( $value ) ) {
48
+ $value = []; // make sure it is always an array for strict types
49
+ }
50
  break;
51
  case 'mal_sig':
52
  $value = base64_decode( $value );
src/lib/vendor/composer/autoload_classmap.php CHANGED
@@ -107,6 +107,7 @@ return array(
107
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Read' => $baseDir . '/src/Controller/Config/Ops/Read.php',
108
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Save' => $baseDir . '/src/Controller/Config/Ops/Save.php',
109
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Controller' => $baseDir . '/src/Controller/Controller.php',
 
110
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\GetAllAvailableLocales' => $baseDir . '/src/Controller/I18n/GetAllAvailableLocales.php',
111
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\LoadTextDomain' => $baseDir . '/src/Controller/I18n/LoadTextDomain.php',
112
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Modes\\BaseMode' => $baseDir . '/src/Controller/Modes/BaseMode.php',
@@ -1204,6 +1205,7 @@ return array(
1204
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Code\\AssessPhpFile' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Code/AssessPhpFile.php',
1205
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Constants\\Regex' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Constants/Regex.php',
1206
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\PluginConsumer' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/PluginConsumer.php',
 
1207
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\WpUserConsumer' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/WpUserConsumer.php',
1208
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Data' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Data.php',
1209
  'FernleafSystems\\Wordpress\\Services\\Utilities\\DataManipulation' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/DataManipulation.php',
@@ -1302,6 +1304,7 @@ return array(
1302
  'FernleafSystems\\Wordpress\\Services\\Utilities\\ServiceProviders' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/ServiceProviders.php',
1303
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Ssl' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Ssl.php',
1304
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Users\\UserMeta' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Users/UserMeta.php',
 
1305
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeFilesBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeFilesBase.php',
1306
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeVersionsBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php',
1307
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\RepoBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/RepoBase.php',
107
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Read' => $baseDir . '/src/Controller/Config/Ops/Read.php',
108
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Save' => $baseDir . '/src/Controller/Config/Ops/Save.php',
109
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Controller' => $baseDir . '/src/Controller/Controller.php',
110
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Exceptions\\VersionMismatchException' => $baseDir . '/src/Controller/Exceptions/VersionMismatchException.php',
111
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\GetAllAvailableLocales' => $baseDir . '/src/Controller/I18n/GetAllAvailableLocales.php',
112
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\LoadTextDomain' => $baseDir . '/src/Controller/I18n/LoadTextDomain.php',
113
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Modes\\BaseMode' => $baseDir . '/src/Controller/Modes/BaseMode.php',
1205
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Code\\AssessPhpFile' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Code/AssessPhpFile.php',
1206
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Constants\\Regex' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Constants/Regex.php',
1207
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\PluginConsumer' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/PluginConsumer.php',
1208
+ 'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\RequestCacheConsumer' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/RequestCacheConsumer.php',
1209
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\WpUserConsumer' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/WpUserConsumer.php',
1210
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Data' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Data.php',
1211
  'FernleafSystems\\Wordpress\\Services\\Utilities\\DataManipulation' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/DataManipulation.php',
1304
  'FernleafSystems\\Wordpress\\Services\\Utilities\\ServiceProviders' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/ServiceProviders.php',
1305
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Ssl' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Ssl.php',
1306
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Users\\UserMeta' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/Users/UserMeta.php',
1307
+ 'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\ApiBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/ApiBase.php',
1308
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeFilesBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeFilesBase.php',
1309
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeVersionsBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php',
1310
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\RepoBase' => $vendorDir . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/RepoBase.php',
src/lib/vendor/composer/autoload_static.php CHANGED
@@ -294,6 +294,7 @@ class ComposerStaticInit4fc2c6daaffaf40b64b79b6d26830171
294
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Read' => __DIR__ . '/../..' . '/src/Controller/Config/Ops/Read.php',
295
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Save' => __DIR__ . '/../..' . '/src/Controller/Config/Ops/Save.php',
296
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Controller' => __DIR__ . '/../..' . '/src/Controller/Controller.php',
 
297
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\GetAllAvailableLocales' => __DIR__ . '/../..' . '/src/Controller/I18n/GetAllAvailableLocales.php',
298
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\LoadTextDomain' => __DIR__ . '/../..' . '/src/Controller/I18n/LoadTextDomain.php',
299
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Modes\\BaseMode' => __DIR__ . '/../..' . '/src/Controller/Modes/BaseMode.php',
@@ -1391,6 +1392,7 @@ class ComposerStaticInit4fc2c6daaffaf40b64b79b6d26830171
1391
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Code\\AssessPhpFile' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Code/AssessPhpFile.php',
1392
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Constants\\Regex' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Constants/Regex.php',
1393
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\PluginConsumer' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/PluginConsumer.php',
 
1394
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\WpUserConsumer' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/WpUserConsumer.php',
1395
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Data' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Data.php',
1396
  'FernleafSystems\\Wordpress\\Services\\Utilities\\DataManipulation' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/DataManipulation.php',
@@ -1489,6 +1491,7 @@ class ComposerStaticInit4fc2c6daaffaf40b64b79b6d26830171
1489
  'FernleafSystems\\Wordpress\\Services\\Utilities\\ServiceProviders' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/ServiceProviders.php',
1490
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Ssl' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Ssl.php',
1491
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Users\\UserMeta' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Users/UserMeta.php',
 
1492
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeFilesBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeFilesBase.php',
1493
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeVersionsBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php',
1494
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\RepoBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/RepoBase.php',
294
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Read' => __DIR__ . '/../..' . '/src/Controller/Config/Ops/Read.php',
295
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Config\\Ops\\Save' => __DIR__ . '/../..' . '/src/Controller/Config/Ops/Save.php',
296
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Controller' => __DIR__ . '/../..' . '/src/Controller/Controller.php',
297
+ 'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Exceptions\\VersionMismatchException' => __DIR__ . '/../..' . '/src/Controller/Exceptions/VersionMismatchException.php',
298
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\GetAllAvailableLocales' => __DIR__ . '/../..' . '/src/Controller/I18n/GetAllAvailableLocales.php',
299
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\I18n\\LoadTextDomain' => __DIR__ . '/../..' . '/src/Controller/I18n/LoadTextDomain.php',
300
  'FernleafSystems\\Wordpress\\Plugin\\Shield\\Controller\\Modes\\BaseMode' => __DIR__ . '/../..' . '/src/Controller/Modes/BaseMode.php',
1392
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Code\\AssessPhpFile' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Code/AssessPhpFile.php',
1393
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Constants\\Regex' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Constants/Regex.php',
1394
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\PluginConsumer' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/PluginConsumer.php',
1395
+ 'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\RequestCacheConsumer' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/RequestCacheConsumer.php',
1396
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Consumers\\WpUserConsumer' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Consumers/WpUserConsumer.php',
1397
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Data' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Data.php',
1398
  'FernleafSystems\\Wordpress\\Services\\Utilities\\DataManipulation' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/DataManipulation.php',
1491
  'FernleafSystems\\Wordpress\\Services\\Utilities\\ServiceProviders' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/ServiceProviders.php',
1492
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Ssl' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Ssl.php',
1493
  'FernleafSystems\\Wordpress\\Services\\Utilities\\Users\\UserMeta' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/Users/UserMeta.php',
1494
+ 'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\ApiBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/ApiBase.php',
1495
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeFilesBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeFilesBase.php',
1496
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\PluginThemeVersionsBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php',
1497
  'FernleafSystems\\Wordpress\\Services\\Utilities\\WpOrg\\Base\\RepoBase' => __DIR__ . '/..' . '/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/RepoBase.php',
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Base/PluginThemeVersionsBase.php CHANGED
@@ -2,31 +2,35 @@
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base;
4
 
 
 
5
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
6
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
7
 
8
  abstract class PluginThemeVersionsBase {
9
 
 
 
10
  /**
11
  * @return string[]
12
  */
13
- public function all() {
14
- $aVersions = array_filter( array_keys( $this->allVersionsUrls() ) );
15
- usort( $aVersions, 'version_compare' );
16
- return $aVersions;
17
  }
18
 
19
  /**
20
  * @return string[]
21
  */
22
- public function allVersionsUrls() {
23
  $versions = [];
24
  $slug = $this->getWorkingSlug();
25
  if ( !empty( $slug ) ) {
26
  try {
27
  $info = $this->getApi()
28
- ->setWorkingSlug( $slug )
29
- ->getInfo();
30
  $versions = $info->versions ?? [];
31
  }
32
  catch ( \Exception $e ) {
@@ -60,5 +64,30 @@ abstract class PluginThemeVersionsBase {
60
  * @param bool $verifyUrl
61
  * @return bool
62
  */
63
- abstract public function exists( $version, $verifyUrl = false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base;
4
 
5
+ use FernleafSystems\Wordpress\Services\Utilities\Consumers\RequestCacheConsumer;
6
+ use FernleafSystems\Wordpress\Services\Utilities\HttpUtil;
7
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
8
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
9
 
10
  abstract class PluginThemeVersionsBase {
11
 
12
+ use RequestCacheConsumer;
13
+
14
  /**
15
  * @return string[]
16
  */
17
+ public function all() :array {
18
+ $versions = array_filter( array_keys( $this->allVersionsUrls() ) );
19
+ usort( $versions, 'version_compare' );
20
+ return $versions;
21
  }
22
 
23
  /**
24
  * @return string[]
25
  */
26
+ public function allVersionsUrls() :array {
27
  $versions = [];
28
  $slug = $this->getWorkingSlug();
29
  if ( !empty( $slug ) ) {
30
  try {
31
  $info = $this->getApi()
32
+ ->setWorkingSlug( $slug )
33
+ ->getInfo();
34
  $versions = $info->versions ?? [];
35
  }
36
  catch ( \Exception $e ) {
64
  * @param bool $verifyUrl
65
  * @return bool
66
  */
67
+ public function exists( $version, $verifyUrl = false ) {
68
+
69
+ $url = $this->getUrlForVersion( $version );
70
+ $cacheKey = md5( serialize( [
71
+ 'url' => $url,
72
+ 'function' => 'version_exists'
73
+ ] ) );
74
+ $exists = $this->getCache( $cacheKey );
75
+
76
+ if ( is_null( $exists ) ) {
77
+ $exists = in_array( $version, $this->all() );
78
+ if ( $exists && $verifyUrl ) {
79
+ try {
80
+ ( new HttpUtil() )->checkUrl( $url );
81
+ }
82
+ catch ( \Exception $e ) {
83
+ $exists = false;
84
+ }
85
+ }
86
+ $this->addCache( $cacheKey, $exists );
87
+ }
88
+
89
+ return $exists;
90
+ }
91
+
92
+ abstract protected function getUrlForVersion( string $version );
93
  }
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Api.php CHANGED
@@ -2,16 +2,13 @@
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
4
 
5
- use FernleafSystems\Utilities\Data\Adapter\DynProperties;
 
6
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin\VOs\PluginInfoVO;
7
 
8
- /**
9
- * @property array $fields
10
- */
11
- class Api {
12
 
13
  use Base;
14
- use DynProperties;
15
 
16
  /**
17
  * @throws \Exception
@@ -37,8 +34,18 @@ class Api {
37
 
38
  $params = $this->getRawData();
39
  $params[ 'slug' ] = $this->getWorkingSlug();
 
40
 
41
- $response = \plugins_api( $cmd, $params );
 
 
 
 
 
 
 
 
 
42
 
43
  if ( \is_wp_error( $response ) ) {
44
  throw new \Exception( sprintf( '[PluginsApi Error] %s', $response->get_error_message() ) );
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
4
 
5
+ use FernleafSystems\Wordpress\Services\Services;
6
+ use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\ApiBase;
7
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin\VOs\PluginInfoVO;
8
 
9
+ class Api extends ApiBase {
 
 
 
10
 
11
  use Base;
 
12
 
13
  /**
14
  * @throws \Exception
34
 
35
  $params = $this->getRawData();
36
  $params[ 'slug' ] = $this->getWorkingSlug();
37
+ $params = Services::DataManipulation()->mergeArraysRecursive( $this->defaultParams(), $params );
38
 
39
+ $key = md5( serialize( array_merge( $params, [
40
+ 'cmd' => $cmd,
41
+ 'function' => 'plugins_api',
42
+ ] ) ) );
43
+
44
+ $response = $this->getCache( $key );
45
+ if ( is_null( $response ) ) {
46
+ $response = \plugins_api( $cmd, $params );
47
+ $this->addCache( $key, $response );
48
+ }
49
 
50
  if ( \is_wp_error( $response ) ) {
51
  throw new \Exception( sprintf( '[PluginsApi Error] %s', $response->get_error_message() ) );
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Plugin/Versions.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
4
 
5
- use FernleafSystems\Wordpress\Services\Utilities\HttpUtil;
6
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\PluginThemeVersionsBase;
7
 
8
  class Versions extends PluginThemeVersionsBase {
@@ -16,21 +15,7 @@ class Versions extends PluginThemeVersionsBase {
16
  return new Api();
17
  }
18
 
19
- /**
20
- * @param string $version
21
- * @param bool $verifyUrl
22
- * @return bool
23
- */
24
- public function exists( $version, $verifyUrl = false ) {
25
- $exists = in_array( $version, $this->all() );
26
- if ( $exists && $verifyUrl ) {
27
- try {
28
- ( new HttpUtil() )->checkUrl( Repo::GetUrlForPluginVersion( $this->getWorkingSlug(), $version ) );
29
- }
30
- catch ( \Exception $oE ) {
31
- $exists = false;
32
- }
33
- }
34
- return $exists;
35
  }
36
  }
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Plugin;
4
 
 
5
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\PluginThemeVersionsBase;
6
 
7
  class Versions extends PluginThemeVersionsBase {
15
  return new Api();
16
  }
17
 
18
+ protected function getUrlForVersion( string $version ) :string {
19
+ return Repo::GetUrlForPluginVersion( $this->getWorkingSlug(), $version );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
  }
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Theme/Api.php CHANGED
@@ -2,17 +2,16 @@
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
4
 
5
- use FernleafSystems\Utilities\Data\Adapter\DynProperties;
6
  use FernleafSystems\Wordpress\Services\Services;
 
7
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme\VOs\ThemeInfoVO;
8
 
9
  /**
10
  * @property array $fields
11
  */
12
- class Api {
13
 
14
  use Base;
15
- use DynProperties;
16
 
17
  /**
18
  * @throws \Exception
@@ -38,9 +37,18 @@ class Api {
38
 
39
  $params = $this->getRawData();
40
  $params[ 'slug' ] = $this->getWorkingSlug();
 
41
 
42
- $response = \themes_api( $cmd,
43
- Services::DataManipulation()->mergeArraysRecursive( $this->defaultParams(), $params ) );
 
 
 
 
 
 
 
 
44
 
45
  if ( \is_wp_error( $response ) ) {
46
  throw new \Exception( sprintf( '[ThemesApi Error] %s', $response->get_error_message() ) );
@@ -49,9 +57,6 @@ class Api {
49
  return (array)$response;
50
  }
51
 
52
- /**
53
- * @return array[]
54
- */
55
  protected function defaultParams() :array {
56
  return [
57
  'fields' => [
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
4
 
 
5
  use FernleafSystems\Wordpress\Services\Services;
6
+ use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\ApiBase;
7
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme\VOs\ThemeInfoVO;
8
 
9
  /**
10
  * @property array $fields
11
  */
12
+ class Api extends ApiBase {
13
 
14
  use Base;
 
15
 
16
  /**
17
  * @throws \Exception
37
 
38
  $params = $this->getRawData();
39
  $params[ 'slug' ] = $this->getWorkingSlug();
40
+ $params = Services::DataManipulation()->mergeArraysRecursive( $this->defaultParams(), $params );
41
 
42
+ $key = md5( serialize( array_merge( $params, [
43
+ 'cmd' => $cmd,
44
+ 'function' => 'themes_api',
45
+ ] ) ) );
46
+
47
+ $response = $this->getCache( $key );
48
+ if ( is_null( $response ) ) {
49
+ $response = \themes_api( $cmd, $params );
50
+ $this->addCache( $key, $response );
51
+ }
52
 
53
  if ( \is_wp_error( $response ) ) {
54
  throw new \Exception( sprintf( '[ThemesApi Error] %s', $response->get_error_message() ) );
57
  return (array)$response;
58
  }
59
 
 
 
 
60
  protected function defaultParams() :array {
61
  return [
62
  'fields' => [
src/lib/vendor/fernleafsystems/wordpress-services/src/Utilities/WpOrg/Theme/Versions.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
4
 
5
- use FernleafSystems\Wordpress\Services\Utilities\HttpUtil;
6
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\PluginThemeVersionsBase;
7
 
8
  class Versions extends PluginThemeVersionsBase {
@@ -16,21 +15,7 @@ class Versions extends PluginThemeVersionsBase {
16
  return new Api();
17
  }
18
 
19
- /**
20
- * @param string $version
21
- * @param bool $verifyUrl
22
- * @return bool
23
- */
24
- public function exists( $version, $verifyUrl = false ) {
25
- $exists = in_array( $version, $this->all() );
26
- if ( $exists && $verifyUrl ) {
27
- try {
28
- ( new HttpUtil() )->checkUrl( Repo::GetUrlForThemeVersion( $this->getWorkingSlug(), $version ) );
29
- }
30
- catch ( \Exception $e ) {
31
- $exists = false;
32
- }
33
- }
34
- return $exists;
35
  }
36
  }
2
 
3
  namespace FernleafSystems\Wordpress\Services\Utilities\WpOrg\Theme;
4
 
 
5
  use FernleafSystems\Wordpress\Services\Utilities\WpOrg\Base\PluginThemeVersionsBase;
6
 
7
  class Versions extends PluginThemeVersionsBase {
15
  return new Api();
16
  }
17
 
18
+ protected function getUrlForVersion( string $version ) :string {
19
+ return Repo::GetUrlForThemeVersion( $this->getWorkingSlug(), $version );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
  }
src/wizards/plugin.php CHANGED
@@ -340,7 +340,7 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
340
  'options' => __( 'When you load a module, you can access the options by clicking on the Options Panel link.', 'wp-simple-firewall' ),
341
  'wizards' => __( 'Launch helpful walk-through wizards for modules that have them.', 'wp-simple-firewall' ),
342
  'help' => __( 'Each module also has a brief overview help section - there is more in-depth help available.', 'wp-simple-firewall' ),
343
- 'actions' => __( 'Certain modules have extra actions and features, e.g. Audit Trail Viewer.', 'wp-simple-firewall' )
344
  .' '.__( 'Note: Not all modules have the actions section', 'wp-simple-firewall' ),
345
  'module_onoff' => __( 'Each module has an Enable/Disable checkbox to turn on/off all processing for that module', 'wp-simple-firewall' ),
346
  'option_help' => __( 'To help you understand each option, most of them have a more info link, and/or a blog link, to read more', 'wp-simple-firewall' ),
@@ -579,12 +579,12 @@ class ICWP_WPSF_Wizard_Plugin extends ICWP_WPSF_Wizard_BaseWpsf {
579
 
580
  $bSuccess = $oMod->isModuleEnabled() === $bEnabled;
581
  if ( $bSuccess ) {
582
- $sMessage = sprintf( '%s has been %s.', __( 'Audit Trail', 'wp-simple-firewall' ),
583
  $oMod->isModuleEnabled() ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
584
  );
585
  }
586
  else {
587
- $sMessage = sprintf( __( '%s setting could not be changed at this time.', 'wp-simple-firewall' ), __( 'Audit Trail', 'wp-simple-firewall' ) );
588
  }
589
  }
590
 
340
  'options' => __( 'When you load a module, you can access the options by clicking on the Options Panel link.', 'wp-simple-firewall' ),
341
  'wizards' => __( 'Launch helpful walk-through wizards for modules that have them.', 'wp-simple-firewall' ),
342
  'help' => __( 'Each module also has a brief overview help section - there is more in-depth help available.', 'wp-simple-firewall' ),
343
+ 'actions' => __( 'Certain modules have extra actions and features, e.g. Activity Log Viewer.', 'wp-simple-firewall' )
344
  .' '.__( 'Note: Not all modules have the actions section', 'wp-simple-firewall' ),
345
  'module_onoff' => __( 'Each module has an Enable/Disable checkbox to turn on/off all processing for that module', 'wp-simple-firewall' ),
346
  'option_help' => __( 'To help you understand each option, most of them have a more info link, and/or a blog link, to read more', 'wp-simple-firewall' ),
579
 
580
  $bSuccess = $oMod->isModuleEnabled() === $bEnabled;
581
  if ( $bSuccess ) {
582
+ $sMessage = sprintf( '%s has been %s.', __( 'Activity Log', 'wp-simple-firewall' ),
583
  $oMod->isModuleEnabled() ? __( 'Enabled', 'wp-simple-firewall' ) : __( 'Disabled', 'wp-simple-firewall' )
584
  );
585
  }
586
  else {
587
+ $sMessage = sprintf( __( '%s setting could not be changed at this time.', 'wp-simple-firewall' ), __( 'Activity Log', 'wp-simple-firewall' ) );
588
  }
589
  }
590
 
templates/twig/admin/admin_dashboard_widget.twig CHANGED
@@ -2,12 +2,6 @@
2
  <img src="{{ imgs.logo }}" alt="Shield Security Logo" width="100%">
3
  </a>
4
 
5
- <h3 class="subheader">
6
- {{ strings.security_progress }}
7
- {% if flags.show_internal_links %}
8
- <small>[<a href="{{ hrefs.overview }}">{{ strings.progress_overview }}</a>]</small>
9
- {% endif %}
10
- </h3>
11
  <div class="shield-progress-bar
12
  {% if vars.security_progress < 45 %}
13
  red
@@ -15,9 +9,10 @@
15
  orange
16
  {% endif %}
17
  ">
18
- <div class="thebar" style="width: {{ vars.security_progress }}%">
 
19
  <div class="thepercent">{{ vars.security_progress }}&percnt;</div>
20
- </div>
21
  </div>
22
 
23
  <h3 class="subheader">
2
  <img src="{{ imgs.logo }}" alt="Shield Security Logo" width="100%">
3
  </a>
4
 
 
 
 
 
 
 
5
  <div class="shield-progress-bar
6
  {% if vars.security_progress < 45 %}
7
  red
9
  orange
10
  {% endif %}
11
  ">
12
+ <a class="thebar" style="width: {{ vars.security_progress }}%"
13
+ href="{{ hrefs.overview }}" title="{{ strings.progress_overview }}">
14
  <div class="thepercent">{{ vars.security_progress }}&percnt;</div>
15
+ </a>
16
  </div>
17
 
18
  <h3 class="subheader">
templates/twig/pages/block/block_page_authorfishing.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% extends '/pages/block/block_page_standard.twig' %}
templates/twig/pages/block/block_page_firewall.twig ADDED
@@ -0,0 +1 @@
 
1
+ {% extends '/pages/block/block_page_standard.twig' %}
templates/twig/pages/block/block_page_standard.twig CHANGED
@@ -73,8 +73,8 @@
73
  {% endblock %}
74
 
75
  {% block body_footer %}
76
- <div class="col-lg-6 col-md-9 mx-auto text-start mt-3 mb-5">
77
-
78
  <div class="card mb-3">
79
  <div class="row g-0">
80
  <div class="col-4 d-flex justify-content-center align-items-center">
@@ -96,11 +96,8 @@
96
  </div>
97
  </div>
98
  </div>
99
- {# <div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5"> #}
100
- {# <button type="button" class="btn btn-primary btn-lg px-4 me-sm-3">Primary button</button> #}
101
- {# <button type="button" class="btn btn-outline-secondary btn-lg px-4">Secondary</button> #}
102
- {# </div> #}
103
  </div>
 
104
  {% endblock %}
105
 
106
  {% block body_end %}
73
  {% endblock %}
74
 
75
  {% block body_footer %}
76
+ {% if not flags.is_whitelabelled %}
77
+ <div class="col-lg-6 col-md-9 mx-auto text-start mt-3 mb-5">
78
  <div class="card mb-3">
79
  <div class="row g-0">
80
  <div class="col-4 d-flex justify-content-center align-items-center">
96
  </div>
97
  </div>
98
  </div>
 
 
 
 
99
  </div>
100
+ {% endif %}
101
  {% endblock %}
102
 
103
  {% block body_end %}
templates/twig/wizard/slides/gdpr/results.twig CHANGED
@@ -10,7 +10,7 @@
10
  {{ icwp_macros.formInput_Checkbox(
11
  'ConfirmDelete', 'Y', 'Confirm Deletion Of All Results',
12
  'Click to confirm that you wish to delete all search results.',
13
- 'You will not be able to recover these audit trail entries after you delete them.',
14
  'ConfirmDelete'
15
  ) }}
16
  {{ icwp_macros.formInput_Hidden( 'wizard-step', 'confirm-results-delete' ) }}
10
  {{ icwp_macros.formInput_Checkbox(
11
  'ConfirmDelete', 'Y', 'Confirm Deletion Of All Results',
12
  'Click to confirm that you wish to delete all search results.',
13
+ 'You will not be able to recover these Activity Logs after you delete them.',
14
  'ConfirmDelete'
15
  ) }}
16
  {{ icwp_macros.formInput_Hidden( 'wizard-step', 'confirm-results-delete' ) }}
templates/twig/wizard/slides/welcome/audit_trail.twig CHANGED
@@ -1,7 +1,7 @@
1
  {% extends 'wizard/slides/common/base.twig' %}
2
 
3
  {% block slide_body %}
4
- {{ icwp_macros.slideTitle( 'Audit Trail and Logging' ) }}
5
 
6
  <p class="description">Turn on the Audit Trail below so you can track activity on your site and troubleshoot problems more easily.</p>
7
 
@@ -29,10 +29,10 @@
29
  'N': '<span>Turn Off</span> - Do not log important site events'
30
  }
31
  %}
32
- {{ icwp_macros.formInput_Radio( 'AuditTrailOption', radiovalues, 'Audit Trail' ) }}
33
 
34
  {{ icwp_macros.formInput_Hidden( 'wizard-step', 'audit_trail' ) }}
35
- {{ icwp_macros.formInput_Submit( 'Update The Audit Trail Setting' ) }}
36
  </form>
37
 
38
  {% endblock %}
1
  {% extends 'wizard/slides/common/base.twig' %}
2
 
3
  {% block slide_body %}
4
+ {{ icwp_macros.slideTitle( 'Activity Log' ) }}
5
 
6
  <p class="description">Turn on the Audit Trail below so you can track activity on your site and troubleshoot problems more easily.</p>
7
 
29
  'N': '<span>Turn Off</span> - Do not log important site events'
30
  }
31
  %}
32
+ {{ icwp_macros.formInput_Radio( 'AuditTrailOption', radiovalues, 'Activity Log' ) }}
33
 
34
  {{ icwp_macros.formInput_Hidden( 'wizard-step', 'audit_trail' ) }}
35
+ {{ icwp_macros.formInput_Submit( 'Update The Activity Log Setting' ) }}
36
  </form>
37
 
38
  {% endblock %}