=== NETSENSAI Shield === Contributors: rgierlicki Tags: security, cybersecurity, hardening, wordpress-security, protection Requires at least: 5.6 Tested up to: 6.8 Stable tag: 1.4.5 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Hardens and protects your site by locking down login, REST API, XML-RPC, file editor, and applying HTTP security headers. == Description == NETSENSAI Shield offers a range of security features, including: * Changing the login URL to reduce brute force attack risks. * Disabling the REST API (WP API JSON) for non-logged-in users. * Disabling XML-RPC to prevent unauthorized access. * Disabling the WordPress file editor to avoid accidental or malicious changes. * Disabling Application Passwords to block unauthorized API access. * **Applying advanced HTTP security headers (e.g., HSTS, X-Frame-Options, Content-Security-Policy).** * **Integration with W3 Total Cache**: * Permanently disable `.htaccess` writes by W3TC * Runtime disabling of Page Cache UI * One-time full cache flush on first admin page load * Automatic cache flush on Secure Options save * Physical cleanup and permanent disable via the W3TC API * **Suppression of Site Health REST API availability notices** for non-logged-in users (removes false Site Health errors while maintaining full API blocking). The free version provides both core and advanced Level 3 security functionalities. A PRO version offers extended support, additional features, and automatic protection enhancements. == Installation == 1. Download NETSENSAI Shield from the WordPress.org repository or upload the plugin files to `/wp-content/plugins/netsensai-shield/`. 2. Activate the plugin on the WordPress Admin Dashboard under **Plugins**. 3. Navigate to **Settings > Secure Options** and configure as needed. == Frequently Asked Questions == = How do I change the WordPress login URL? = Go to **Settings > Secure Options** and enter your preferred path in the **Change Login URL** field. = How does disabling WP API JSON improve security? = It reduces exposure of your site’s data via the REST API for non-logged-in users. = Why disable XML-RPC? = Disabling XML-RPC helps protect against brute force attacks targeting that protocol. = What is the effect of disabling the file editor? = It prevents code modifications via the dashboard, reducing the risk of malicious changes. = What headers are included in Level 3 security? = The plugin can apply: * **Strict-Transport-Security (HSTS)** * **X-Frame-Options** * **X-Content-Type-Options** * **Content-Security-Policy (CSP)** * **Referrer-Policy** * **Permissions-Policy** = How does the W3 Total Cache integration work? = On activation or settings save, NETSENSAI Shield clears the W3TC cache, disables the Page Cache UI to prevent conflicts, and blocks future `.htaccess` writes by W3TC. = How does suppression of the Site Health REST API notice work? = The plugin removes the default REST API availability test in Site Health for guest users, while still enforcing your REST API blocking settings. == Screenshots == 1. Secure Options Settings Page – intuitive panel for configuring security features. 2. Custom Login URL Setting – change your login path for improved security. 3. Disable XML-RPC and WP API JSON – restrict unauthorized access. 4. Security Headers Settings – activate HTTP headers with one click. 5. W3TC Integration Panel – view synchronization status with W3 Total Cache. == Changelog == = 1.4.5 = * Scripts and styles now enqueue **only** on Settings → Secure Options (hook_suffix check). * `assets/script.js` is versioned via `filemtime()` to bust cache on each update. * Removed legacy, unconditional enqueue—eliminates console errors about missing toggle IDs. * Streamlined admin enqueue logic into a single `ns_shield_admin_enqueue_assets()` function. = 1.4.4 = * Fixed custom login URL in password reset flow: - Password reset emails now include the correct custom-slug link with full query parameters. - “Set new password” form action and hidden fields (login, rp_key) now function under the custom URL without 404 errors. - Disabled WP canonical redirects on the custom login page to preserve login/key parameters. * Removed all `error_log()` debug hooks. * Streamlined `site_url` and `login_form_action` filters to catch every wp-login.php occurrence. = 1.4.3 = * Fixed readme parsing by removing Markdown syntax from the License URI and ensuring a plain URL. * Updated short description to fit 150-character limit. * Removed calls to `error_log()` flagged by Plugin Check. = 1.4.2 = * Minor formatting cleanup in readme; bumped version to 1.4.2. = 1.4.1 = * Compliance updates for WordPress.org (tags, description length); bumped version to 1.4.1. = 1.4 = * Added integration with W3 Total Cache (cache flushing, UI disable, `.htaccess` protection) and hides Site Health errors related to the REST API for non-logged-in users. = 1.3 = * Restored Level 3: Advanced Security features in free version. Improved popup behavior, translations added, Plugin Check compatibility enhanced. = 1.2 = * Level 3 features were temporarily moved to PRO; version 1.3 restores them. == Upgrade Notice == = 1.4.5 = Scripts and styles now load only on the Secure Options page and are versioned by file modification time—clears up console errors and ensures latest code is always loaded. No additional configuration required; simply update. = 1.4.4 = This release fixes the password reset flow under a custom login URL by preserving all query parameters and removing debugging code. No action required—simply update. = 1.4.3 = This release fixes README parsing on WordPress.org by removing Markdown syntax from the License URI and shortening the short description. = 1.4.2 = Minor formatting cleanup; no action required. = 1.4.1 = Compliance updates for WordPress.org; no action required. = 1.4 = Recommended update for improved security and W3TC integration. = 1.3 = Recommended update to restore advanced security in free version and improve compatibility. = 1.2 = Recommended update to switch Level 3 features between free and PRO as noted.