Changeset 3754541
- Timestamp:
- 10/19/2026 10:48:39 AM (4 weeks ago)
- Location:
- guardforge
- Files:
-
- 26 edited
- 1 copied
-
tags/1.6.4 (copied) (copied from guardforge/trunk )
-
tags/1.6.4/admin/partials/hardening-score.php (modified) (1 diff)
-
tags/1.6.4/admin/partials/settings.php (modified) (3 diffs)
-
tags/1.6.4/admin/partials/unblock.php (modified) (1 diff)
-
tags/1.6.4/guardforge.php (modified) (3 diffs)
-
tags/1.6.4/includes/class-bruteforce.php (modified) (3 diffs)
-
tags/1.6.4/includes/class-core.php (modified) (2 diffs)
-
tags/1.6.4/includes/class-hardening-score.php (modified) (4 diffs)
-
tags/1.6.4/includes/class-hardening.php (modified) (7 diffs)
-
tags/1.6.4/includes/class-options.php (modified) (4 diffs)
-
tags/1.6.4/includes/class-schema-manager.php (modified) (1 diff)
-
tags/1.6.4/includes/class-two-factor.php (modified) (3 diffs)
-
tags/1.6.4/languages/guardforge.pot (modified) (23 diffs)
-
tags/1.6.4/readme.txt (modified) (4 diffs)
-
trunk/admin/partials/hardening-score.php (modified) (1 diff)
-
trunk/admin/partials/settings.php (modified) (3 diffs)
-
trunk/admin/partials/unblock.php (modified) (1 diff)
-
trunk/guardforge.php (modified) (3 diffs)
-
trunk/includes/class-bruteforce.php (modified) (3 diffs)
-
trunk/includes/class-core.php (modified) (2 diffs)
-
trunk/includes/class-hardening-score.php (modified) (4 diffs)
-
trunk/includes/class-hardening.php (modified) (7 diffs)
-
trunk/includes/class-options.php (modified) (4 diffs)
-
trunk/includes/class-schema-manager.php (modified) (1 diff)
-
trunk/includes/class-two-factor.php (modified) (3 diffs)
-
trunk/languages/guardforge.pot (modified) (23 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
guardforge/tags/1.6.4/admin/partials/hardening-score.php
r3731705 r3754541 257 257 </p> 258 258 259 <?php if ( GUARDFORGE_Options::get( ' disable_rest_api' ) ) : ?>259 <?php if ( GUARDFORGE_Options::get( 'rest_lockdown' ) ) : ?> 260 260 <div class="gf-notice gf-notice-warn"> 261 261 ⚠ <?php esc_html_e( 'Your REST API is restricted to signed-in callers. GuardForge keeps this one route reachable on its own, so the badge still answers — you do not need to widen the allowlist for it.', 'guardforge' ); ?> -
guardforge/tags/1.6.4/admin/partials/settings.php
r3752344 r3754541 474 474 <?php 475 475 $guardforge_render_toggle( 'disable_xmlrpc', __( 'Disable XML-RPC', 'guardforge' ), __( 'Blocks xmlrpc.php — a primary DDoS / brute-force vector.', 'guardforge' ) ); 476 $guardforge_render_toggle( 'disable_rest_api', __( ' Restrict REST API to logged-in users', 'guardforge' ), __( 'Anonymous REST access is limited to the namespaces in the allowlist below.', 'guardforge' ) );476 $guardforge_render_toggle( 'disable_rest_api', __( 'Keep user records out of the REST API', 'guardforge' ), __( 'Visitors and customers cannot list your users or read their records through the REST API, the usual way login names are collected. Checkout, forms and webhooks keep working.', 'guardforge' ) ); 477 477 $guardforge_render_toggle( 'disable_rest_comments', __( 'Forbid comments via REST', 'guardforge' ), __( 'Blocks POST /wp/v2/comments.', 'guardforge' ) ); 478 $guardforge_render_toggle( 'rest_lockdown', __( 'Close the whole REST API to visitors who are not signed in', 'guardforge' ), __( 'Only the namespaces in the REST API allowlist stay open to them. Anything that talks to your site through the REST API without signing in stops working unless its namespace is on that list.', 'guardforge' ), 'opt' ); 479 $guardforge_rest_casualties = GUARDFORGE_Hardening::lockdown_casualties( GUARDFORGE_Hardening::parse_lines( (string) $opts['rest_allowlist'] ) ); 480 ?> 481 <div class="gf-notice gf-notice-warn"> 482 ⚠ <?php 483 if ( ! empty( $opts['rest_lockdown'] ) ) { 484 esc_html_e( 'The REST API is closed to visitors who are not signed in.', 'guardforge' ); 485 } else { 486 esc_html_e( 'Before you close the whole REST API: it breaks the WooCommerce block cart and checkout, contact forms, webhooks other services send to your site, and embeds of your posts on other sites, unless their namespaces are in the allowlist.', 'guardforge' ); 487 } 488 ?> 489 <?php if ( $guardforge_rest_casualties ) : ?> 490 <br /><?php 491 if ( ! empty( $opts['rest_lockdown'] ) ) { 492 esc_html_e( 'Not working for them on this site right now:', 'guardforge' ); 493 } else { 494 esc_html_e( 'On this site, these would stop working for visitors:', 'guardforge' ); 495 } 496 ?> 497 <ul style="margin:4px 0 0 18px;list-style:disc"> 498 <?php foreach ( $guardforge_rest_casualties as $guardforge_rest_casualty ) : ?> 499 <li><?php echo esc_html( $guardforge_rest_casualty['label'] ); ?> — <?php 500 echo wp_kses( 501 sprintf( 502 /* translators: %s: a REST namespace such as wc/store */ 503 esc_html__( 'add %s to the allowlist to keep it', 'guardforge' ), 504 '<code>' . esc_html( $guardforge_rest_casualty['namespace'] ) . '</code>' 505 ), 506 [ 'code' => [] ] 507 ); 508 ?></li> 509 <?php endforeach; ?> 510 </ul> 511 <?php endif; ?> 512 </div> 513 <?php 478 514 $guardforge_render_toggle( 'disable_embed', __( 'Disable oEmbed discovery', 'guardforge' ), __( 'Removes /oembed information leaks.', 'guardforge' ), 'opt' ); 479 515 $guardforge_render_toggle( 'disable_pingback', __( 'Disable self-pingbacks', 'guardforge' ), __( 'Blocks pingbacks pointing at your own URLs.', 'guardforge' ), 'opt' ); … … 490 526 $guardforge_render_toggle( 'disable_user_enumeration', __( 'Block user enumeration', 'guardforge' ), __( 'Redirects ?author=N and hides anonymous /wp/v2/users.', 'guardforge' ) ); 491 527 $guardforge_render_toggle( 'security_headers', __( 'Send security HTTP headers', 'guardforge' ), __( 'Referrer-Policy, X-Content-Type-Options, X-Frame-Options, Permissions-Policy.', 'guardforge' ) ); 492 $guardforge_render_toggle( 'login_captcha_math', __( 'Math captcha on login', 'guardforge' ), __( 'Adds an a + b = ? challenge to the login form.', 'guardforge' ), 'opt' );528 $guardforge_render_toggle( 'login_captcha_math', __( 'Math captcha on login', 'guardforge' ), __( 'Adds an a + b = ? challenge to the WordPress login page. Sign-in forms of shops and membership plugins are not affected, so customers can still log in.', 'guardforge' ), 'opt' ); 493 529 ?> 494 530 </div> … … 701 737 <label><?php esc_html_e( 'REST API allowlist', 'guardforge' ); ?></label> 702 738 <textarea name="rest_allowlist" rows="3"><?php echo esc_textarea( $opts['rest_allowlist'] ); ?></textarea> 703 <div class="gf-field-desc"><?php esc_html_e( ' One namespace prefix per line. Routes whose namespace starts with one of these remain accessible to anonymous callers (oembed, formforge submissions, etc.).', 'guardforge' ); ?></div>739 <div class="gf-field-desc"><?php esc_html_e( 'Used only when the whole REST API is closed to visitors. One route per line; it stays open together with everything under it. The defaults keep embeds, WooCommerce checkout and the public endpoints of Avakode plugins working.', 'guardforge' ); ?></div> 704 740 </div> 705 741 <div class="gf-field" style="grid-column:1/-1"> -
guardforge/tags/1.6.4/admin/partials/unblock.php
r3731705 r3754541 10 10 11 11 if ( isset( $_POST['guardforge_unblock_ip'] ) && check_admin_referer( 'guardforge_unblock_ip' ) ) { 12 $guardforge_ip = sanitize_text_field( wp_unslash( $_POST['guardforge_unblock_ip'] ) ); 13 delete_transient( GUARDFORGE_Bruteforce::attempts_key( $guardforge_ip ) ); 14 /* translators: %s is the IP address that was unblocked. */ 15 echo '<div class="gf-notice gf-notice-ok">✓ ' . sprintf( esc_html__( 'IP %s unblocked.', 'guardforge' ), '<code>' . esc_html( $guardforge_ip ) . '</code>' ) . '</div>'; 12 $guardforge_ip = sanitize_text_field( wp_unslash( $_POST['guardforge_unblock_ip'] ) ); 13 // An address typed in the box, or the lockout key from the list below. 14 $guardforge_lift = GUARDFORGE_Bruteforce::instance()->unblock( $guardforge_ip ); 15 if ( $guardforge_lift === 'ip' ) { 16 /* translators: %s is the IP address that was unblocked. */ 17 echo '<div class="gf-notice gf-notice-ok">✓ ' . sprintf( esc_html__( 'IP %s unblocked.', 'guardforge' ), '<code>' . esc_html( $guardforge_ip ) . '</code>' ) . '</div>'; 18 } elseif ( $guardforge_lift === 'key' ) { 19 echo '<div class="gf-notice gf-notice-ok">✓ ' . esc_html__( 'Lockout lifted.', 'guardforge' ) . '</div>'; 20 } else { 21 echo '<div class="gf-notice gf-notice-warn">' . esc_html__( 'That is not an IP address, so nothing was unblocked.', 'guardforge' ) . '</div>'; 22 } 16 23 } 17 24 -
guardforge/tags/1.6.4/guardforge.php
r3752344 r3754541 4 4 * Plugin URI: https://guardforge.app 5 5 * Description: Hardening, brute-force protection, two-factor authentication, file-integrity monitoring, audit log and Content-Security-Policy for WordPress. The Pro add-on adds a WAF, malware scanner, CVE feed, Geo-IP and alerts. 6 * Version: 1.6. 36 * Version: 1.6.4 7 7 * Author: Avakode 8 8 * Author URI: https://avakode.com … … 17 17 } 18 18 19 define( 'GUARDFORGE_VERSION', '1.6. 3' );20 define( 'GUARDFORGE_DB_VERSION', '1.6. 0' ); // First screen: the switch-on dates (guardforge_*_enabled_since) are stamped once on upgrade.19 define( 'GUARDFORGE_VERSION', '1.6.4' ); 20 define( 'GUARDFORGE_DB_VERSION', '1.6.4' ); // 1.6.4: REST settings migrated (narrow protection + opt-in lockdown). 1.6.0: switch-on dates stamped once. 21 21 define( 'GUARDFORGE_DIR', plugin_dir_path( __FILE__ ) ); 22 22 define( 'GUARDFORGE_URL', plugin_dir_url( __FILE__ ) ); … … 287 287 require_once $guardforge_feedback_file; 288 288 } 289 // The connection of a site to an Avakode account's credits (the AJAX handlers and the return 290 // from avakode.com). It belongs to the AI client: the wp.org package has neither, so it has 291 // no connection either. 292 if ( class_exists( 'GUARDFORGE_Forge_API' ) ) { 293 $guardforge_credits = GUARDFORGE_Forge_API::credits_connect(); 294 if ( $guardforge_credits ) { 295 $guardforge_credits->register(); 296 } 297 } 289 // The connection of a site to an Avakode account's credits is built on init, not here: building 290 // it translates its sentences, and asking for the 'guardforge' text domain before init makes 291 // WordPress 6.7+ log "_load_textdomain_just_in_time was called incorrectly" on every admin 292 // request. Priority 1 is still ahead of admin-ajax.php and of the return from avakode.com. 293 add_action( 'init', 'guardforge_register_credits_connect', 1 ); 298 294 } 299 295 } 300 296 add_action( 'plugins_loaded', 'guardforge_init', 5 ); 297 298 /** 299 * Registers the connection of a site to an Avakode account's credits (the AJAX handlers and the 300 * return from avakode.com). It belongs to the AI client: the wp.org package has neither, so it has 301 * no connection either. 302 * 303 * @return void 304 */ 305 function guardforge_register_credits_connect() { 306 if ( ! class_exists( 'GUARDFORGE_Forge_API' ) ) { 307 return; 308 } 309 $guardforge_credits = GUARDFORGE_Forge_API::credits_connect(); 310 if ( $guardforge_credits ) { 311 $guardforge_credits->register(); 312 } 313 } 301 314 302 315 register_activation_hook( __FILE__, function () { -
guardforge/tags/1.6.4/includes/class-bruteforce.php
r3736618 r3754541 24 24 } 25 25 26 /** Whether this request's wrong application password has been counted (see on_app_password_failed). */ 27 private $app_password_failure_counted = false; 28 26 29 private function __construct() { 27 30 add_action( 'login_init', [ $this, 'maybe_block_login' ], 1 ); 28 add_action( 'wp_login_failed', [ $this, 'on_login_failed' ] ); 31 // login_init is fired by wp-login.php only. A login made anywhere else 32 // (the shop's My Account form, a membership form, xmlrpc) goes through 33 // authenticate, so the lockout is asked there too — last, after every 34 // other handler: core's username/password handler (priority 20) finds 35 // the user and checks the password itself and ignores the WP_Error it 36 // is handed, so a refusal placed ahead of it never held against the 37 // correct password. 38 add_filter( 'authenticate', [ $this, 'refuse_locked_login' ], PHP_INT_MAX, 3 ); 39 // The failure hook passes the error so a refusal is not counted again. 40 add_action( 'wp_login_failed', [ $this, 'on_login_failed' ], 10, 2 ); 41 // Application passwords (REST Basic auth) fail through their own hook. 42 add_action( 'application_password_failed_authentication', [ $this, 'on_app_password_failed' ] ); 43 add_filter( 'rest_authentication_errors', [ $this, 'refuse_locked_basic_auth' ], 5 ); 29 44 add_action( 'wp_login', [ $this, 'on_login_success' ], 10, 2 ); 30 45 add_action( 'guardforge_log_gc_cron', [ $this, 'gc_old_logs' ] ); … … 64 79 } 65 80 66 public function on_login_failed( $username ) { 81 /** 82 * Whether the caller's address is out of tries right now, by the same 83 * rules maybe_block_login applies: protection on, address not listed, 84 * threshold reached, and the site not a staging copy. 85 */ 86 private function is_locked_out() { 87 if ( ! GUARDFORGE_Options::get( 'brute_force_protection' ) ) { 88 return false; 89 } 90 $ip = GUARDFORGE_Ip::client_ip(); 91 if ( $this->is_whitelisted( $ip ) ) { 92 return false; 93 } 94 if ( $this->get_attempts( $ip ) < (int) GUARDFORGE_Options::get( 'bf_max_attempts' ) ) { 95 return false; 96 } 97 return ! GUARDFORGE_Staging::is_active(); 98 } 99 100 private function locked_error() { 101 $minutes = (int) GUARDFORGE_Options::get( 'bf_lockout_minutes' ); 102 return new WP_Error( 103 'guardforge_locked', 104 sprintf( 105 /* translators: %d is the lockout window in minutes. */ 106 esc_html__( 'Too many failed attempts. Try again in %d minutes.', 'guardforge' ), 107 $minutes 108 ), 109 [ 'status' => 429 ] 110 ); 111 } 112 113 /** 114 * authenticate, last in line: refuse a login from an address that is out 115 * of tries, whatever the handlers before it decided — a WP_User from the 116 * right password included. A call with no credentials (a logout, a cookie 117 * check) is not a login and is left alone. 118 */ 119 public function refuse_locked_login( $user, $username = '', $password = '' ) { 120 if ( (string) $username === '' && (string) $password === '' ) { 121 return $user; 122 } 123 return $this->is_locked_out() ? $this->locked_error() : $user; 124 } 125 126 /** 127 * rest_authentication_errors, early: a request that really tries to log in 128 * with Basic credentials (an application password) from a locked address 129 * gets the refusal even if the password was right, so guessing yields 130 * nothing. A request without them is a visitor reading the public API, and 131 * keeps reading it. 132 * 133 * "Really tries" is decided the way core decides it: both halves of the 134 * header must have come (PHP_AUTH_USER and PHP_AUTH_PW), and a user found 135 * by the login cookie comes first, because core tries the application 136 * password only when no cookie user was found. A web server that protects 137 * the admin with htpasswd leaves the same two variables behind on every 138 * request, and an administrator behind it with a valid cookie is not 139 * guessing anything: refusing that request would take the block editor's 140 * REST calls away from an editor on a locked address. 141 */ 142 public function refuse_locked_basic_auth( $result ) { 143 if ( ! empty( $result ) ) { 144 return $result; 145 } 146 if ( empty( $_SERVER['PHP_AUTH_USER'] ) || ! isset( $_SERVER['PHP_AUTH_PW'] ) ) { 147 return $result; 148 } 149 if ( $this->cookie_user_id() > 0 ) { 150 return $result; 151 } 152 return $this->is_locked_out() ? $this->locked_error() : $result; 153 } 154 155 /** 156 * The user the login cookie names, 0 when there is none: the answer core's 157 * determine_current_user gives at priority 10 and 20 before it looks at an 158 * application password (the auth cookie, then the logged-in cookie that 159 * front-end and REST requests carry). It reads the cookies only and sets 160 * no current user, so it cannot start the application-password check 161 * itself. 162 */ 163 private function cookie_user_id() { 164 if ( function_exists( 'wp_validate_auth_cookie' ) ) { 165 $id = wp_validate_auth_cookie( '' ); 166 if ( $id ) { 167 return (int) $id; 168 } 169 if ( function_exists( 'wp_validate_logged_in_cookie' ) ) { 170 return (int) wp_validate_logged_in_cookie( false ); 171 } 172 } 173 return 0; 174 } 175 176 /** 177 * A wrong application password over REST: a failed login like any other. 178 * XML-RPC is left to wp_login_failed, which the same attempt also fires. 179 * 180 * One request carries one Basic header, so it is one guess however often 181 * core works the current user out again (a plugin that resets it makes 182 * core check the same password a second time and fire this again). 183 */ 184 public function on_app_password_failed( $error = null ) { 185 if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { 186 return; 187 } 188 if ( $this->app_password_failure_counted ) { 189 return; 190 } 191 $this->app_password_failure_counted = true; 192 $username = isset( $_SERVER['PHP_AUTH_USER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) ) : ''; 193 $this->on_login_failed( $username ); 194 } 195 196 public function on_login_failed( $username, $error = null ) { 197 // Our own refusal is not a new guess; counting it would push the end of 198 // the lockout out on every retry. 199 if ( $error instanceof WP_Error && $error->get_error_code() === 'guardforge_locked' ) { 200 return; 201 } 67 202 if ( ! GUARDFORGE_Options::get( 'brute_force_protection' ) ) { 68 203 return; … … 148 283 } 149 284 285 /** 286 * Lift a lockout, by address or by the key the "Active lockouts" list 287 * shows. That list cannot show the address — it is hashed into the key — 288 * so its Unblock button posts the key, and treating that as an address 289 * hashed it a second time and cleared a counter that was never there. 290 * 291 * A key is accepted only in the exact shape this class writes 292 * (prefix + md5), so a posted value can never name another transient. 293 * 294 * @return string 'key', 'ip', or '' when the value is neither (nothing is deleted). 295 */ 296 public function unblock( $subject ) { 297 $subject = trim( (string) $subject ); 298 if ( preg_match( '/^' . preg_quote( self::ATTEMPTS_TRANSIENT_PREFIX, '/' ) . '[0-9a-f]{32}$/', $subject ) ) { 299 delete_transient( $subject ); 300 return 'key'; 301 } 302 if ( filter_var( $subject, FILTER_VALIDATE_IP ) ) { 303 $this->clear_attempts( $subject ); 304 return 'ip'; 305 } 306 return ''; 307 } 308 150 309 public static function attempts_key( $ip ) { 151 310 return self::ATTEMPTS_TRANSIENT_PREFIX . md5( (string) $ip ); -
guardforge/tags/1.6.4/includes/class-core.php
r3735184 r3754541 24 24 add_filter( 'admin_body_class', [ $this, 'add_body_class' ] ); 25 25 add_action( 'admin_notices', [ $this, 'pro_addon_outdated_notice' ] ); 26 add_action( 'admin_notices', [ $this, 'rest_migration_notice' ] ); 27 add_action( 'admin_post_guardforge_rest_notice_dismiss', [ $this, 'handle_rest_notice_dismiss' ] ); 26 28 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] ); 27 29 } … … 74 76 echo ' <a href="https://avakode.com/dashboard/downloads/" target="_blank" rel="noopener">' . esc_html( __( 'Open Downloads', 'guardforge' ) ) . '</a>'; 75 77 echo '</p></div>'; 78 } 79 80 /** 81 * Once, after the 1.6.4 update: what happened to the REST API protection. 82 * 83 * The update split "Restrict REST API" in two (see 84 * GUARDFORGE_Options::migrate_rest_settings) and picked one for the 85 * site, so the site owner is told which and where to change it. The 86 * sentences carry no placeholders: the machine translator drops them. 87 */ 88 public function rest_migration_notice() { 89 if ( ! self::notice_screen_allows() ) { 90 return; 91 } 92 $mode = GUARDFORGE_Options::rest_migration_notice(); 93 if ( $mode === null ) { 94 return; 95 } 96 $settings = admin_url( 'admin.php?page=guardforge#gf-card-api' ); 97 $dismiss = wp_nonce_url( admin_url( 'admin-post.php?action=guardforge_rest_notice_dismiss' ), 'guardforge_rest_notice_dismiss' ); 98 99 echo '<div class="notice notice-warning"><p><strong>'; 100 if ( $mode === 'lockdown' ) { 101 echo esc_html__( 'GuardForge still closes the REST API to visitors who are not signed in, as you had set it.', 'guardforge' ); 102 echo '</strong></p><p>'; 103 echo esc_html__( 'Version 1.6.4 split the REST API protection in two. Because you had written your own list of exceptions, the switch that closes the whole REST API is now on, with your list. To keep only user records private instead, turn that switch off in Settings, under API & Protocols.', 'guardforge' ); 104 } else { 105 echo esc_html__( 'GuardForge now keeps only user records private in the REST API.', 'guardforge' ); 106 echo '</strong></p><p>'; 107 echo esc_html__( 'Version 1.6.4 split the REST API protection in two. The protection you had used the default list, which also shut out the WooCommerce cart and checkout, contact forms and webhooks, so it now closes user records to visitors and nothing else. To close the whole REST API to visitors who are not signed in, turn that switch on in Settings, under API & Protocols.', 'guardforge' ); 108 } 109 echo '</p><p><a class="button button-primary" href="' . esc_url( $settings ) . '">' . esc_html__( 'Open Settings', 'guardforge' ) . '</a> '; 110 echo '<a class="button" href="' . esc_url( $dismiss ) . '">' . esc_html__( 'Dismiss', 'guardforge' ) . '</a></p></div>'; 111 } 112 113 public function handle_rest_notice_dismiss() { 114 if ( ! current_user_can( 'manage_options' ) ) { 115 wp_die( esc_html__( 'Access denied.', 'guardforge' ) ); 116 } 117 check_admin_referer( 'guardforge_rest_notice_dismiss' ); 118 GUARDFORGE_Options::dismiss_rest_migration_notice(); 119 $back = wp_get_referer(); 120 wp_safe_redirect( $back ? $back : admin_url() ); 121 exit; 76 122 } 77 123 -
guardforge/tags/1.6.4/includes/class-hardening-score.php
r3735184 r3754541 66 66 'notify_on_lockout', 67 67 'protect_sensitive_files', 68 'rest_allowlist',69 68 'security_headers', 70 69 'staging_force_production', … … 182 181 'user_enumeration_blocked' => false, 183 182 'rest_restricted' => false, 184 'rest_allowlist' => [],185 183 'security_headers' => false, 186 184 'csp_enabled' => false, … … 290 288 $facts['user_enumeration_blocked'] = ! empty( $opts['disable_user_enumeration'] ); 291 289 $facts['rest_restricted'] = ! empty( $opts['disable_rest_api'] ); 292 $facts['rest_allowlist'] = GUARDFORGE_Hardening::parse_lines( (string) ( $opts['rest_allowlist'] ?? '' ) );293 290 $facts['security_headers'] = ! empty( $opts['security_headers'] ); 294 291 $facts['csp_enabled'] = ! empty( $opts['csp_enabled'] ); … … 718 715 719 716 /* 720 * The allowlist is matched by GUARDFORGE_Hardening as 721 * strpos( $route, $needle ) === 0 — a prefix of the requested route. 722 * So core comes back in two ways, and both have to count: an entry 723 * short enough to be a prefix of "wp/v2" ("wp", or the whole thing), 724 * and an entry that starts with "wp/v2" and re-admits one branch of 725 * it ("wp/v2/users" is narrower and is still the login names). 726 */ 727 $readmits_core = false; 728 foreach ( (array) $f['rest_allowlist'] as $needle ) { 729 $needle = trim( (string) $needle ); 730 if ( $needle === '' ) { 731 continue; 732 } 733 if ( strpos( 'wp/v2', $needle ) === 0 || strpos( $needle, 'wp/v2' ) === 0 ) { 734 $readmits_core = true; 735 break; 736 } 737 } 738 if ( ! $f['rest_restricted'] ) { 739 $rest_earned = 0; 740 $rest_message = __( 'The REST API answers anonymous callers on every namespace.', 'guardforge' ); 741 } elseif ( $readmits_core ) { 742 $rest_earned = 0; 743 $rest_message = __( 'Restricted, but the allowlist lets wp/v2 back in — which is the part that was being restricted.', 'guardforge' ); 744 } else { 745 $rest_earned = 1; 746 $rest_message = __( 'Anonymous REST access is limited to the allowlisted namespaces.', 'guardforge' ); 747 } 717 * The REST protection that ships on (GUARD-REST-01, 1.6.4): user 718 * records closed to anyone who is not staff. The full lockdown is not 719 * scored — it breaks checkout, forms and webhooks, and a score that 720 * asked for it would push owners into breaking their own site. The 721 * allowlist belongs to the lockdown and cannot re-open user records, 722 * so it no longer bears on this row. 723 */ 748 724 $items[] = self::item( 749 725 'rest_restricted', 750 726 self::WEIGHT_MEDIUM, 751 __( 'The REST API is restricted to signed-in callers', 'guardforge' ), 752 $rest_earned, 753 $rest_message, 754 __( 'An open REST API publishes users, posts, media and some settings to anonymous callers, and an allowlist entry that re-admits wp/v2 undoes the whole restriction while the checkbox still reads as on.', 'guardforge' ), 727 __( 'The REST API keeps user records private', 'guardforge' ), 728 $f['rest_restricted'] ? 1 : 0, 729 $f['rest_restricted'] 730 ? __( 'Visitors and customers cannot list your users or read their records through the REST API.', 'guardforge' ) 731 : __( 'Anyone can list your users through the REST API.', 'guardforge' ), 732 __( 'The REST users route hands out every author\'s login slug to anyone who asks, which turns password guessing from two unknowns into one.', 'guardforge' ), 755 733 true, 756 734 self::settings_anchor( 'api' ), 757 __( 'Turn on the REST restriction and remove any allowlist line that matches wp/v2.', 'guardforge' )735 __( 'Turn on "Keep user records out of the REST API" under API & Protocols.', 'guardforge' ) 758 736 ); 759 737 -
guardforge/tags/1.6.4/includes/class-hardening.php
r3712655 r3754541 35 35 add_action( 'init', [ $this, 'block_xmlrpc_php' ], 1 ); 36 36 37 // REST API gating 37 // REST API. The narrow protection (on by default) judges the request 38 // WordPress is about to answer, whatever address reached it — served, 39 // embedded (_embed) or internal. The full lockdown (opt-in) judges 40 // only requests served over HTTP, so a page that renders REST data on 41 // the server for a visitor keeps rendering. 42 add_filter( 'rest_request_before_callbacks', [ $this, 'guard_user_records' ], 10, 3 ); 38 43 add_filter( 'rest_authentication_errors', [ $this, 'filter_rest_authentication' ], 99 ); 39 44 … … 56 61 add_filter( 'rest_endpoints', [ $this, 'maybe_remove_users_endpoint' ] ); 57 62 add_filter( 'rest_user_query', [ $this, 'filter_rest_user_query' ] ); 63 // The other two places core publishes login slugs: the author link in 64 // an oEmbed answer and the users sitemap (Wordfence closes the same). 65 add_filter( 'oembed_response_data', [ $this, 'filter_oembed_author' ], 99 ); 66 add_filter( 'wp_sitemaps_add_provider', [ $this, 'filter_sitemap_provider' ], 99, 2 ); 58 67 59 68 // oEmbed … … 93 102 94 103 /** 95 * Return WP_Error to block REST unless either: 96 * - the user is logged in, or 97 * - the requested route matches an allowlisted namespace. 98 * 99 * The allowlist prevents the original Lyuhon behaviour from breaking 100 * block-editor previews, oEmbed, FormForge submissions, etc. 104 * Narrow protection ('disable_rest_api', on by default): user records. 105 * 106 * The REST users route is how login names are harvested — the list, its 107 * search, and a record by ID all carry the slug, which is usually the 108 * login. Anyone who cannot write posts is refused it: visitors, and also 109 * subscribers and customers, because on a store anyone can register and 110 * "signed in" is no barrier. Staff keep it (the block editor lists 111 * authors over REST), as does everyone for their own record and for 112 * users/me, which core already limits to the caller. 113 * 114 * Hooked on rest_request_before_callbacks, so the decision is made on the 115 * handler WordPress picked — not on the address the caller typed. That 116 * covers /wp-json/, ?rest_route=, any spelling core's case-insensitive 117 * matching accepts, and the internal request behind _embed=author. 118 * 119 * Nothing else is closed by default: the Store API, form submissions, 120 * webhooks and published content are public by design. 121 * 122 * @param mixed $response Null, or an earlier refusal. 123 * @param array $handler The matched handler. 124 * @param WP_REST_Request $request 125 * @return mixed 126 */ 127 public function guard_user_records( $response, $handler, $request ) { 128 if ( ! GUARDFORGE_Options::get( 'disable_rest_api' ) ) { 129 return $response; 130 } 131 if ( $response instanceof WP_Error ) { 132 return $response; 133 } 134 if ( ! is_object( $request ) || ! method_exists( $request, 'get_route' ) ) { 135 return $response; 136 } 137 $kind = self::user_record_read( $handler, $request ); 138 if ( $kind === '' ) { 139 return $response; 140 } 141 if ( current_user_can( 'edit_posts' ) ) { 142 return $response; 143 } 144 if ( $kind === 'item' ) { 145 $own = (int) get_current_user_id(); 146 $id = (int) $request->get_param( 'id' ); 147 if ( $id === 0 && preg_match( '#/users/+(\d+)/*$#i', (string) $request->get_route(), $m ) ) { 148 $id = (int) $m[1]; 149 } 150 if ( $own > 0 && $id === $own ) { 151 return $response; 152 } 153 // Core's own answer for an ID that is not there, so the refusal 154 // says nothing about whether the account exists. 155 return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.', 'guardforge' ), [ 'status' => 404 ] ); 156 } 157 return new WP_Error( 158 'rest_user_cannot_view', 159 __( 'Sorry, you are not allowed to list users.', 'guardforge' ), 160 [ 'status' => rest_authorization_required_code() ] 161 ); 162 } 163 164 /** 165 * 'list', 'item' or '' — whether this request reads user records. 166 */ 167 private static function user_record_read( $handler, $request ) { 168 $method = method_exists( $request, 'get_method' ) ? strtoupper( (string) $request->get_method() ) : 'GET'; 169 if ( $method !== 'GET' && $method !== 'HEAD' ) { 170 return ''; 171 } 172 $callback = is_array( $handler ) && isset( $handler['callback'] ) ? $handler['callback'] : null; 173 if ( is_array( $callback ) && isset( $callback[0], $callback[1] ) && is_object( $callback[0] ) 174 && class_exists( 'WP_REST_Users_Controller' ) && $callback[0] instanceof WP_REST_Users_Controller ) { 175 $name = strtolower( (string) $callback[1] ); 176 if ( $name === 'get_items' ) { 177 return 'list'; 178 } 179 return $name === 'get_item' ? 'item' : ''; 180 } 181 $route = (string) $request->get_route(); 182 if ( preg_match( '#^/*wp/+v2/+users/*$#i', $route ) ) { 183 return 'list'; 184 } 185 if ( preg_match( '#^/*wp/+v2/+users/+\d+/*$#i', $route ) ) { 186 return 'item'; 187 } 188 return ''; 189 } 190 191 /** 192 * Full lockdown ('rest_lockdown', off by default): every anonymous REST 193 * call is refused unless its route is on the allowlist. 194 * 195 * The owner switches this on knowing it breaks whatever talks to the site 196 * without signing in; the settings screen lists what that is on this site 197 * (lockdown_casualties). The route judged is the one WordPress is 198 * serving — its parsed rest_route query var, which /wp-json/<route> and 199 * ?rest_route=<route> both fill — so plain permalinks behave exactly like 200 * pretty ones. 101 201 */ 102 202 public function filter_rest_authentication( $result ) { 103 if ( ! GUARDFORGE_Options::get( ' disable_rest_api' ) ) {203 if ( ! GUARDFORGE_Options::get( 'rest_lockdown' ) ) { 104 204 return $result; 105 205 } … … 118 218 119 219 private function current_rest_route_is_allowlisted() { 120 $route = ''; 121 if ( function_exists( 'rest_get_url_prefix' ) ) { 122 $prefix = rest_get_url_prefix(); 123 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only searched for the REST prefix and compared with the allowlist, never stored or printed; sanitising would change the route being judged. 124 $path = wp_unslash( $_SERVER['REQUEST_URI'] ?? '' ); 125 $needle = '/' . trim( $prefix, '/' ) . '/'; 126 $pos = strpos( $path, $needle ); 127 if ( $pos !== false ) { 128 $route = ltrim( substr( $path, $pos + strlen( $needle ) ), '/' ); 129 $qpos = strpos( $route, '?' ); 130 if ( $qpos !== false ) { 131 $route = substr( $route, 0, $qpos ); 132 } 133 } 134 } 220 $route = self::current_rest_route(); 135 221 if ( $route === '' ) { 136 222 return false; … … 146 232 $allowlist = apply_filters( 'guardforge/rest_allowlist', $allowlist, $route ); 147 233 148 foreach ( $allowlist as $needle ) { 149 if ( $needle === '' ) { 234 return self::route_is_allowlisted( $route, (array) $allowlist ); 235 } 236 237 /** 238 * The REST route of the current request, normalised (see normalise_route). 239 */ 240 private static function current_rest_route() { 241 global $wp; 242 if ( isset( $wp ) && is_object( $wp ) && isset( $wp->query_vars['rest_route'] ) && is_string( $wp->query_vars['rest_route'] ) ) { 243 return self::normalise_route( $wp->query_vars['rest_route'] ); 244 } 245 // Before WordPress has parsed the request: read it the way 246 // WP::parse_request will — the query var first, then the path. 247 // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- an anonymous REST request names its route here; it is only compared with the allowlist, never stored or printed. 248 if ( isset( $_GET['rest_route'] ) && is_string( $_GET['rest_route'] ) ) { 249 // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- same read-only comparison. 250 return self::normalise_route( wp_unslash( $_GET['rest_route'] ) ); 251 } 252 if ( ! function_exists( 'rest_get_url_prefix' ) ) { 253 return ''; 254 } 255 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only searched for the REST prefix and compared with the allowlist, never stored or printed; sanitising would change the route being judged. 256 $path = (string) wp_unslash( $_SERVER['REQUEST_URI'] ?? '' ); 257 $qpos = strpos( $path, '?' ); 258 if ( $qpos !== false ) { 259 $path = substr( $path, 0, $qpos ); 260 } 261 $needle = '/' . trim( rest_get_url_prefix(), '/' ) . '/'; 262 $pos = strpos( $path, $needle ); 263 if ( $pos === false ) { 264 return ''; 265 } 266 return self::normalise_route( substr( $path, $pos + strlen( $needle ) ) ); 267 } 268 269 /** 270 * Lower case, single slashes, no slash at either end: "wc/store/v1/cart". 271 * Core matches routes case-insensitively, so the allowlist does too. 272 */ 273 public static function normalise_route( $route ) { 274 $route = strtolower( (string) $route ); 275 $route = (string) preg_replace( '#/+#', '/', $route ); 276 return trim( $route, '/' ); 277 } 278 279 /** 280 * Whether a route falls under one of the allowlist lines. A line covers 281 * the route it names and everything below it, on whole segments: 282 * "formforge/v1" covers "formforge/v1/forms/3/submit" but not 283 * "formforge/v10", and "flowforge/v1/webhook" does not open the canvas. 284 * 285 * @param string $route 286 * @param string $allowlist 287 */ 288 public static function route_is_allowlisted( $route, array $allowlist ) { 289 $route = self::normalise_route( $route ); 290 if ( $route === '' ) { 291 return false; 292 } 293 foreach ( $allowlist as $line ) { 294 $line = self::normalise_route( $line ); 295 if ( $line === '' ) { 150 296 continue; 151 297 } 152 if ( strpos( $route, $needle) === 0 ) {298 if ( $route === $line || strpos( $route, $line . '/' ) === 0 ) { 153 299 return true; 154 300 } 301 } 302 return false; 303 } 304 305 /** 306 * What the full lockdown stops for visitors on this site: the public 307 * REST endpoints of active plugins (and core's oEmbed) that the given 308 * allowlist does not cover. For the settings screen. 309 * 310 * @param string $allowlist 311 * @param callable|null $is_active fn( string $slug ): bool — for tests. 312 * @return array<int,array{label:string,namespace:string}> 313 */ 314 public static function lockdown_casualties( array $allowlist, $is_active = null ) { 315 if ( ! is_callable( $is_active ) ) { 316 $is_active = [ __CLASS__, 'plugin_is_active' ]; 317 } 318 $known = [ 319 [ 'slug' => 'core-oembed', 'namespace' => 'oembed/1.0', 'label' => __( 'Embeds of your posts on other sites', 'guardforge' ) ], 320 [ 'slug' => 'woocommerce', 'namespace' => 'wc/store', 'label' => __( 'WooCommerce block cart and checkout (guest orders)', 'guardforge' ) ], 321 [ 'slug' => 'contact-form-7', 'namespace' => 'contact-form-7/v1', 'label' => __( 'Contact Form 7 form submissions', 'guardforge' ) ], 322 [ 'slug' => 'jetpack', 'namespace' => 'jetpack/v4', 'label' => __( 'Jetpack connection to WordPress.com', 'guardforge' ) ], 323 [ 'slug' => 'formforge', 'namespace' => 'formforge/v1', 'label' => __( 'Form Forge form submissions', 'guardforge' ) ], 324 [ 'slug' => 'flowforge', 'namespace' => 'flowforge/v1/webhook', 'label' => __( 'Cascade Forge webhooks from other services', 'guardforge' ) ], 325 [ 'slug' => 'inclusiveforge', 'namespace' => 'inclusiveforge/v1/scan-completed', 'label' => __( 'Inclusive Forge scan results', 'guardforge' ) ], 326 ]; 327 $out = []; 328 foreach ( $known as $row ) { 329 if ( $row['slug'] !== 'core-oembed' && ! call_user_func( $is_active, $row['slug'] ) ) { 330 continue; 331 } 332 if ( self::route_is_allowlisted( $row['namespace'], $allowlist ) ) { 333 continue; 334 } 335 $out[] = [ 'label' => $row['label'], 'namespace' => $row['namespace'] ]; 336 } 337 return $out; 338 } 339 340 /** 341 * Whether a plugin with a public REST endpoint is running, by the class 342 * or constant it defines once loaded. 343 */ 344 public static function plugin_is_active( $slug ) { 345 switch ( $slug ) { 346 case 'woocommerce': 347 return class_exists( 'WooCommerce' ); 348 case 'contact-form-7': 349 return defined( 'WPCF7_VERSION' ); 350 case 'jetpack': 351 return defined( 'JETPACK__VERSION' ); 352 case 'formforge': 353 return defined( 'FORMFORGE_VERSION' ); 354 case 'flowforge': 355 return defined( 'FLOWFORGE_VERSION' ); 356 case 'inclusiveforge': 357 return defined( 'INCLUSIVEFORGE_VERSION' ); 155 358 } 156 359 return false; … … 221 424 unset( $endpoints['/wp/v2/users/(?P<id>[\d]+)'] ); 222 425 return $endpoints; 426 } 427 428 /** 429 * An oEmbed answer names the author and links their archive, whose slug 430 * is usually the login. 431 */ 432 public function filter_oembed_author( $data ) { 433 if ( ! GUARDFORGE_Options::get( 'disable_user_enumeration' ) || ! is_array( $data ) ) { 434 return $data; 435 } 436 unset( $data['author_name'], $data['author_url'] ); 437 return $data; 438 } 439 440 /** 441 * The users sitemap (wp-sitemap-users-1.xml) is a list of every author 442 * archive — every author's slug in one file. 443 */ 444 public function filter_sitemap_provider( $provider, $name ) { 445 if ( $name === 'users' && GUARDFORGE_Options::get( 'disable_user_enumeration' ) ) { 446 return false; 447 } 448 return $provider; 223 449 } 224 450 … … 307 533 return $user; 308 534 } 535 // The field is drawn on the login_form action, which only wp-login.php 536 // fires, so that is where it is checked — plus any form that posted the 537 // field back because it drew it too. Every other sign-in (the shop's 538 // My Account form, a membership plugin's form, an application password 539 // over REST, wp_signon called by another plugin) never showed the 540 // field and used to fail every time. 541 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- only asks whether the field was posted; nothing is read or stored. 542 $field_posted = isset( $_POST['guardforge_captcha_key'] ) || isset( $_POST['guardforge_captcha_answer'] ); 543 if ( ! did_action( 'login_init' ) && ! $field_posted ) { 544 return $user; 545 } 309 546 // wp-login.php posts no nonce, and cannot: this runs before anyone is 310 547 // logged in. The key names a ten-minute transient the same form -
guardforge/tags/1.6.4/includes/class-options.php
r3735184 r3754541 19 19 20 20 /** 21 * The allowlist every site got before 1.6.4. A stored copy of exactly 22 * this is a default nobody chose, so the upgrade replaces it with the 23 * current one (migrate_rest_settings); an edited list is left alone. 24 */ 25 /** The one-time record of what the 1.6.4 REST migration chose (see migrate_rest_settings). */ 26 const REST_MIGRATION_OPTION = 'guardforge_rest_migration'; 27 28 const LEGACY_REST_ALLOWLIST = "oembed/1.0\nformforge/v1\nguardforge/v1"; 29 30 /** 21 31 * Schema. Each entry: ['type' => bool|int|string|email|textarea|csv, 'default' => mixed]. 22 32 * Used by `set` to sanitise, and by tests to enumerate. … … 26 36 // API & Protocols 27 37 'disable_xmlrpc' => [ 'type' => 'bool', 'default' => 1 ], 38 // Until 1.6.4 'disable_rest_api' refused every anonymous REST call 39 // outside the allowlist, on by default — and took the WooCommerce 40 // Store API (block cart and checkout), contact forms and inbound 41 // webhooks with it. The key keeps its name and its stored "on"; it 42 // now means the narrow protection (user records closed to anyone 43 // who is not staff, see GUARDFORGE_Hardening::guard_user_records). 44 // Closing the whole REST API to visitors is 'rest_lockdown', off 45 // until the owner asks for it, and only that switch reads the 46 // allowlist. The allowlist's default carries the public endpoints 47 // of our own plugins and the Store API: they hold nothing private, 48 // and closing them only breaks the site. 28 49 'disable_rest_api' => [ 'type' => 'bool', 'default' => 1 ], 29 'rest_allowlist' => [ 'type' => 'textarea', 'default' => "oembed/1.0\nformforge/v1\nguardforge/v1" ], 50 'rest_lockdown' => [ 'type' => 'bool', 'default' => 0 ], 51 'rest_allowlist' => [ 'type' => 'textarea', 'default' => "oembed/1.0\nguardforge/v1\nformforge/v1\nflowforge/v1/webhook\ninclusiveforge/v1/scan-completed\nwc/store" ], 30 52 'disable_rest_comments' => [ 'type' => 'bool', 'default' => 1 ], 31 53 'disable_embed' => [ 'type' => 'bool', 'default' => 0 ], … … 301 323 // from here read as "every secondary screen was switched off". 302 324 'main' => [ 303 'disable_xmlrpc', 'disable_rest_api', 'rest_ allowlist', 'disable_rest_comments',325 'disable_xmlrpc', 'disable_rest_api', 'rest_lockdown', 'rest_allowlist', 'disable_rest_comments', 304 326 'disable_embed', 'disable_pingback', 'hide_wp_version', 'disable_file_edit', 305 327 'disable_user_enumeration', 'security_headers', 'login_captcha_math', … … 362 384 363 385 /** 386 * 1.6.4 (GUARD-REST-01): the REST settings after the split into the 387 * narrow protection and the opt-in lockdown. 388 * 389 * Before 1.6.4 "disable_rest_api" closed the whole REST API to visitors 390 * outside an allowlist. It now means the narrow protection, and the old 391 * behaviour is 'rest_lockdown', off by default. What an update does with a 392 * site that had it on depends on what the owner did with the list: 393 * 394 * - the list is still the old default: nobody chose the full closure, it 395 * was the default, and it took the cart, forms and webhooks down. The 396 * site gets the narrow protection and the new default list; 397 * - the list is the owner's own: they wrote exceptions to a full closure 398 * and meant it. 'rest_lockdown' is switched on with their list, so the 399 * update does not loosen a site silently. 400 * 401 * A site that had the restriction off changes nothing. In both cases of a 402 * site that had it on, one notice (GUARDFORGE_Core::rest_migration_notice) 403 * says what was chosen and where to change it. 404 * 405 * The decision is taken once: the first run records it in 406 * REST_MIGRATION_OPTION, and every later run (the next database version) 407 * stops there, so an owner who turned the lockdown off, or saved a list of 408 * their own on the narrow protection, is never moved again. A fresh install 409 * ($upgrading false) has nothing to move and nothing to say. 410 * 411 * @param bool $upgrading False for a site with no recorded database version. 412 */ 413 public static function migrate_rest_settings( $upgrading = true ) { 414 if ( false !== get_option( self::REST_MIGRATION_OPTION, false ) ) { 415 return; 416 } 417 $mode = 'none'; 418 if ( $upgrading ) { 419 $stored = get_option( self::OPTION_KEY, [] ); 420 if ( ! is_array( $stored ) ) { 421 $stored = []; 422 } 423 // Never saved means the defaults of 1.6.3: the restriction on, the old list. 424 $was_on = ! array_key_exists( 'disable_rest_api', $stored ) || ! empty( $stored['disable_rest_api'] ); 425 $list = isset( $stored['rest_allowlist'] ) && is_string( $stored['rest_allowlist'] ) ? $stored['rest_allowlist'] : self::LEGACY_REST_ALLOWLIST; 426 $legacy = GUARDFORGE_Hardening::parse_lines( $list ) === GUARDFORGE_Hardening::parse_lines( self::LEGACY_REST_ALLOWLIST ); 427 if ( $legacy ) { 428 if ( isset( $stored['rest_allowlist'] ) ) { 429 $stored['rest_allowlist'] = self::defaults()['rest_allowlist']; 430 update_option( self::OPTION_KEY, $stored ); 431 } 432 $mode = $was_on ? 'narrow' : 'none'; 433 } elseif ( $was_on ) { 434 $stored['rest_lockdown'] = 1; 435 update_option( self::OPTION_KEY, $stored ); 436 $mode = 'lockdown'; 437 } 438 } 439 update_option( self::REST_MIGRATION_OPTION, [ 'mode' => $mode, 'notice' => $mode === 'none' ? 0 : 1 ], false ); 440 } 441 442 /** 443 * What the REST migration chose, for the notice: 'lockdown' or 'narrow' 444 * while it is open for somebody who can change the settings, null 445 * otherwise (nothing changed, dismissed, or not that person's to read). 446 * 447 * @return string|null 448 */ 449 public static function rest_migration_notice() { 450 $state = get_option( self::REST_MIGRATION_OPTION, false ); 451 if ( ! is_array( $state ) || empty( $state['notice'] ) || empty( $state['mode'] ) ) { 452 return null; 453 } 454 if ( ! in_array( $state['mode'], [ 'lockdown', 'narrow' ], true ) || ! current_user_can( 'manage_options' ) ) { 455 return null; 456 } 457 return $state['mode']; 458 } 459 460 /** Close the notice for good; the decision itself stays recorded. */ 461 public static function dismiss_rest_migration_notice() { 462 $state = get_option( self::REST_MIGRATION_OPTION, false ); 463 if ( ! is_array( $state ) ) { 464 return; 465 } 466 $state['notice'] = 0; 467 update_option( self::REST_MIGRATION_OPTION, $state, false ); 468 } 469 470 /** 364 471 * Reset to defaults — used by uninstall.php and tests. 365 472 */ -
guardforge/tags/1.6.4/includes/class-schema-manager.php
r3731705 r3754541 22 22 self::run_dbdelta(); 23 23 self::stamp_enabled_since(); 24 // 1.6.4: the REST restriction split into a narrow default and an 25 // opt-in lockdown; see the method for what it writes and what not. 26 // No recorded version is a new install: nothing to move. 27 GUARDFORGE_Options::migrate_rest_settings( $current !== '' ); 24 28 update_option( self::VERSION_OPTION, GUARDFORGE_DB_VERSION, false ); 25 29 } -
guardforge/tags/1.6.4/includes/class-two-factor.php
r3712655 r3754541 272 272 } 273 273 274 /** 275 * The code page. The redirects live here; what is decided lives in 276 * judge_challenge, which a test can call without the request ending. 277 */ 274 278 public function handle_verify_challenge() { 275 279 // The pending token stands in for a nonce here, and is the stronger of … … 280 284 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- see above. 281 285 $code = isset( $_POST['guardforge_2fa_code'] ) ? sanitize_text_field( wp_unslash( $_POST['guardforge_2fa_code'] ) ) : ''; 282 $pending = $token !== '' ? self::read_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ) : false; 283 if ( ! is_array( $pending ) ) { 286 287 $verdict = $this->judge_challenge( $token, $code ); 288 if ( $verdict['status'] === 'expired' ) { 284 289 wp_safe_redirect( wp_login_url() ); 285 290 exit; 286 291 } 287 if ( ! $this->verify_code( (int) $pending['user_id'], $code )) {292 if ( $verdict['status'] === 'wrong' ) { 288 293 $url = add_query_arg( [ 289 294 'action' => 'validate_2fa', … … 294 299 exit; 295 300 } 301 $pending = $verdict['pending']; 296 302 self::forget_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ); 297 303 wp_set_auth_cookie( (int) $pending['user_id'], ! empty( $pending['remember'] ) ); 298 304 wp_safe_redirect( admin_url() ); 299 305 exit; 306 } 307 308 /** 309 * Judge one try at the code page: 'expired' (no such pending login), 310 * 'wrong' or 'ok'. 311 * 312 * This page posts to admin-post.php, not wp-login.php, so neither of the 313 * two things that stop a password guesser ever saw it: core's failure hook 314 * (fired only when wp-login authenticates) and the lockout check on 315 * login_init. Someone holding a stolen password could therefore try 316 * six-digit codes for as long as the token lived. So the lockout is asked 317 * first, before the code is even looked at, and a wrong code is reported 318 * through the same failure hook a wrong password is — one counter, one 319 * threshold, one log, one alert. 320 * 321 * @return array{status:string,pending:?array} 322 */ 323 public function judge_challenge( $token, $code ) { 324 $pending = $token !== '' ? self::read_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ) : false; 325 if ( ! is_array( $pending ) ) { 326 return [ 'status' => 'expired', 'pending' => null ]; 327 } 328 if ( class_exists( 'GUARDFORGE_Bruteforce' ) ) { 329 // Ends the request with the lockout page when this address is out of tries. 330 GUARDFORGE_Bruteforce::instance()->maybe_block_login(); 331 } 332 if ( $this->verify_code( (int) $pending['user_id'], $code ) ) { 333 return [ 'status' => 'ok', 'pending' => $pending ]; 334 } 335 $account = get_userdata( (int) $pending['user_id'] ); 336 /** This action is documented in wp-includes/pluggable.php */ 337 do_action( 338 'wp_login_failed', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- core's own action, fired so every failed-login listener counts a wrong code. 339 $account && isset( $account->user_login ) ? (string) $account->user_login : '', 340 new WP_Error( 'gf_2fa_wrong', __( '<strong>Error:</strong> two-factor code is invalid.', 'guardforge' ) ) 341 ); 342 return [ 'status' => 'wrong', 'pending' => $pending ]; 300 343 } 301 344 -
guardforge/tags/1.6.4/languages/guardforge.pot
r3752344 r3754541 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Guard Forge – Security, Login Protection, 2FA & Audit Log 1.6. 2\n"5 "Project-Id-Version: Guard Forge – Security, Login Protection, 2FA & Audit Log 1.6.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/guardforge\n" 7 "POT-Creation-Date: 2026-10-1 6T09:54:01+00:00\n"7 "POT-Creation-Date: 2026-10-19T10:40:39+00:00\n" 8 8 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 9 9 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 70 70 #: includes/class-audit-log.php:198 71 71 #: includes/class-case-actions.php:346 72 #: includes/class-core.php:115 72 73 #: includes/class-guard-report-export.php:109 73 74 #: includes/class-hardening-score-badge.php:457 74 #: includes/class-hardening-score.php:15 3375 #: includes/class-hardening-score.php:1511 75 76 #: includes/class-integrity.php:818 76 #: includes/class-two-factor.php:3 0677 #: includes/class-two-factor.php:3 2477 #: includes/class-two-factor.php:349 78 #: includes/class-two-factor.php:367 78 79 msgid "Access denied." 79 80 msgstr "" … … 90 91 91 92 #: admin/partials/audit-log.php:53 92 #: includes/class-core.php:1 3893 #: includes/class-core.php:184 93 94 msgid "Audit log" 94 95 msgstr "" … … 186 187 187 188 #: admin/partials/audit-log.php:161 188 #: admin/partials/unblock.php: 89189 #: admin/partials/unblock.php:96 189 190 msgid "IP" 190 191 msgstr "" … … 298 299 #: admin/partials/cases.php:76 299 300 #: admin/partials/cases.php:220 300 #: includes/class-core.php:1 37301 #: includes/class-core.php:183 301 302 msgid "Cases" 302 303 msgstr "" … … 764 765 765 766 #: admin/partials/hardening-score.php:50 766 #: includes/class-core.php:1 28767 #: includes/class-core.php:174 767 768 msgid "Hardening score" 768 769 msgstr "" … … 937 938 938 939 #: admin/partials/integrity.php:59 939 #: includes/class-core.php:1 31940 #: includes/class-core.php:177 940 941 msgid "File integrity" 941 942 msgstr "" … … 1262 1263 1263 1264 #: admin/partials/login-log.php:60 1264 #: includes/class-core.php:1 391265 #: includes/class-core.php:185 1265 1266 msgid "Login log" 1266 1267 msgstr "" … … 1308 1309 #: admin/partials/scanner.php:15 1309 1310 #: admin/partials/scanner.php:35 1310 #: includes/class-core.php:1 301311 #: includes/class-core.php:176 1311 1312 msgid "Malware scanner" 1312 1313 msgstr "" … … 1413 1414 1414 1415 #: admin/partials/settings.php:46 1415 #: includes/class-core.php:1 271416 #: includes/class-core.php:173 1416 1417 msgid "Settings" 1417 1418 msgstr "" … … 1501 1502 1502 1503 #: admin/partials/settings.php:190 1503 #: includes/class-core.php:1 321504 #: includes/class-core.php:178 1504 1505 msgid "Cloudflare" 1505 1506 msgstr "" … … 1601 1602 1602 1603 #: admin/partials/settings.php:476 1603 msgid " Restrict REST API to logged-in users"1604 msgid "Keep user records out of the REST API" 1604 1605 msgstr "" 1605 1606 1606 1607 #: admin/partials/settings.php:476 1607 msgid " Anonymous REST access is limited to the namespaces in the allowlist below."1608 msgid "Visitors and customers cannot list your users or read their records through the REST API, the usual way login names are collected. Checkout, forms and webhooks keep working." 1608 1609 msgstr "" 1609 1610 … … 1617 1618 1618 1619 #: admin/partials/settings.php:478 1620 msgid "Close the whole REST API to visitors who are not signed in" 1621 msgstr "" 1622 1623 #: admin/partials/settings.php:478 1624 msgid "Only the namespaces in the REST API allowlist stay open to them. Anything that talks to your site through the REST API without signing in stops working unless its namespace is on that list." 1625 msgstr "" 1626 1627 #: admin/partials/settings.php:484 1628 msgid "The REST API is closed to visitors who are not signed in." 1629 msgstr "" 1630 1631 #: admin/partials/settings.php:486 1632 msgid "Before you close the whole REST API: it breaks the WooCommerce block cart and checkout, contact forms, webhooks other services send to your site, and embeds of your posts on other sites, unless their namespaces are in the allowlist." 1633 msgstr "" 1634 1635 #: admin/partials/settings.php:492 1636 msgid "Not working for them on this site right now:" 1637 msgstr "" 1638 1639 #: admin/partials/settings.php:494 1640 msgid "On this site, these would stop working for visitors:" 1641 msgstr "" 1642 1643 #. translators: %s: a REST namespace such as wc/store 1644 #: admin/partials/settings.php:503 1645 #, php-format 1646 msgid "add %s to the allowlist to keep it" 1647 msgstr "" 1648 1649 #: admin/partials/settings.php:514 1619 1650 msgid "Disable oEmbed discovery" 1620 1651 msgstr "" 1621 1652 1622 #: admin/partials/settings.php: 4781653 #: admin/partials/settings.php:514 1623 1654 msgid "Removes /oembed information leaks." 1624 1655 msgstr "" 1625 1656 1626 #: admin/partials/settings.php: 4791657 #: admin/partials/settings.php:515 1627 1658 msgid "Disable self-pingbacks" 1628 1659 msgstr "" 1629 1660 1630 #: admin/partials/settings.php: 4791661 #: admin/partials/settings.php:515 1631 1662 msgid "Blocks pingbacks pointing at your own URLs." 1632 1663 msgstr "" 1633 1664 1634 #: admin/partials/settings.php: 4851665 #: admin/partials/settings.php:521 1635 1666 msgid "Hardening" 1636 1667 msgstr "" 1637 1668 1638 #: admin/partials/settings.php: 4881669 #: admin/partials/settings.php:524 1639 1670 msgid "Hide WordPress version" 1640 1671 msgstr "" 1641 1672 1642 #: admin/partials/settings.php: 4881673 #: admin/partials/settings.php:524 1643 1674 msgid "Removes the generator meta and ver=… query strings." 1644 1675 msgstr "" 1645 1676 1646 #: admin/partials/settings.php: 4891677 #: admin/partials/settings.php:525 1647 1678 msgid "Disable theme/plugin file editor" 1648 1679 msgstr "" 1649 1680 1650 #: admin/partials/settings.php: 4891681 #: admin/partials/settings.php:525 1651 1682 msgid "Defines DISALLOW_FILE_EDIT so PHP can't be edited from the admin." 1652 1683 msgstr "" 1653 1684 1654 #: admin/partials/settings.php: 4901685 #: admin/partials/settings.php:526 1655 1686 msgid "Block user enumeration" 1656 1687 msgstr "" 1657 1688 1658 #: admin/partials/settings.php: 4901689 #: admin/partials/settings.php:526 1659 1690 msgid "Redirects ?author=N and hides anonymous /wp/v2/users." 1660 1691 msgstr "" 1661 1692 1662 #: admin/partials/settings.php: 4911693 #: admin/partials/settings.php:527 1663 1694 msgid "Send security HTTP headers" 1664 1695 msgstr "" 1665 1696 1666 #: admin/partials/settings.php: 4911697 #: admin/partials/settings.php:527 1667 1698 msgid "Referrer-Policy, X-Content-Type-Options, X-Frame-Options, Permissions-Policy." 1668 1699 msgstr "" 1669 1700 1670 #: admin/partials/settings.php: 4921701 #: admin/partials/settings.php:528 1671 1702 msgid "Math captcha on login" 1672 1703 msgstr "" 1673 1704 1674 #: admin/partials/settings.php: 4921675 msgid "Adds an a + b = ? challenge to the login form."1676 msgstr "" 1677 1678 #: admin/partials/settings.php: 4981705 #: admin/partials/settings.php:528 1706 msgid "Adds an a + b = ? challenge to the WordPress login page. Sign-in forms of shops and membership plugins are not affected, so customers can still log in." 1707 msgstr "" 1708 1709 #: admin/partials/settings.php:534 1679 1710 msgid "Files & Directories" 1680 1711 msgstr "" 1681 1712 1682 #: admin/partials/settings.php:5 011713 #: admin/partials/settings.php:537 1683 1714 msgid "Protect sensitive files" 1684 1715 msgstr "" 1685 1716 1686 #: admin/partials/settings.php:5 011717 #: admin/partials/settings.php:537 1687 1718 msgid "Denies direct access to wp-config.php, .htaccess, readme.html, license.txt via .htaccess." 1688 1719 msgstr "" 1689 1720 1690 #: admin/partials/settings.php:5 021721 #: admin/partials/settings.php:538 1691 1722 msgid "Disable directory listing" 1692 1723 msgstr "" 1693 1724 1694 #: admin/partials/settings.php:5 021725 #: admin/partials/settings.php:538 1695 1726 msgid "Options -Indexes — folders no longer show their contents." 1696 1727 msgstr "" 1697 1728 1698 #: admin/partials/settings.php:5 081729 #: admin/partials/settings.php:544 1699 1730 msgid "Spam & Bots" 1700 1731 msgstr "" 1701 1732 1702 #: admin/partials/settings.php:5 111733 #: admin/partials/settings.php:547 1703 1734 msgid "Comment-form honeypot" 1704 1735 msgstr "" 1705 1736 1706 #: admin/partials/settings.php:5 111737 #: admin/partials/settings.php:547 1707 1738 msgid "Adds a hidden field bots tend to fill — humans don't." 1708 1739 msgstr "" 1709 1740 1710 #: admin/partials/settings.php:5 121741 #: admin/partials/settings.php:548 1711 1742 msgid "Block malicious bot User-Agents" 1712 1743 msgstr "" 1713 1744 1714 #: admin/partials/settings.php:5 121745 #: admin/partials/settings.php:548 1715 1746 msgid "Blocks sqlmap, nikto, masscan, wpscan, nessus and similar scanners." 1716 1747 msgstr "" 1717 1748 1718 #: admin/partials/settings.php:5 181749 #: admin/partials/settings.php:554 1719 1750 msgid "Staging / development mode" 1720 1751 msgstr "" 1721 1752 1722 #: admin/partials/settings.php:5 331753 #: admin/partials/settings.php:569 1723 1754 msgid "Right now: staging mode is ON." 1724 1755 msgstr "" 1725 1756 1726 #: admin/partials/settings.php:5 341757 #: admin/partials/settings.php:570 1727 1758 msgid "Right now: staging mode is off and every protection is enforced." 1728 1759 msgstr "" 1729 1760 1730 #: admin/partials/settings.php:5 381761 #: admin/partials/settings.php:574 1731 1762 msgid "The address matched against your list:" 1732 1763 msgstr "" 1733 1764 1734 #: admin/partials/settings.php:5 441765 #: admin/partials/settings.php:580 1735 1766 msgid "Staging host names" 1736 1767 msgstr "" 1737 1768 1738 #: admin/partials/settings.php:5 461769 #: admin/partials/settings.php:582 1739 1770 msgid "One host name per line, matched against the address this site is actually served on. A leading dot matches every subdomain of that name but never the name itself, so \".example.com\" covers dev.example.com and leaves example.com alone. Nothing else is a pattern. Because the match is against the live address, copying this database onto your production site stops it matching the moment the domain changes." 1740 1771 msgstr "" 1741 1772 1742 #: admin/partials/settings.php:5 511773 #: admin/partials/settings.php:587 1743 1774 msgid "Always treat this site as production" 1744 1775 msgstr "" 1745 1776 1746 #: admin/partials/settings.php:5 521777 #: admin/partials/settings.php:588 1747 1778 msgid "Overrules everything above and every signal below it. Use this when a real site is being mistaken for a copy — it can only ever make GuardForge more protective, never less, which is why it is safe to keep in the database." 1748 1779 msgstr "" 1749 1780 1750 #: admin/partials/settings.php:5 571781 #: admin/partials/settings.php:593 1751 1782 msgid "While staging mode is on, GuardForge holds back:" 1752 1783 msgstr "" 1753 1784 1754 #: admin/partials/settings.php:5 591785 #: admin/partials/settings.php:595 1755 1786 msgid "Brute-force lockouts — attempts are still counted and written to the login log as \"soft_locked\", but nobody is shut out." 1756 1787 msgstr "" 1757 1788 1758 #: admin/partials/settings.php:5 601789 #: admin/partials/settings.php:596 1759 1790 msgid "Every notification e-mail: lockouts, new administrators and file-integrity changes." 1760 1791 msgstr "" 1761 1792 1762 #: admin/partials/settings.php: 5691793 #: admin/partials/settings.php:605 1763 1794 msgid "Telegram, Slack and webhook alerts." 1764 1795 msgstr "" 1765 1796 1766 #: admin/partials/settings.php: 5721797 #: admin/partials/settings.php:608 1767 1798 msgid "Cloudflare firewall rules — a copy shares the live zone and token, so a block pushed from here would land in front of your real site." 1768 1799 msgstr "" 1769 1800 1770 #: admin/partials/settings.php: 5751801 #: admin/partials/settings.php:611 1771 1802 msgid "Auto-lockdown — a spike in lockouts or a malware finding on a copy does not shut the site down." 1772 1803 msgstr "" 1773 1804 1774 #: admin/partials/settings.php: 5781805 #: admin/partials/settings.php:614 1775 1806 msgid "AI threat analysis, so a forgotten copy cannot spend your credits." 1776 1807 msgstr "" 1777 1808 1778 #: admin/partials/settings.php: 5811809 #: admin/partials/settings.php:617 1779 1810 msgid "To switch staging mode on by hand, add define( 'GUARDFORGE_STAGING_MODE', true ); to wp-config.php. Setting it to false pins the site to production. It lives in wp-config.php rather than in a setting on purpose: a database copied from staging onto your live site must never be able to carry the switch that turns your security off." 1780 1811 msgstr "" 1781 1812 1782 #: admin/partials/settings.php: 5871813 #: admin/partials/settings.php:623 1783 1814 msgid "Brute-force protection" 1784 1815 msgstr "" 1785 1816 1786 #: admin/partials/settings.php: 5901817 #: admin/partials/settings.php:626 1787 1818 msgid "Enable brute-force protection" 1788 1819 msgstr "" 1789 1820 1790 #: admin/partials/settings.php: 5901821 #: admin/partials/settings.php:626 1791 1822 msgid "Locks IPs that exceed the failed-attempt threshold." 1792 1823 msgstr "" 1793 1824 1794 #: admin/partials/settings.php: 5911825 #: admin/partials/settings.php:627 1795 1826 msgid "Record login attempts" 1796 1827 msgstr "" 1797 1828 1798 #: admin/partials/settings.php: 5911829 #: admin/partials/settings.php:627 1799 1830 msgid "Stores every login attempt in the database." 1800 1831 msgstr "" 1801 1832 1802 #: admin/partials/settings.php: 5921833 #: admin/partials/settings.php:628 1803 1834 msgid "Email on lockout" 1804 1835 msgstr "" 1805 1836 1806 #: admin/partials/settings.php: 5921837 #: admin/partials/settings.php:628 1807 1838 msgid "Send an email whenever an IP is locked out." 1808 1839 msgstr "" 1809 1840 1810 #: admin/partials/settings.php: 5981841 #: admin/partials/settings.php:634 1811 1842 msgid "Integrity monitoring" 1812 1843 msgstr "" 1813 1844 1814 #: admin/partials/settings.php:6 031845 #: admin/partials/settings.php:639 1815 1846 msgid "Monitor core file integrity" 1816 1847 msgstr "" 1817 1848 1818 #: admin/partials/settings.php:6 061849 #: admin/partials/settings.php:642 1819 1850 msgid "Off by default. When on, this site asks api.wordpress.org once a day for the official checksums of your WordPress version and compares wp-admin and wp-includes against them. The request carries the version and the locale, nothing about your site. \"Run scan now\" on the File integrity screen runs one scan without putting anything on a schedule." 1820 1851 msgstr "" 1821 1852 1822 #: admin/partials/settings.php:6 081853 #: admin/partials/settings.php:644 1823 1854 msgid "Email on integrity changes" 1824 1855 msgstr "" 1825 1856 1826 #: admin/partials/settings.php:6 081857 #: admin/partials/settings.php:644 1827 1858 msgid "Alerts you when modified or removed files are detected." 1828 1859 msgstr "" 1829 1860 1830 #: admin/partials/settings.php:6 091861 #: admin/partials/settings.php:645 1831 1862 msgid "Also monitor plugins & themes" 1832 1863 msgstr "" 1833 1864 1834 #: admin/partials/settings.php:6 091865 #: admin/partials/settings.php:645 1835 1866 msgid "Extends the scan to wp-content/plugins and wp-content/themes." 1836 1867 msgstr "" 1837 1868 1838 #: admin/partials/settings.php:6 131869 #: admin/partials/settings.php:649 1839 1870 msgid "Last scan:" 1840 1871 msgstr "" 1841 1872 1842 #: admin/partials/settings.php:6 381873 #: admin/partials/settings.php:674 1843 1874 msgid "Action audit" 1844 1875 msgstr "" 1845 1876 1846 #: admin/partials/settings.php:6 411877 #: admin/partials/settings.php:677 1847 1878 msgid "Log admin actions" 1848 1879 msgstr "" 1849 1880 1850 #: admin/partials/settings.php:6 411881 #: admin/partials/settings.php:677 1851 1882 msgid "Records plugin/theme/post/option/user/role changes." 1852 1883 msgstr "" 1853 1884 1854 #: admin/partials/settings.php:6 421885 #: admin/partials/settings.php:678 1855 1886 msgid "Email on new administrator" 1856 1887 msgstr "" 1857 1888 1858 #: admin/partials/settings.php:6 421889 #: admin/partials/settings.php:678 1859 1890 msgid "Sends an alert whenever a user is promoted to administrator." 1860 1891 msgstr "" 1861 1892 1862 #: admin/partials/settings.php:6 481893 #: admin/partials/settings.php:684 1863 1894 msgid "Content Security Policy" 1864 1895 msgstr "" 1865 1896 1866 #: admin/partials/settings.php:6 511897 #: admin/partials/settings.php:687 1867 1898 msgid "Send Content-Security-Policy header" 1868 1899 msgstr "" 1869 1900 1870 #: admin/partials/settings.php:6 511901 #: admin/partials/settings.php:687 1871 1902 msgid "Controls where scripts and styles may load from. Excellent XSS hardening when tuned." 1872 1903 msgstr "" 1873 1904 1874 #: admin/partials/settings.php:6 521905 #: admin/partials/settings.php:688 1875 1906 msgid "Send as report-only (recommended first)" 1876 1907 msgstr "" 1877 1908 1878 #: admin/partials/settings.php:6 521909 #: admin/partials/settings.php:688 1879 1910 msgid "Reports violations without blocking — flip off once your policy is tuned." 1880 1911 msgstr "" 1881 1912 1882 #: admin/partials/settings.php:6 551913 #: admin/partials/settings.php:691 1883 1914 msgid "CSP policy" 1884 1915 msgstr "" 1885 1916 1886 #: admin/partials/settings.php:6 571917 #: admin/partials/settings.php:693 1887 1918 msgid "Value of the Content-Security-Policy header. Test thoroughly — aggressive policies can break plugins." 1888 1919 msgstr "" 1889 1920 1890 #: admin/partials/settings.php:6 631921 #: admin/partials/settings.php:699 1891 1922 msgid "Brute-force & notification parameters" 1892 1923 msgstr "" 1893 1924 1894 #: admin/partials/settings.php: 6661925 #: admin/partials/settings.php:702 1895 1926 msgid "Max attempts" 1896 1927 msgstr "" 1897 1928 1898 #: admin/partials/settings.php: 6681929 #: admin/partials/settings.php:704 1899 1930 msgid "Failed attempts before the IP is locked." 1900 1931 msgstr "" 1901 1932 1902 #: admin/partials/settings.php: 6711933 #: admin/partials/settings.php:707 1903 1934 msgid "Lockout duration (minutes)" 1904 1935 msgstr "" 1905 1936 1906 #: admin/partials/settings.php: 6731937 #: admin/partials/settings.php:709 1907 1938 msgid "How long an IP stays locked." 1908 1939 msgstr "" 1909 1940 1910 #: admin/partials/settings.php: 6761941 #: admin/partials/settings.php:712 1911 1942 msgid "Login log retention (days)" 1912 1943 msgstr "" 1913 1944 1914 #: admin/partials/settings.php: 6781945 #: admin/partials/settings.php:714 1915 1946 msgid "Older login-log rows are pruned." 1916 1947 msgstr "" 1917 1948 1918 #: admin/partials/settings.php: 6811949 #: admin/partials/settings.php:717 1919 1950 msgid "Audit log retention (days)" 1920 1951 msgstr "" 1921 1952 1922 #: admin/partials/settings.php: 6831953 #: admin/partials/settings.php:719 1923 1954 msgid "Older audit rows are pruned." 1924 1955 msgstr "" 1925 1956 1926 #: admin/partials/settings.php: 6861957 #: admin/partials/settings.php:722 1927 1958 msgid "Notification email" 1928 1959 msgstr "" 1929 1960 1930 #: admin/partials/settings.php: 6881961 #: admin/partials/settings.php:724 1931 1962 msgid "Falls back to the site administrator email." 1932 1963 msgstr "" 1933 1964 1934 #: admin/partials/settings.php: 6911965 #: admin/partials/settings.php:727 1935 1966 msgid "IP whitelist" 1936 1967 msgstr "" 1937 1968 1938 #: admin/partials/settings.php: 6931969 #: admin/partials/settings.php:729 1939 1970 msgid "One IP or CIDR per line — never blocked." 1940 1971 msgstr "" 1941 1972 1942 #: admin/partials/settings.php: 6961973 #: admin/partials/settings.php:732 1943 1974 msgid "Trusted proxy CIDRs" 1944 1975 msgstr "" 1945 1976 1946 #: admin/partials/settings.php: 6981977 #: admin/partials/settings.php:734 1947 1978 msgid "Forwarded-IP headers are only trusted when REMOTE_ADDR matches one of these ranges. Leave empty if you do not run behind a proxy." 1948 1979 msgstr "" 1949 1980 1950 #: admin/partials/settings.php:7 011981 #: admin/partials/settings.php:737 1951 1982 msgid "REST API allowlist" 1952 1983 msgstr "" 1953 1984 1954 #: admin/partials/settings.php:7 031955 msgid " One namespace prefix per line. Routes whose namespace starts with one of these remain accessible to anonymous callers (oembed, formforge submissions, etc.)."1956 msgstr "" 1957 1958 #: admin/partials/settings.php:7 061985 #: admin/partials/settings.php:739 1986 msgid "Used only when the whole REST API is closed to visitors. One route per line; it stays open together with everything under it. The defaults keep embeds, WooCommerce checkout and the public endpoints of Avakode plugins working." 1987 msgstr "" 1988 1989 #: admin/partials/settings.php:742 1959 1990 msgid "Extra User-Agent blocklist" 1960 1991 msgstr "" 1961 1992 1962 #: admin/partials/settings.php:7 081993 #: admin/partials/settings.php:744 1963 1994 msgid "One substring per line. Case-insensitive contains match." 1964 1995 msgstr "" 1965 1996 1966 #: admin/partials/settings.php:7 141997 #: admin/partials/settings.php:750 1967 1998 msgid "When GuardForge is deleted" 1968 1999 msgstr "" 1969 2000 1970 #: admin/partials/settings.php:7 182001 #: admin/partials/settings.php:754 1971 2002 msgid "Delete GuardForge data on uninstall" 1972 2003 msgstr "" 1973 2004 1974 #: admin/partials/settings.php:7 192005 #: admin/partials/settings.php:755 1975 2006 msgid "Off by default: deleting the plugin leaves your login log, integrity snapshots and audit trail in place, so an accidental removal does not take your history with it. Two-factor enrolments are the exception and are always removed — they are shared secrets, and a database that outlives the plugin should not keep them." 1976 2007 msgstr "" 1977 2008 1978 #: admin/partials/settings.php:7 282009 #: admin/partials/settings.php:764 1979 2010 msgid "Save settings" 1980 2011 msgstr "" … … 2079 2110 2080 2111 #. translators: %s is the IP address that was unblocked. 2081 #: admin/partials/unblock.php:1 52112 #: admin/partials/unblock.php:17 2082 2113 #, php-format 2083 2114 msgid "IP %s unblocked." 2084 2115 msgstr "" 2085 2116 2086 #: admin/partials/unblock.php:41 2087 #: includes/class-core.php:140 2117 #: admin/partials/unblock.php:19 2118 msgid "Lockout lifted." 2119 msgstr "" 2120 2121 #: admin/partials/unblock.php:21 2122 msgid "That is not an IP address, so nothing was unblocked." 2123 msgstr "" 2124 2125 #: admin/partials/unblock.php:48 2126 #: includes/class-core.php:186 2088 2127 msgid "Unblock IP" 2089 2128 msgstr "" 2090 2129 2091 #: admin/partials/unblock.php:4 12130 #: admin/partials/unblock.php:48 2092 2131 msgid "Lift brute-force lockouts" 2093 2132 msgstr "" 2094 2133 2095 #: admin/partials/unblock.php: 442134 #: admin/partials/unblock.php:51 2096 2135 msgid "Manual unblock" 2097 2136 msgstr "" 2098 2137 2099 #: admin/partials/unblock.php: 482138 #: admin/partials/unblock.php:55 2100 2139 msgid "Enter IP address" 2101 2140 msgstr "" 2102 2141 2103 #: admin/partials/unblock.php: 492104 #: admin/partials/unblock.php: 752105 #: admin/partials/unblock.php:10 02106 #: includes/class-core.php: 1872142 #: admin/partials/unblock.php:56 2143 #: admin/partials/unblock.php:82 2144 #: admin/partials/unblock.php:107 2145 #: includes/class-core.php:233 2107 2146 msgid "Unblock" 2108 2147 msgstr "" 2109 2148 2110 2149 #. translators: %d is the number of active IP lockouts. 2111 #: admin/partials/unblock.php: 572150 #: admin/partials/unblock.php:64 2112 2151 #, php-format 2113 2152 msgid "Active lockouts (%d)" 2114 2153 msgstr "" 2115 2154 2116 #: admin/partials/unblock.php:6 02155 #: admin/partials/unblock.php:67 2117 2156 msgid "No active lockouts." 2118 2157 msgstr "" 2119 2158 2120 #: admin/partials/unblock.php: 632159 #: admin/partials/unblock.php:70 2121 2160 msgid "Transient key" 2122 2161 msgstr "" 2123 2162 2124 #: admin/partials/unblock.php: 632163 #: admin/partials/unblock.php:70 2125 2164 msgid "Attempts" 2126 2165 msgstr "" 2127 2166 2128 #: admin/partials/unblock.php: 632129 #: admin/partials/unblock.php: 892167 #: admin/partials/unblock.php:70 2168 #: admin/partials/unblock.php:96 2130 2169 msgid "Action" 2131 2170 msgstr "" 2132 2171 2133 #: admin/partials/unblock.php: 872172 #: admin/partials/unblock.php:94 2134 2173 msgid "IPs from lockout log" 2135 2174 msgstr "" 2136 2175 2137 #: admin/partials/unblock.php: 892176 #: admin/partials/unblock.php:96 2138 2177 msgid "Times locked" 2139 2178 msgstr "" 2140 2179 2141 #: admin/partials/unblock.php: 892180 #: admin/partials/unblock.php:96 2142 2181 msgid "Last time" 2143 2182 msgstr "" … … 2158 2197 2159 2198 #: admin/partials/vuln-db.php:105 2160 #: includes/class-core.php:1 292199 #: includes/class-core.php:175 2161 2200 msgid "Vulnerabilities" 2162 2201 msgstr "" … … 2217 2256 2218 2257 #: admin/partials/vuln-db.php:167 2258 #: includes/class-core.php:109 2219 2259 msgid "Open Settings" 2220 2260 msgstr "" … … 2301 2341 2302 2342 #. translators: %d is the lockout window in minutes. 2303 #: includes/class-bruteforce.php:57 2343 #: includes/class-bruteforce.php:72 2344 #: includes/class-bruteforce.php:106 2304 2345 #, php-format 2305 2346 msgid "Too many failed attempts. Try again in %d minutes." 2306 2347 msgstr "" 2307 2348 2308 #: includes/class-bruteforce.php: 602349 #: includes/class-bruteforce.php:75 2309 2350 msgid "Access temporarily blocked" 2310 2351 msgstr "" 2311 2352 2312 #: includes/class-bruteforce.php: 2502353 #: includes/class-bruteforce.php:409 2313 2354 msgid "GuardForge — IP locked out" 2314 2355 msgstr "" 2315 2356 2316 2357 #. translators: 1: IP, 2: username, 3: timestamp. 2317 #: includes/class-bruteforce.php: 2542358 #: includes/class-bruteforce.php:413 2318 2359 #, php-format 2319 2360 msgid "" … … 2342 2383 2343 2384 #. translators: 1: installed Pro version, 2: required Pro version 2344 #: includes/class-core.php:6 52385 #: includes/class-core.php:67 2345 2386 #, php-format 2346 2387 msgid "GuardForge Pro %1$s is too old for this version of GuardForge, so it is switched off rather than left running. Install GuardForge Pro %2$s or newer." 2347 2388 msgstr "" 2348 2389 2349 #: includes/class-core.php:7 12390 #: includes/class-core.php:73 2350 2391 msgid "Until then alerts to Telegram, Slack or a webhook, the Cloudflare firewall push, automatic lockdown, patch by update, the WAF, malware scanning, AI threat analysis, required 2FA and audit export are unavailable. Your logs, baselines and settings are kept." 2351 2392 msgstr "" 2352 2393 2353 #: includes/class-core.php:7 32394 #: includes/class-core.php:75 2354 2395 msgid "If Dashboard → Updates lists no update for it, download the add-on from your Avakode dashboard and upload it over this copy in Plugins → Add New Plugin → Upload Plugin." 2355 2396 msgstr "" 2356 2397 2357 #: includes/class-core.php:7 42398 #: includes/class-core.php:76 2358 2399 msgid "Open Downloads" 2359 2400 msgstr "" 2360 2401 2361 #: includes/class-core.php:102 2402 #: includes/class-core.php:101 2403 msgid "GuardForge still closes the REST API to visitors who are not signed in, as you had set it." 2404 msgstr "" 2405 2362 2406 #: includes/class-core.php:103 2407 msgid "Version 1.6.4 split the REST API protection in two. Because you had written your own list of exceptions, the switch that closes the whole REST API is now on, with your list. To keep only user records private instead, turn that switch off in Settings, under API & Protocols." 2408 msgstr "" 2409 2410 #: includes/class-core.php:105 2411 msgid "GuardForge now keeps only user records private in the REST API." 2412 msgstr "" 2413 2414 #: includes/class-core.php:107 2415 msgid "Version 1.6.4 split the REST API protection in two. The protection you had used the default list, which also shut out the WooCommerce cart and checkout, contact forms and webhooks, so it now closes user records to visitors and nothing else. To close the whole REST API to visitors who are not signed in, turn that switch on in Settings, under API & Protocols." 2416 msgstr "" 2417 2418 #: includes/class-core.php:110 2419 msgid "Dismiss" 2420 msgstr "" 2421 2422 #: includes/class-core.php:148 2423 #: includes/class-core.php:149 2363 2424 msgid "GuardForge" 2364 2425 msgstr "" 2365 2426 2366 #: includes/class-core.php:1 412427 #: includes/class-core.php:187 2367 2428 msgid "Lockdown" 2368 2429 msgstr "" 2369 2430 2370 #: includes/class-core.php:1 422431 #: includes/class-core.php:188 2371 2432 msgid "Geo-IP" 2372 2433 msgstr "" 2373 2434 2374 #: includes/class-core.php:1 432435 #: includes/class-core.php:189 2375 2436 msgid "2FA" 2376 2437 msgstr "" 2377 2438 2378 #: includes/class-core.php: 1852439 #: includes/class-core.php:231 2379 2440 msgid "Clear the log? This cannot be undone." 2380 2441 msgstr "" 2381 2442 2382 #: includes/class-core.php: 1862443 #: includes/class-core.php:232 2383 2444 msgid "Scanning…" 2384 2445 msgstr "" … … 2572 2633 msgstr "" 2573 2634 2635 #: includes/class-hardening-score.php:493 2636 msgid "The site is served over HTTPS" 2637 msgstr "" 2638 2639 #: includes/class-hardening-score.php:495 2640 msgid "Yes." 2641 msgstr "" 2642 2643 #: includes/class-hardening-score.php:495 2644 msgid "No — this site answers on plain HTTP." 2645 msgstr "" 2646 2574 2647 #: includes/class-hardening-score.php:496 2575 msgid "The site is served over HTTPS" 2576 msgstr "" 2577 2578 #: includes/class-hardening-score.php:498 2579 msgid "Yes." 2580 msgstr "" 2581 2582 #: includes/class-hardening-score.php:498 2583 msgid "No — this site answers on plain HTTP." 2648 msgid "Without TLS every password and every session cookie crosses the network readable, so anyone on the same path can take the session and replay it." 2584 2649 msgstr "" 2585 2650 2586 2651 #: includes/class-hardening-score.php:499 2587 msgid "Without TLS every password and every session cookie crosses the network readable, so anyone on the same path can take the session and replay it."2588 msgstr ""2589 2590 #: includes/class-hardening-score.php:5022591 2652 msgid "Install a certificate with your host, then set the WordPress and site addresses to https." 2592 2653 msgstr "" 2593 2654 2594 #: includes/class-hardening-score.php:5 102655 #: includes/class-hardening-score.php:507 2595 2656 msgid "Administrators using two-factor authentication" 2596 2657 msgstr "" 2597 2658 2598 2659 #. translators: %1$d is the number of enrolled administrators, %2$d the total. 2599 #: includes/class-hardening-score.php:51 52660 #: includes/class-hardening-score.php:512 2600 2661 #, php-format 2601 2662 msgid "%1$d of %2$d administrators are enrolled." 2602 2663 msgstr "" 2603 2664 2604 #: includes/class-hardening-score.php:51 92665 #: includes/class-hardening-score.php:516 2605 2666 msgid "This site has no administrator accounts." 2606 2667 msgstr "" 2607 2668 2669 #: includes/class-hardening-score.php:517 2670 msgid "A reused or phished administrator password is the shortest route to running code on the server; a second factor is what makes the password on its own worthless." 2671 msgstr "" 2672 2608 2673 #: includes/class-hardening-score.php:520 2609 msgid "A reused or phished administrator password is the shortest route to running code on the server; a second factor is what makes the password on its own worthless."2610 msgstr ""2611 2612 #: includes/class-hardening-score.php:5232613 2674 msgid "Enrol on the 2FA screen, and ask every other administrator to do the same." 2614 2675 msgstr "" 2615 2676 2677 #: includes/class-hardening-score.php:528 2678 msgid "WordPress has not checked for updates yet on this install." 2679 msgstr "" 2680 2616 2681 #: includes/class-hardening-score.php:531 2617 msgid "WordPress has not checked for updates yet on this install."2618 msgstr ""2619 2620 #: includes/class-hardening-score.php:5342621 2682 msgid "WordPress core is behind." 2622 2683 msgstr "" 2623 2684 2624 2685 #. translators: %d is the number of plugins and themes with an update waiting. 2625 #: includes/class-hardening-score.php:53 92686 #: includes/class-hardening-score.php:536 2626 2687 #, php-format 2627 2688 msgid "Core is current; %d plugin or theme updates are waiting." 2628 2689 msgstr "" 2629 2690 2630 #: includes/class-hardening-score.php:54 42691 #: includes/class-hardening-score.php:541 2631 2692 msgid "Nothing is waiting to be updated." 2632 2693 msgstr "" 2633 2694 2695 #: includes/class-hardening-score.php:546 2696 msgid "Core, plugins and themes are up to date" 2697 msgstr "" 2698 2634 2699 #: includes/class-hardening-score.php:549 2635 msgid " Core, plugins and themes are up to date"2700 msgid "Almost every mass compromise of a WordPress site starts with a version whose vulnerability was published, and patched, weeks earlier." 2636 2701 msgstr "" 2637 2702 2638 2703 #: includes/class-hardening-score.php:552 2639 msgid "Almost every mass compromise of a WordPress site starts with a version whose vulnerability was published, and patched, weeks earlier."2640 msgstr ""2641 2642 #: includes/class-hardening-score.php:5552643 2704 msgid "Apply the waiting updates, then turn on automatic updates for anything you do not review by hand." 2644 2705 msgstr "" 2645 2706 2707 #: includes/class-hardening-score.php:560 2708 msgid "PHP errors are not printed to visitors" 2709 msgstr "" 2710 2646 2711 #: includes/class-hardening-score.php:563 2647 msgid "PHP errors are not printed to visitors"2648 msgstr ""2649 2650 #: includes/class-hardening-score.php:5662651 2712 msgid "WP_DEBUG and WP_DEBUG_DISPLAY are both on." 2652 2713 msgstr "" 2653 2714 2654 #: includes/class-hardening-score.php:56 72715 #: includes/class-hardening-score.php:564 2655 2716 msgid "Errors are not displayed." 2656 2717 msgstr "" 2657 2718 2658 #: includes/class-hardening-score.php:56 82719 #: includes/class-hardening-score.php:565 2659 2720 msgid "A displayed PHP error prints absolute paths, database names and fragments of your queries into the page for whoever triggered it." 2660 2721 msgstr "" 2661 2722 2662 #: includes/class-hardening-score.php:57 32723 #: includes/class-hardening-score.php:570 2663 2724 msgid "Edit wp-config.php: set WP_DEBUG to false, or leave WP_DEBUG on and set WP_DEBUG_DISPLAY to false with WP_DEBUG_LOG on. No admin screen can change this." 2664 2725 msgstr "" 2665 2726 2727 #: includes/class-hardening-score.php:576 2728 msgid "XML-RPC is switched off" 2729 msgstr "" 2730 2731 #: includes/class-hardening-score.php:578 2732 #: includes/class-hardening-score.php:647 2733 #: includes/class-hardening-score.php:837 2734 #: includes/class-hardening-score.php:851 2735 msgid "Off." 2736 msgstr "" 2737 2738 #: includes/class-hardening-score.php:578 2739 msgid "On — xmlrpc.php answers anonymous callers." 2740 msgstr "" 2741 2666 2742 #: includes/class-hardening-score.php:579 2667 msgid "XML-RPC is switched off" 2668 msgstr "" 2669 2670 #: includes/class-hardening-score.php:581 2671 #: includes/class-hardening-score.php:650 2672 #: includes/class-hardening-score.php:859 2673 #: includes/class-hardening-score.php:873 2674 msgid "Off." 2675 msgstr "" 2676 2677 #: includes/class-hardening-score.php:581 2678 msgid "On — xmlrpc.php answers anonymous callers." 2743 msgid "One xmlrpc.php request can try hundreds of passwords through system.multicall, and the same endpoint answers pingback.ping for reflection attacks against other people." 2679 2744 msgstr "" 2680 2745 2681 2746 #: includes/class-hardening-score.php:582 2682 msgid "One xmlrpc.php request can try hundreds of passwords through system.multicall, and the same endpoint answers pingback.ping for reflection attacks against other people."2683 msgstr ""2684 2685 #: includes/class-hardening-score.php:5852686 2747 msgid "Turn on \"Disable XML-RPC\" under API & Protocols. Only turn it back on if you still publish from a desktop or mobile client that needs it." 2687 2748 msgstr "" 2688 2749 2689 #: includes/class-hardening-score.php:5 912750 #: includes/class-hardening-score.php:588 2690 2751 msgid "Off — failed logins are never counted." 2691 2752 msgstr "" 2692 2753 2693 2754 #. translators: %d is the configured number of failed attempts before lockout. 2694 #: includes/class-hardening-score.php:59 62755 #: includes/class-hardening-score.php:593 2695 2756 #, php-format 2696 2757 msgid "On, locking out after %d failed attempts." … … 2698 2759 2699 2760 #. translators: %d is the configured number of failed attempts before lockout. 2700 #: includes/class-hardening-score.php:60 32761 #: includes/class-hardening-score.php:600 2701 2762 #, php-format 2702 2763 msgid "On, but %d attempts is a generous budget for a guessing script." … … 2704 2765 2705 2766 #. translators: %d is the configured number of failed attempts before lockout. 2706 #: includes/class-hardening-score.php:6 102767 #: includes/class-hardening-score.php:607 2707 2768 #, php-format 2708 2769 msgid "On, but a threshold of %d will never trip in practice." 2709 2770 msgstr "" 2710 2771 2772 #: includes/class-hardening-score.php:614 2773 msgid "Brute-force protection locks out guessers" 2774 msgstr "" 2775 2711 2776 #: includes/class-hardening-score.php:617 2712 msgid " Brute-force protection locks out guessers"2777 msgid "Password spraying only stops when the attempts stop. A threshold set so high that it never trips is a log, not a defence." 2713 2778 msgstr "" 2714 2779 2715 2780 #: includes/class-hardening-score.php:620 2716 msgid "Password spraying only stops when the attempts stop. A threshold set so high that it never trips is a log, not a defence."2717 msgstr ""2718 2719 #: includes/class-hardening-score.php:6232720 2781 msgid "Turn on brute-force protection and set the maximum attempts to ten or fewer." 2721 2782 msgstr "" 2722 2783 2723 #: includes/class-hardening-score.php:62 72784 #: includes/class-hardening-score.php:624 2724 2785 msgid "Staging mode is on, so this copy writes the lockout down and lets the request through. The setting is right; nothing is being blocked here." 2725 2786 msgstr "" 2726 2787 2788 #: includes/class-hardening-score.php:631 2789 msgid "The built-in theme and plugin editor is off" 2790 msgstr "" 2791 2727 2792 #: includes/class-hardening-score.php:634 2728 msgid "The built-in theme and plugin editor is off"2729 msgstr ""2730 2731 #: includes/class-hardening-score.php:6372732 2793 msgid "DISALLOW_FILE_EDIT is in force." 2733 2794 msgstr "" 2734 2795 2735 #: includes/class-hardening-score.php:63 82796 #: includes/class-hardening-score.php:635 2736 2797 msgid "The editor is reachable — DISALLOW_FILE_EDIT is not in force on this request." 2737 2798 msgstr "" 2738 2799 2800 #: includes/class-hardening-score.php:636 2801 msgid "The theme editor turns one hijacked administrator session into arbitrary PHP on your server, with no upload and no file access needed." 2802 msgstr "" 2803 2739 2804 #: includes/class-hardening-score.php:639 2740 msgid "The theme editor turns one hijacked administrator session into arbitrary PHP on your server, with no upload and no file access needed."2741 msgstr ""2742 2743 #: includes/class-hardening-score.php:6422744 2805 msgid "Turn on \"Disable theme/plugin file editor\". If it is already on, something in wp-config.php defines DISALLOW_FILE_EDIT as false and wins — fix it there." 2745 2806 msgstr "" 2746 2807 2747 #: includes/class-hardening-score.php:6 522808 #: includes/class-hardening-score.php:649 2748 2809 msgid "On, but no baseline has ever been taken — there is nothing to compare against." 2749 2810 msgstr "" 2750 2811 2751 2812 #. translators: %d is the number of files found that wordpress.org does not list. 2752 #: includes/class-hardening-score.php:65 62813 #: includes/class-hardening-score.php:653 2753 2814 #, php-format 2754 2815 msgid "The last scan found %d file that is not in the official build." … … 2757 2818 msgstr[1] "" 2758 2819 2759 #: includes/class-hardening-score.php:66 52820 #: includes/class-hardening-score.php:662 2760 2821 msgid "A baseline exists, but the last scan is more than a week old." 2761 2822 msgstr "" 2762 2823 2763 #: includes/class-hardening-score.php:66 72824 #: includes/class-hardening-score.php:664 2764 2825 msgid "A baseline exists and the last scan is recent." 2765 2826 msgstr "" 2766 2827 2767 #: includes/class-hardening-score.php:6 722828 #: includes/class-hardening-score.php:669 2768 2829 msgid "File integrity has a fresh baseline" 2769 2830 msgstr "" 2770 2831 2771 #: includes/class-hardening-score.php:67 92832 #: includes/class-hardening-score.php:676 2772 2833 msgid "A backdoor written into a core or plugin file looks like nothing at all from the dashboard; only a hash taken before it arrived can tell you it is there." 2773 2834 msgstr "" 2774 2835 2775 #: includes/class-hardening-score.php:68 32836 #: includes/class-hardening-score.php:680 2776 2837 msgid "Open the File integrity screen and look at what was found. A PHP file wordpress.org does not list, sitting in wp-admin or wp-includes, is not something a WordPress update leaves behind." 2777 2838 msgstr "" 2778 2839 2779 #: includes/class-hardening-score.php:68 42840 #: includes/class-hardening-score.php:681 2780 2841 msgid "Run a scan on the File integrity screen to create the baseline, and check that the daily cron is firing." 2781 2842 msgstr "" 2782 2843 2844 #: includes/class-hardening-score.php:693 2845 msgid "No account is called \"admin\"" 2846 msgstr "" 2847 2783 2848 #: includes/class-hardening-score.php:696 2784 msgid "No account is called \"admin\""2785 msgstr ""2786 2787 #: includes/class-hardening-score.php:6992788 2849 msgid "An account with the login \"admin\" exists." 2789 2850 msgstr "" 2790 2851 2791 #: includes/class-hardening-score.php: 7002852 #: includes/class-hardening-score.php:697 2792 2853 msgid "No account uses that login." 2793 2854 msgstr "" 2794 2855 2856 #: includes/class-hardening-score.php:698 2857 msgid "An account literally named admin hands over half of every credential pair before the guessing starts." 2858 msgstr "" 2859 2795 2860 #: includes/class-hardening-score.php:701 2796 msgid "An account literally named admin hands over half of every credential pair before the guessing starts."2797 msgstr ""2798 2799 #: includes/class-hardening-score.php:7042800 2861 msgid "Create a new administrator with a different login, move the content to it, and delete the old one." 2801 2862 msgstr "" 2802 2863 2864 #: includes/class-hardening-score.php:707 2865 msgid "Login names are not published" 2866 msgstr "" 2867 2868 #: includes/class-hardening-score.php:709 2869 #: includes/class-hardening-score.php:863 2870 msgid "Blocked." 2871 msgstr "" 2872 2873 #: includes/class-hardening-score.php:709 2874 msgid "Anyone can list your login names." 2875 msgstr "" 2876 2803 2877 #: includes/class-hardening-score.php:710 2804 msgid "Login names are not published" 2805 msgstr "" 2806 2807 #: includes/class-hardening-score.php:712 2808 #: includes/class-hardening-score.php:885 2809 msgid "Blocked." 2810 msgstr "" 2811 2812 #: includes/class-hardening-score.php:712 2813 msgid "Anyone can list your login names." 2878 msgid "The ?author=1 redirect and the REST users route hand out real login names, which turns password guessing from two unknowns into one." 2814 2879 msgstr "" 2815 2880 2816 2881 #: includes/class-hardening-score.php:713 2817 msgid "The ?author=1 redirect and the REST users route hand out real login names, which turns password guessing from two unknowns into one."2818 msgstr ""2819 2820 #: includes/class-hardening-score.php:7162821 2882 msgid "Turn on \"Block user enumeration\" under Hardening." 2822 2883 msgstr "" 2823 2884 2824 #: includes/class-hardening-score.php:740 2825 msgid "The REST API answers anonymous callers on every namespace." 2885 #: includes/class-hardening-score.php:727 2886 msgid "The REST API keeps user records private" 2887 msgstr "" 2888 2889 #: includes/class-hardening-score.php:730 2890 msgid "Visitors and customers cannot list your users or read their records through the REST API." 2891 msgstr "" 2892 2893 #: includes/class-hardening-score.php:731 2894 msgid "Anyone can list your users through the REST API." 2895 msgstr "" 2896 2897 #: includes/class-hardening-score.php:732 2898 msgid "The REST users route hands out every author's login slug to anyone who asks, which turns password guessing from two unknowns into one." 2899 msgstr "" 2900 2901 #: includes/class-hardening-score.php:735 2902 msgid "Turn on \"Keep user records out of the REST API\" under API & Protocols." 2903 msgstr "" 2904 2905 #: includes/class-hardening-score.php:741 2906 msgid "Security response headers are sent" 2826 2907 msgstr "" 2827 2908 2828 2909 #: includes/class-hardening-score.php:743 2829 msgid "Restricted, but the allowlist lets wp/v2 back in — which is the part that was being restricted." 2830 msgstr "" 2831 2832 #: includes/class-hardening-score.php:746 2833 msgid "Anonymous REST access is limited to the allowlisted namespaces." 2834 msgstr "" 2835 2836 #: includes/class-hardening-score.php:751 2837 msgid "The REST API is restricted to signed-in callers" 2838 msgstr "" 2839 2840 #: includes/class-hardening-score.php:754 2841 msgid "An open REST API publishes users, posts, media and some settings to anonymous callers, and an allowlist entry that re-admits wp/v2 undoes the whole restriction while the checkbox still reads as on." 2842 msgstr "" 2843 2844 #: includes/class-hardening-score.php:757 2845 msgid "Turn on the REST restriction and remove any allowlist line that matches wp/v2." 2910 msgid "Sent." 2911 msgstr "" 2912 2913 #: includes/class-hardening-score.php:743 2914 msgid "Not sent." 2915 msgstr "" 2916 2917 #: includes/class-hardening-score.php:744 2918 msgid "Without them the browser will sniff content types, render your pages inside somebody else's frame, and leak the full URL of every page as a referrer." 2919 msgstr "" 2920 2921 #: includes/class-hardening-score.php:747 2922 msgid "Turn on \"Send security HTTP headers\" under Hardening." 2923 msgstr "" 2924 2925 #: includes/class-hardening-score.php:752 2926 msgid "No Content-Security-Policy header is sent." 2927 msgstr "" 2928 2929 #: includes/class-hardening-score.php:755 2930 msgid "Sent in report-only mode, which records violations and blocks nothing." 2931 msgstr "" 2932 2933 #: includes/class-hardening-score.php:758 2934 msgid "Sent and enforcing." 2846 2935 msgstr "" 2847 2936 2848 2937 #: includes/class-hardening-score.php:763 2849 msgid "Security response headers are sent" 2850 msgstr "" 2851 2852 #: includes/class-hardening-score.php:765 2853 msgid "Sent." 2854 msgstr "" 2855 2856 #: includes/class-hardening-score.php:765 2857 msgid "Not sent." 2938 msgid "A Content-Security-Policy is enforced" 2858 2939 msgstr "" 2859 2940 2860 2941 #: includes/class-hardening-score.php:766 2861 msgid " Without them the browser will sniff content types, render your pages inside somebody else's frame, and leak the full URL of every page as a referrer."2942 msgid "A policy is the last line that stops an injected script from running at all. Report-only is the correct place to start and it is worth half — it watches, and it blocks nothing." 2862 2943 msgstr "" 2863 2944 2864 2945 #: includes/class-hardening-score.php:769 2865 msgid "Turn on \"Send security HTTP headers\" under Hardening." 2866 msgstr "" 2867 2868 #: includes/class-hardening-score.php:774 2869 msgid "No Content-Security-Policy header is sent." 2946 msgid "Run report-only until the reports are quiet, then turn report-only off so the policy actually blocks." 2870 2947 msgstr "" 2871 2948 2872 2949 #: includes/class-hardening-score.php:777 2873 msgid "Sen t in report-only mode, which records violations and blocks nothing."2950 msgid "Sensitive files are not directly readable" 2874 2951 msgstr "" 2875 2952 2876 2953 #: includes/class-hardening-score.php:780 2877 msgid "Sent and enforcing." 2878 msgstr "" 2879 2880 #: includes/class-hardening-score.php:785 2881 msgid "A Content-Security-Policy is enforced" 2882 msgstr "" 2883 2884 #: includes/class-hardening-score.php:788 2885 msgid "A policy is the last line that stops an injected script from running at all. Report-only is the correct place to start and it is worth half — it watches, and it blocks nothing." 2886 msgstr "" 2887 2888 #: includes/class-hardening-score.php:791 2889 msgid "Run report-only until the reports are quiet, then turn report-only off so the policy actually blocks." 2954 #: includes/class-hardening-score.php:822 2955 msgid "This server does not read .htaccess, so GuardForge cannot answer for it here." 2956 msgstr "" 2957 2958 #: includes/class-hardening-score.php:782 2959 msgid "The deny rules are present in .htaccess." 2960 msgstr "" 2961 2962 #: includes/class-hardening-score.php:783 2963 msgid "The deny rules are not in .htaccess." 2964 msgstr "" 2965 2966 #: includes/class-hardening-score.php:784 2967 msgid "A readable wp-config.php or a forgotten debug.log hands over database credentials, salts and query fragments without needing a single exploit." 2968 msgstr "" 2969 2970 #: includes/class-hardening-score.php:787 2971 msgid "Turn on \"Protect sensitive files\" and make sure .htaccess is writable so the rules can be written." 2972 msgstr "" 2973 2974 #: includes/class-hardening-score.php:793 2975 msgid "Administrator actions are recorded" 2976 msgstr "" 2977 2978 #: includes/class-hardening-score.php:795 2979 msgid "Recorded." 2980 msgstr "" 2981 2982 #: includes/class-hardening-score.php:795 2983 msgid "Not recorded." 2984 msgstr "" 2985 2986 #: includes/class-hardening-score.php:796 2987 msgid "Without a trail you cannot say which account changed what or when, so an incident ends in guesswork instead of a timeline." 2890 2988 msgstr "" 2891 2989 2892 2990 #: includes/class-hardening-score.php:799 2893 msgid "Sensitive files are not directly readable" 2894 msgstr "" 2895 2896 #: includes/class-hardening-score.php:802 2897 #: includes/class-hardening-score.php:844 2898 msgid "This server does not read .htaccess, so GuardForge cannot answer for it here." 2899 msgstr "" 2900 2901 #: includes/class-hardening-score.php:804 2902 msgid "The deny rules are present in .htaccess." 2903 msgstr "" 2904 2905 #: includes/class-hardening-score.php:805 2906 msgid "The deny rules are not in .htaccess." 2907 msgstr "" 2908 2909 #: includes/class-hardening-score.php:806 2910 msgid "A readable wp-config.php or a forgotten debug.log hands over database credentials, salts and query fragments without needing a single exploit." 2991 msgid "Turn on \"Log admin actions\" under Action audit." 2992 msgstr "" 2993 2994 #: includes/class-hardening-score.php:807 2995 msgid "The WordPress version is not advertised" 2911 2996 msgstr "" 2912 2997 2913 2998 #: includes/class-hardening-score.php:809 2914 msgid "Turn on \"Protect sensitive files\" and make sure .htaccess is writable so the rules can be written." 2915 msgstr "" 2916 2917 #: includes/class-hardening-score.php:815 2918 msgid "Administrator actions are recorded" 2919 msgstr "" 2920 2921 #: includes/class-hardening-score.php:817 2922 msgid "Recorded." 2923 msgstr "" 2924 2925 #: includes/class-hardening-score.php:817 2926 msgid "Not recorded." 2927 msgstr "" 2928 2929 #: includes/class-hardening-score.php:818 2930 msgid "Without a trail you cannot say which account changed what or when, so an incident ends in guesswork instead of a timeline." 2931 msgstr "" 2932 2933 #: includes/class-hardening-score.php:821 2934 msgid "Turn on \"Log admin actions\" under Action audit." 2999 msgid "Hidden." 3000 msgstr "" 3001 3002 #: includes/class-hardening-score.php:809 3003 msgid "Published in the generator tag and asset URLs." 3004 msgstr "" 3005 3006 #: includes/class-hardening-score.php:810 3007 msgid "A version in the generator tag turns a scan into a lookup: read it once, and you know which exploits are worth trying." 3008 msgstr "" 3009 3010 #: includes/class-hardening-score.php:813 3011 msgid "Turn on \"Hide WordPress version\" under Hardening." 3012 msgstr "" 3013 3014 #: includes/class-hardening-score.php:819 3015 msgid "Directories do not list their contents" 3016 msgstr "" 3017 3018 #: includes/class-hardening-score.php:824 3019 msgid "Options -Indexes is in place." 3020 msgstr "" 3021 3022 #: includes/class-hardening-score.php:825 3023 msgid "Options -Indexes is not in place." 3024 msgstr "" 3025 3026 #: includes/class-hardening-score.php:826 3027 msgid "An open directory index lists the backups, exports and stray archives that nobody ever linked to and everybody forgets about." 2935 3028 msgstr "" 2936 3029 2937 3030 #: includes/class-hardening-score.php:829 2938 msgid "The WordPress version is not advertised" 2939 msgstr "" 2940 2941 #: includes/class-hardening-score.php:831 2942 msgid "Hidden." 2943 msgstr "" 2944 2945 #: includes/class-hardening-score.php:831 2946 msgid "Published in the generator tag and asset URLs." 2947 msgstr "" 2948 2949 #: includes/class-hardening-score.php:832 2950 msgid "A version in the generator tag turns a scan into a lookup: read it once, and you know which exploits are worth trying." 3031 msgid "Turn on \"Disable directory listing\" under Files & Directories." 2951 3032 msgstr "" 2952 3033 2953 3034 #: includes/class-hardening-score.php:835 2954 msgid "Turn on \"Hide WordPress version\" under Hardening." 3035 msgid "The login form asks a question a script cannot answer" 3036 msgstr "" 3037 3038 #: includes/class-hardening-score.php:837 3039 #: includes/class-hardening-score.php:851 3040 msgid "On." 3041 msgstr "" 3042 3043 #: includes/class-hardening-score.php:838 3044 msgid "A trivial arithmetic challenge costs a person two seconds and stops the cheapest credential-stuffing bots outright." 2955 3045 msgstr "" 2956 3046 2957 3047 #: includes/class-hardening-score.php:841 2958 msgid "Directories do not list their contents" 2959 msgstr "" 2960 2961 #: includes/class-hardening-score.php:846 2962 msgid "Options -Indexes is in place." 2963 msgstr "" 2964 2965 #: includes/class-hardening-score.php:847 2966 msgid "Options -Indexes is not in place." 2967 msgstr "" 2968 2969 #: includes/class-hardening-score.php:848 2970 msgid "An open directory index lists the backups, exports and stray archives that nobody ever linked to and everybody forgets about." 2971 msgstr "" 2972 2973 #: includes/class-hardening-score.php:851 2974 msgid "Turn on \"Disable directory listing\" under Files & Directories." 2975 msgstr "" 2976 2977 #: includes/class-hardening-score.php:857 2978 msgid "The login form asks a question a script cannot answer" 2979 msgstr "" 2980 2981 #: includes/class-hardening-score.php:859 3048 msgid "Turn on \"Math captcha on login\" under Hardening." 3049 msgstr "" 3050 3051 #: includes/class-hardening-score.php:849 3052 msgid "Pingbacks are switched off" 3053 msgstr "" 3054 3055 #: includes/class-hardening-score.php:852 3056 msgid "Pingbacks let your site be pointed at somebody else's as a reflector in a denial-of-service, and they advertise that with an X-Pingback header." 3057 msgstr "" 3058 3059 #: includes/class-hardening-score.php:855 3060 msgid "Turn on \"Disable self-pingbacks\" under API & Protocols." 3061 msgstr "" 3062 3063 #: includes/class-hardening-score.php:861 3064 msgid "Known scanner User-Agents are blocked" 3065 msgstr "" 3066 3067 #: includes/class-hardening-score.php:863 3068 msgid "Not blocked." 3069 msgstr "" 3070 3071 #: includes/class-hardening-score.php:864 3072 msgid "Blocking the default signatures of sqlmap, nikto and wpscan removes the noisy, automated half of hostile traffic before it reaches PHP at all." 3073 msgstr "" 3074 3075 #: includes/class-hardening-score.php:867 3076 msgid "Turn on \"Block malicious bot User-Agents\" under Spam & Bots." 3077 msgstr "" 3078 3079 #: includes/class-hardening-score.php:871 3080 msgid "Nothing is set to send an alert, so nothing will be sent." 3081 msgstr "" 3082 2982 3083 #: includes/class-hardening-score.php:873 2983 msgid "On." 2984 msgstr "" 2985 2986 #: includes/class-hardening-score.php:860 2987 msgid "A trivial arithmetic challenge costs a person two seconds and stops the cheapest credential-stuffing bots outright." 2988 msgstr "" 2989 2990 #: includes/class-hardening-score.php:863 2991 msgid "Turn on \"Math captcha on login\" under Hardening." 2992 msgstr "" 2993 2994 #: includes/class-hardening-score.php:871 2995 msgid "Pingbacks are switched off" 2996 msgstr "" 2997 2998 #: includes/class-hardening-score.php:874 2999 msgid "Pingbacks let your site be pointed at somebody else's as a reflector in a denial-of-service, and they advertise that with an X-Pingback header." 3000 msgstr "" 3001 3002 #: includes/class-hardening-score.php:877 3003 msgid "Turn on \"Disable self-pingbacks\" under API & Protocols." 3084 msgid "Alerts are switched on, but there is no address for them to reach." 3085 msgstr "" 3086 3087 #: includes/class-hardening-score.php:875 3088 msgid "Alerts are switched on and an address resolves." 3089 msgstr "" 3090 3091 #: includes/class-hardening-score.php:880 3092 msgid "Someone is told when something happens" 3004 3093 msgstr "" 3005 3094 3006 3095 #: includes/class-hardening-score.php:883 3007 msgid "Known scanner User-Agents are blocked" 3008 msgstr "" 3009 3010 #: includes/class-hardening-score.php:885 3011 msgid "Not blocked." 3096 msgid "A lockout or an integrity change that nobody is told about is a detection that arrives whenever somebody next happens to open the dashboard." 3012 3097 msgstr "" 3013 3098 3014 3099 #: includes/class-hardening-score.php:886 3015 msgid "Blocking the default signatures of sqlmap, nikto and wpscan removes the noisy, automated half of hostile traffic before it reaches PHP at all."3016 msgstr ""3017 3018 #: includes/class-hardening-score.php:8893019 msgid "Turn on \"Block malicious bot User-Agents\" under Spam & Bots."3020 msgstr ""3021 3022 #: includes/class-hardening-score.php:8933023 msgid "Nothing is set to send an alert, so nothing will be sent."3024 msgstr ""3025 3026 #: includes/class-hardening-score.php:8953027 msgid "Alerts are switched on, but there is no address for them to reach."3028 msgstr ""3029 3030 #: includes/class-hardening-score.php:8973031 msgid "Alerts are switched on and an address resolves."3032 msgstr ""3033 3034 #: includes/class-hardening-score.php:9023035 msgid "Someone is told when something happens"3036 msgstr ""3037 3038 #: includes/class-hardening-score.php:9053039 msgid "A lockout or an integrity change that nobody is told about is a detection that arrives whenever somebody next happens to open the dashboard."3040 msgstr ""3041 3042 #: includes/class-hardening-score.php:9083043 3100 msgid "Switch on the lockout, integrity and new-administrator alerts, and set the address they should reach." 3044 3101 msgstr "" 3045 3102 3046 #: includes/class-hardening-score.php: 9123103 #: includes/class-hardening-score.php:890 3047 3104 msgid "Staging mode is on, so this copy holds every one of these e-mails back. The setting is right; nothing is being sent from here." 3048 3105 msgstr "" 3049 3106 3050 #: includes/class-hardening.php: 883107 #: includes/class-hardening.php:97 3051 3108 msgid "XML-RPC is disabled on this site." 3052 3109 msgstr "" 3053 3110 3054 #: includes/class-hardening.php:114 3111 #: includes/class-hardening.php:155 3112 msgid "Invalid user ID." 3113 msgstr "" 3114 3115 #: includes/class-hardening.php:159 3116 msgid "Sorry, you are not allowed to list users." 3117 msgstr "" 3118 3119 #: includes/class-hardening.php:214 3055 3120 msgid "REST API is restricted to authenticated users." 3056 3121 msgstr "" 3057 3122 3058 #: includes/class-hardening.php:163 3123 #: includes/class-hardening.php:319 3124 msgid "Embeds of your posts on other sites" 3125 msgstr "" 3126 3127 #: includes/class-hardening.php:320 3128 msgid "WooCommerce block cart and checkout (guest orders)" 3129 msgstr "" 3130 3131 #: includes/class-hardening.php:321 3132 msgid "Contact Form 7 form submissions" 3133 msgstr "" 3134 3135 #: includes/class-hardening.php:322 3136 msgid "Jetpack connection to WordPress.com" 3137 msgstr "" 3138 3139 #: includes/class-hardening.php:323 3140 msgid "Form Forge form submissions" 3141 msgstr "" 3142 3143 #: includes/class-hardening.php:324 3144 msgid "Cascade Forge webhooks from other services" 3145 msgstr "" 3146 3147 #: includes/class-hardening.php:325 3148 msgid "Inclusive Forge scan results" 3149 msgstr "" 3150 3151 #: includes/class-hardening.php:366 3059 3152 msgid "Comments via REST are disabled." 3060 3153 msgstr "" 3061 3154 3062 3155 #. translators: %1$d and %2$d are random single-digit operands. 3063 #: includes/class-hardening.php: 2933156 #: includes/class-hardening.php:519 3064 3157 #, php-format 3065 3158 msgid "Verification: %1$d + %2$d = ?" 3066 3159 msgstr "" 3067 3160 3068 #: includes/class-hardening.php: 3173161 #: includes/class-hardening.php:554 3069 3162 msgid "<strong>Error:</strong> please answer the verification question." 3070 3163 msgstr "" 3071 3164 3072 #: includes/class-hardening.php: 3283165 #: includes/class-hardening.php:565 3073 3166 msgid "<strong>Error:</strong> verification expired, please try again." 3074 3167 msgstr "" 3075 3168 3076 #: includes/class-hardening.php: 3313169 #: includes/class-hardening.php:568 3077 3170 msgid "<strong>Error:</strong> the verification answer was wrong." 3078 3171 msgstr "" … … 3241 3334 3242 3335 #: includes/class-two-factor.php:223 3336 #: includes/class-two-factor.php:340 3243 3337 msgid "<strong>Error:</strong> two-factor code is invalid." 3244 3338 msgstr "" -
guardforge/tags/1.6.4/readme.txt
r3752344 r3754541 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.6. 37 Stable tag: 1.6.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 119 119 Off unless you switch it on. When you do, GuardForge issues a link on your own site that publishes a letter grade and the month it was worked out — nothing else. 120 120 121 The grade is not your score. It is worked out only from the eleven checks a stranger can already run against your site from outside with no login: the scheme, XML-RPC, whether `?author=1` gives up a login name, whether the REST API answersanonymous callers, the version in your generator tag, your response headers, your Content-Security-Policy header, whether a directory lists its contents, whether sensitive files answer directly, the login form, and the X-Pingback header. Everything on that list is already public, so the badge tells a passer-by nothing they could not have found by loading your site.121 The grade is not your score. It is worked out only from the eleven checks a stranger can already run against your site from outside with no login: the scheme, XML-RPC, whether `?author=1` gives up a login name, whether the REST API hands your user records to anonymous callers, the version in your generator tag, your response headers, your Content-Security-Policy header, whether a directory lists its contents, whether sensitive files answer directly, the login form, and the X-Pingback header. Everything on that list is already public, so the badge tells a passer-by nothing they could not have found by loading your site. 122 122 123 123 Your numeric score, your two-factor coverage, your brute-force thresholds, your integrity results, whether an account is called admin, your pending updates and any vulnerable components are never published, in any form. The link carries an unguessable token so nobody can walk a list of sites looking for weak ones, it can be reissued or turned off at any moment, views are never logged, and until you switch it on the address is not registered at all — your site answers WordPress's own 404, exactly like a site without the plugin. … … 163 163 164 164 == Changelog == 165 166 = 1.6.4 = 167 * Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before. 168 * The REST API is no longer closed to visitors by default. Until now GuardForge refused every anonymous REST call outside a short list, which stopped the block-based WooCommerce cart and checkout, Contact Form 7, webhooks and other public REST routes for your visitors. The default protection now keeps only user records private (the REST user list and single user records, and the author name and archive link that an embed answer and the users sitemap give out), for visitors and also for customers and subscribers. Sites that already had "Restrict REST API" switched on with the list of exceptions left as it was are moved to this protection by the update. A site that had written its own list of exceptions keeps the whole REST API closed to visitors, with that list: the new separate setting is switched on for it. Either way a notice in the admin, shown once and closable, says what was chosen and where to change it. Refusing every anonymous REST call is now a separate setting, off by default for everybody else; the Settings screen says what it stops (cart, checkout, forms, webhooks) and which active plugins would be affected. 169 * The REST address is read the same way with pretty permalinks (/wp-json/) and with plain ones (?rest_route=), so an allowed route is no longer refused on a site with plain permalinks. 170 * A wrong two-factor code now counts towards the same lockout as a wrong password, so a stolen password cannot be paired with guessed codes without limit. A locked-out address is turned away at the code step too. 171 * The login lockout now holds on every login form: WooCommerce My Account and other forms that use the standard login, and on REST requests with an application password. Failed application-password attempts count as failed logins (one per request), and a locked-out address is refused even with the right password. An administrator who is signed in by cookie behind a server password prompt (htpasswd) is not mistaken for a guess: the block editor keeps working from a locked-out address. 172 * The login captcha is now checked only where it is shown. Logging in through WooCommerce My Account or other forms without the captcha field no longer fails every time. 173 * "Unblock" in the list of lockouts now lifts the block for the address; it used to leave it in place. 165 174 166 175 = 1.6.3 = … … 270 279 == Upgrade Notice == 271 280 281 = 1.6.4 = 282 Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before. Anonymous REST access is no longer blocked by default: only user records stay private, so the WooCommerce cart, forms and webhooks work for visitors again. 283 272 284 = 1.6.3 = 273 285 Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before. -
guardforge/trunk/admin/partials/hardening-score.php
r3731705 r3754541 257 257 </p> 258 258 259 <?php if ( GUARDFORGE_Options::get( ' disable_rest_api' ) ) : ?>259 <?php if ( GUARDFORGE_Options::get( 'rest_lockdown' ) ) : ?> 260 260 <div class="gf-notice gf-notice-warn"> 261 261 ⚠ <?php esc_html_e( 'Your REST API is restricted to signed-in callers. GuardForge keeps this one route reachable on its own, so the badge still answers — you do not need to widen the allowlist for it.', 'guardforge' ); ?> -
guardforge/trunk/admin/partials/settings.php
r3752344 r3754541 474 474 <?php 475 475 $guardforge_render_toggle( 'disable_xmlrpc', __( 'Disable XML-RPC', 'guardforge' ), __( 'Blocks xmlrpc.php — a primary DDoS / brute-force vector.', 'guardforge' ) ); 476 $guardforge_render_toggle( 'disable_rest_api', __( ' Restrict REST API to logged-in users', 'guardforge' ), __( 'Anonymous REST access is limited to the namespaces in the allowlist below.', 'guardforge' ) );476 $guardforge_render_toggle( 'disable_rest_api', __( 'Keep user records out of the REST API', 'guardforge' ), __( 'Visitors and customers cannot list your users or read their records through the REST API, the usual way login names are collected. Checkout, forms and webhooks keep working.', 'guardforge' ) ); 477 477 $guardforge_render_toggle( 'disable_rest_comments', __( 'Forbid comments via REST', 'guardforge' ), __( 'Blocks POST /wp/v2/comments.', 'guardforge' ) ); 478 $guardforge_render_toggle( 'rest_lockdown', __( 'Close the whole REST API to visitors who are not signed in', 'guardforge' ), __( 'Only the namespaces in the REST API allowlist stay open to them. Anything that talks to your site through the REST API without signing in stops working unless its namespace is on that list.', 'guardforge' ), 'opt' ); 479 $guardforge_rest_casualties = GUARDFORGE_Hardening::lockdown_casualties( GUARDFORGE_Hardening::parse_lines( (string) $opts['rest_allowlist'] ) ); 480 ?> 481 <div class="gf-notice gf-notice-warn"> 482 ⚠ <?php 483 if ( ! empty( $opts['rest_lockdown'] ) ) { 484 esc_html_e( 'The REST API is closed to visitors who are not signed in.', 'guardforge' ); 485 } else { 486 esc_html_e( 'Before you close the whole REST API: it breaks the WooCommerce block cart and checkout, contact forms, webhooks other services send to your site, and embeds of your posts on other sites, unless their namespaces are in the allowlist.', 'guardforge' ); 487 } 488 ?> 489 <?php if ( $guardforge_rest_casualties ) : ?> 490 <br /><?php 491 if ( ! empty( $opts['rest_lockdown'] ) ) { 492 esc_html_e( 'Not working for them on this site right now:', 'guardforge' ); 493 } else { 494 esc_html_e( 'On this site, these would stop working for visitors:', 'guardforge' ); 495 } 496 ?> 497 <ul style="margin:4px 0 0 18px;list-style:disc"> 498 <?php foreach ( $guardforge_rest_casualties as $guardforge_rest_casualty ) : ?> 499 <li><?php echo esc_html( $guardforge_rest_casualty['label'] ); ?> — <?php 500 echo wp_kses( 501 sprintf( 502 /* translators: %s: a REST namespace such as wc/store */ 503 esc_html__( 'add %s to the allowlist to keep it', 'guardforge' ), 504 '<code>' . esc_html( $guardforge_rest_casualty['namespace'] ) . '</code>' 505 ), 506 [ 'code' => [] ] 507 ); 508 ?></li> 509 <?php endforeach; ?> 510 </ul> 511 <?php endif; ?> 512 </div> 513 <?php 478 514 $guardforge_render_toggle( 'disable_embed', __( 'Disable oEmbed discovery', 'guardforge' ), __( 'Removes /oembed information leaks.', 'guardforge' ), 'opt' ); 479 515 $guardforge_render_toggle( 'disable_pingback', __( 'Disable self-pingbacks', 'guardforge' ), __( 'Blocks pingbacks pointing at your own URLs.', 'guardforge' ), 'opt' ); … … 490 526 $guardforge_render_toggle( 'disable_user_enumeration', __( 'Block user enumeration', 'guardforge' ), __( 'Redirects ?author=N and hides anonymous /wp/v2/users.', 'guardforge' ) ); 491 527 $guardforge_render_toggle( 'security_headers', __( 'Send security HTTP headers', 'guardforge' ), __( 'Referrer-Policy, X-Content-Type-Options, X-Frame-Options, Permissions-Policy.', 'guardforge' ) ); 492 $guardforge_render_toggle( 'login_captcha_math', __( 'Math captcha on login', 'guardforge' ), __( 'Adds an a + b = ? challenge to the login form.', 'guardforge' ), 'opt' );528 $guardforge_render_toggle( 'login_captcha_math', __( 'Math captcha on login', 'guardforge' ), __( 'Adds an a + b = ? challenge to the WordPress login page. Sign-in forms of shops and membership plugins are not affected, so customers can still log in.', 'guardforge' ), 'opt' ); 493 529 ?> 494 530 </div> … … 701 737 <label><?php esc_html_e( 'REST API allowlist', 'guardforge' ); ?></label> 702 738 <textarea name="rest_allowlist" rows="3"><?php echo esc_textarea( $opts['rest_allowlist'] ); ?></textarea> 703 <div class="gf-field-desc"><?php esc_html_e( ' One namespace prefix per line. Routes whose namespace starts with one of these remain accessible to anonymous callers (oembed, formforge submissions, etc.).', 'guardforge' ); ?></div>739 <div class="gf-field-desc"><?php esc_html_e( 'Used only when the whole REST API is closed to visitors. One route per line; it stays open together with everything under it. The defaults keep embeds, WooCommerce checkout and the public endpoints of Avakode plugins working.', 'guardforge' ); ?></div> 704 740 </div> 705 741 <div class="gf-field" style="grid-column:1/-1"> -
guardforge/trunk/admin/partials/unblock.php
r3731705 r3754541 10 10 11 11 if ( isset( $_POST['guardforge_unblock_ip'] ) && check_admin_referer( 'guardforge_unblock_ip' ) ) { 12 $guardforge_ip = sanitize_text_field( wp_unslash( $_POST['guardforge_unblock_ip'] ) ); 13 delete_transient( GUARDFORGE_Bruteforce::attempts_key( $guardforge_ip ) ); 14 /* translators: %s is the IP address that was unblocked. */ 15 echo '<div class="gf-notice gf-notice-ok">✓ ' . sprintf( esc_html__( 'IP %s unblocked.', 'guardforge' ), '<code>' . esc_html( $guardforge_ip ) . '</code>' ) . '</div>'; 12 $guardforge_ip = sanitize_text_field( wp_unslash( $_POST['guardforge_unblock_ip'] ) ); 13 // An address typed in the box, or the lockout key from the list below. 14 $guardforge_lift = GUARDFORGE_Bruteforce::instance()->unblock( $guardforge_ip ); 15 if ( $guardforge_lift === 'ip' ) { 16 /* translators: %s is the IP address that was unblocked. */ 17 echo '<div class="gf-notice gf-notice-ok">✓ ' . sprintf( esc_html__( 'IP %s unblocked.', 'guardforge' ), '<code>' . esc_html( $guardforge_ip ) . '</code>' ) . '</div>'; 18 } elseif ( $guardforge_lift === 'key' ) { 19 echo '<div class="gf-notice gf-notice-ok">✓ ' . esc_html__( 'Lockout lifted.', 'guardforge' ) . '</div>'; 20 } else { 21 echo '<div class="gf-notice gf-notice-warn">' . esc_html__( 'That is not an IP address, so nothing was unblocked.', 'guardforge' ) . '</div>'; 22 } 16 23 } 17 24 -
guardforge/trunk/guardforge.php
r3752344 r3754541 4 4 * Plugin URI: https://guardforge.app 5 5 * Description: Hardening, brute-force protection, two-factor authentication, file-integrity monitoring, audit log and Content-Security-Policy for WordPress. The Pro add-on adds a WAF, malware scanner, CVE feed, Geo-IP and alerts. 6 * Version: 1.6. 36 * Version: 1.6.4 7 7 * Author: Avakode 8 8 * Author URI: https://avakode.com … … 17 17 } 18 18 19 define( 'GUARDFORGE_VERSION', '1.6. 3' );20 define( 'GUARDFORGE_DB_VERSION', '1.6. 0' ); // First screen: the switch-on dates (guardforge_*_enabled_since) are stamped once on upgrade.19 define( 'GUARDFORGE_VERSION', '1.6.4' ); 20 define( 'GUARDFORGE_DB_VERSION', '1.6.4' ); // 1.6.4: REST settings migrated (narrow protection + opt-in lockdown). 1.6.0: switch-on dates stamped once. 21 21 define( 'GUARDFORGE_DIR', plugin_dir_path( __FILE__ ) ); 22 22 define( 'GUARDFORGE_URL', plugin_dir_url( __FILE__ ) ); … … 287 287 require_once $guardforge_feedback_file; 288 288 } 289 // The connection of a site to an Avakode account's credits (the AJAX handlers and the return 290 // from avakode.com). It belongs to the AI client: the wp.org package has neither, so it has 291 // no connection either. 292 if ( class_exists( 'GUARDFORGE_Forge_API' ) ) { 293 $guardforge_credits = GUARDFORGE_Forge_API::credits_connect(); 294 if ( $guardforge_credits ) { 295 $guardforge_credits->register(); 296 } 297 } 289 // The connection of a site to an Avakode account's credits is built on init, not here: building 290 // it translates its sentences, and asking for the 'guardforge' text domain before init makes 291 // WordPress 6.7+ log "_load_textdomain_just_in_time was called incorrectly" on every admin 292 // request. Priority 1 is still ahead of admin-ajax.php and of the return from avakode.com. 293 add_action( 'init', 'guardforge_register_credits_connect', 1 ); 298 294 } 299 295 } 300 296 add_action( 'plugins_loaded', 'guardforge_init', 5 ); 297 298 /** 299 * Registers the connection of a site to an Avakode account's credits (the AJAX handlers and the 300 * return from avakode.com). It belongs to the AI client: the wp.org package has neither, so it has 301 * no connection either. 302 * 303 * @return void 304 */ 305 function guardforge_register_credits_connect() { 306 if ( ! class_exists( 'GUARDFORGE_Forge_API' ) ) { 307 return; 308 } 309 $guardforge_credits = GUARDFORGE_Forge_API::credits_connect(); 310 if ( $guardforge_credits ) { 311 $guardforge_credits->register(); 312 } 313 } 301 314 302 315 register_activation_hook( __FILE__, function () { -
guardforge/trunk/includes/class-bruteforce.php
r3736618 r3754541 24 24 } 25 25 26 /** Whether this request's wrong application password has been counted (see on_app_password_failed). */ 27 private $app_password_failure_counted = false; 28 26 29 private function __construct() { 27 30 add_action( 'login_init', [ $this, 'maybe_block_login' ], 1 ); 28 add_action( 'wp_login_failed', [ $this, 'on_login_failed' ] ); 31 // login_init is fired by wp-login.php only. A login made anywhere else 32 // (the shop's My Account form, a membership form, xmlrpc) goes through 33 // authenticate, so the lockout is asked there too — last, after every 34 // other handler: core's username/password handler (priority 20) finds 35 // the user and checks the password itself and ignores the WP_Error it 36 // is handed, so a refusal placed ahead of it never held against the 37 // correct password. 38 add_filter( 'authenticate', [ $this, 'refuse_locked_login' ], PHP_INT_MAX, 3 ); 39 // The failure hook passes the error so a refusal is not counted again. 40 add_action( 'wp_login_failed', [ $this, 'on_login_failed' ], 10, 2 ); 41 // Application passwords (REST Basic auth) fail through their own hook. 42 add_action( 'application_password_failed_authentication', [ $this, 'on_app_password_failed' ] ); 43 add_filter( 'rest_authentication_errors', [ $this, 'refuse_locked_basic_auth' ], 5 ); 29 44 add_action( 'wp_login', [ $this, 'on_login_success' ], 10, 2 ); 30 45 add_action( 'guardforge_log_gc_cron', [ $this, 'gc_old_logs' ] ); … … 64 79 } 65 80 66 public function on_login_failed( $username ) { 81 /** 82 * Whether the caller's address is out of tries right now, by the same 83 * rules maybe_block_login applies: protection on, address not listed, 84 * threshold reached, and the site not a staging copy. 85 */ 86 private function is_locked_out() { 87 if ( ! GUARDFORGE_Options::get( 'brute_force_protection' ) ) { 88 return false; 89 } 90 $ip = GUARDFORGE_Ip::client_ip(); 91 if ( $this->is_whitelisted( $ip ) ) { 92 return false; 93 } 94 if ( $this->get_attempts( $ip ) < (int) GUARDFORGE_Options::get( 'bf_max_attempts' ) ) { 95 return false; 96 } 97 return ! GUARDFORGE_Staging::is_active(); 98 } 99 100 private function locked_error() { 101 $minutes = (int) GUARDFORGE_Options::get( 'bf_lockout_minutes' ); 102 return new WP_Error( 103 'guardforge_locked', 104 sprintf( 105 /* translators: %d is the lockout window in minutes. */ 106 esc_html__( 'Too many failed attempts. Try again in %d minutes.', 'guardforge' ), 107 $minutes 108 ), 109 [ 'status' => 429 ] 110 ); 111 } 112 113 /** 114 * authenticate, last in line: refuse a login from an address that is out 115 * of tries, whatever the handlers before it decided — a WP_User from the 116 * right password included. A call with no credentials (a logout, a cookie 117 * check) is not a login and is left alone. 118 */ 119 public function refuse_locked_login( $user, $username = '', $password = '' ) { 120 if ( (string) $username === '' && (string) $password === '' ) { 121 return $user; 122 } 123 return $this->is_locked_out() ? $this->locked_error() : $user; 124 } 125 126 /** 127 * rest_authentication_errors, early: a request that really tries to log in 128 * with Basic credentials (an application password) from a locked address 129 * gets the refusal even if the password was right, so guessing yields 130 * nothing. A request without them is a visitor reading the public API, and 131 * keeps reading it. 132 * 133 * "Really tries" is decided the way core decides it: both halves of the 134 * header must have come (PHP_AUTH_USER and PHP_AUTH_PW), and a user found 135 * by the login cookie comes first, because core tries the application 136 * password only when no cookie user was found. A web server that protects 137 * the admin with htpasswd leaves the same two variables behind on every 138 * request, and an administrator behind it with a valid cookie is not 139 * guessing anything: refusing that request would take the block editor's 140 * REST calls away from an editor on a locked address. 141 */ 142 public function refuse_locked_basic_auth( $result ) { 143 if ( ! empty( $result ) ) { 144 return $result; 145 } 146 if ( empty( $_SERVER['PHP_AUTH_USER'] ) || ! isset( $_SERVER['PHP_AUTH_PW'] ) ) { 147 return $result; 148 } 149 if ( $this->cookie_user_id() > 0 ) { 150 return $result; 151 } 152 return $this->is_locked_out() ? $this->locked_error() : $result; 153 } 154 155 /** 156 * The user the login cookie names, 0 when there is none: the answer core's 157 * determine_current_user gives at priority 10 and 20 before it looks at an 158 * application password (the auth cookie, then the logged-in cookie that 159 * front-end and REST requests carry). It reads the cookies only and sets 160 * no current user, so it cannot start the application-password check 161 * itself. 162 */ 163 private function cookie_user_id() { 164 if ( function_exists( 'wp_validate_auth_cookie' ) ) { 165 $id = wp_validate_auth_cookie( '' ); 166 if ( $id ) { 167 return (int) $id; 168 } 169 if ( function_exists( 'wp_validate_logged_in_cookie' ) ) { 170 return (int) wp_validate_logged_in_cookie( false ); 171 } 172 } 173 return 0; 174 } 175 176 /** 177 * A wrong application password over REST: a failed login like any other. 178 * XML-RPC is left to wp_login_failed, which the same attempt also fires. 179 * 180 * One request carries one Basic header, so it is one guess however often 181 * core works the current user out again (a plugin that resets it makes 182 * core check the same password a second time and fire this again). 183 */ 184 public function on_app_password_failed( $error = null ) { 185 if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { 186 return; 187 } 188 if ( $this->app_password_failure_counted ) { 189 return; 190 } 191 $this->app_password_failure_counted = true; 192 $username = isset( $_SERVER['PHP_AUTH_USER'] ) ? sanitize_text_field( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) ) : ''; 193 $this->on_login_failed( $username ); 194 } 195 196 public function on_login_failed( $username, $error = null ) { 197 // Our own refusal is not a new guess; counting it would push the end of 198 // the lockout out on every retry. 199 if ( $error instanceof WP_Error && $error->get_error_code() === 'guardforge_locked' ) { 200 return; 201 } 67 202 if ( ! GUARDFORGE_Options::get( 'brute_force_protection' ) ) { 68 203 return; … … 148 283 } 149 284 285 /** 286 * Lift a lockout, by address or by the key the "Active lockouts" list 287 * shows. That list cannot show the address — it is hashed into the key — 288 * so its Unblock button posts the key, and treating that as an address 289 * hashed it a second time and cleared a counter that was never there. 290 * 291 * A key is accepted only in the exact shape this class writes 292 * (prefix + md5), so a posted value can never name another transient. 293 * 294 * @return string 'key', 'ip', or '' when the value is neither (nothing is deleted). 295 */ 296 public function unblock( $subject ) { 297 $subject = trim( (string) $subject ); 298 if ( preg_match( '/^' . preg_quote( self::ATTEMPTS_TRANSIENT_PREFIX, '/' ) . '[0-9a-f]{32}$/', $subject ) ) { 299 delete_transient( $subject ); 300 return 'key'; 301 } 302 if ( filter_var( $subject, FILTER_VALIDATE_IP ) ) { 303 $this->clear_attempts( $subject ); 304 return 'ip'; 305 } 306 return ''; 307 } 308 150 309 public static function attempts_key( $ip ) { 151 310 return self::ATTEMPTS_TRANSIENT_PREFIX . md5( (string) $ip ); -
guardforge/trunk/includes/class-core.php
r3735184 r3754541 24 24 add_filter( 'admin_body_class', [ $this, 'add_body_class' ] ); 25 25 add_action( 'admin_notices', [ $this, 'pro_addon_outdated_notice' ] ); 26 add_action( 'admin_notices', [ $this, 'rest_migration_notice' ] ); 27 add_action( 'admin_post_guardforge_rest_notice_dismiss', [ $this, 'handle_rest_notice_dismiss' ] ); 26 28 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] ); 27 29 } … … 74 76 echo ' <a href="https://avakode.com/dashboard/downloads/" target="_blank" rel="noopener">' . esc_html( __( 'Open Downloads', 'guardforge' ) ) . '</a>'; 75 77 echo '</p></div>'; 78 } 79 80 /** 81 * Once, after the 1.6.4 update: what happened to the REST API protection. 82 * 83 * The update split "Restrict REST API" in two (see 84 * GUARDFORGE_Options::migrate_rest_settings) and picked one for the 85 * site, so the site owner is told which and where to change it. The 86 * sentences carry no placeholders: the machine translator drops them. 87 */ 88 public function rest_migration_notice() { 89 if ( ! self::notice_screen_allows() ) { 90 return; 91 } 92 $mode = GUARDFORGE_Options::rest_migration_notice(); 93 if ( $mode === null ) { 94 return; 95 } 96 $settings = admin_url( 'admin.php?page=guardforge#gf-card-api' ); 97 $dismiss = wp_nonce_url( admin_url( 'admin-post.php?action=guardforge_rest_notice_dismiss' ), 'guardforge_rest_notice_dismiss' ); 98 99 echo '<div class="notice notice-warning"><p><strong>'; 100 if ( $mode === 'lockdown' ) { 101 echo esc_html__( 'GuardForge still closes the REST API to visitors who are not signed in, as you had set it.', 'guardforge' ); 102 echo '</strong></p><p>'; 103 echo esc_html__( 'Version 1.6.4 split the REST API protection in two. Because you had written your own list of exceptions, the switch that closes the whole REST API is now on, with your list. To keep only user records private instead, turn that switch off in Settings, under API & Protocols.', 'guardforge' ); 104 } else { 105 echo esc_html__( 'GuardForge now keeps only user records private in the REST API.', 'guardforge' ); 106 echo '</strong></p><p>'; 107 echo esc_html__( 'Version 1.6.4 split the REST API protection in two. The protection you had used the default list, which also shut out the WooCommerce cart and checkout, contact forms and webhooks, so it now closes user records to visitors and nothing else. To close the whole REST API to visitors who are not signed in, turn that switch on in Settings, under API & Protocols.', 'guardforge' ); 108 } 109 echo '</p><p><a class="button button-primary" href="' . esc_url( $settings ) . '">' . esc_html__( 'Open Settings', 'guardforge' ) . '</a> '; 110 echo '<a class="button" href="' . esc_url( $dismiss ) . '">' . esc_html__( 'Dismiss', 'guardforge' ) . '</a></p></div>'; 111 } 112 113 public function handle_rest_notice_dismiss() { 114 if ( ! current_user_can( 'manage_options' ) ) { 115 wp_die( esc_html__( 'Access denied.', 'guardforge' ) ); 116 } 117 check_admin_referer( 'guardforge_rest_notice_dismiss' ); 118 GUARDFORGE_Options::dismiss_rest_migration_notice(); 119 $back = wp_get_referer(); 120 wp_safe_redirect( $back ? $back : admin_url() ); 121 exit; 76 122 } 77 123 -
guardforge/trunk/includes/class-hardening-score.php
r3735184 r3754541 66 66 'notify_on_lockout', 67 67 'protect_sensitive_files', 68 'rest_allowlist',69 68 'security_headers', 70 69 'staging_force_production', … … 182 181 'user_enumeration_blocked' => false, 183 182 'rest_restricted' => false, 184 'rest_allowlist' => [],185 183 'security_headers' => false, 186 184 'csp_enabled' => false, … … 290 288 $facts['user_enumeration_blocked'] = ! empty( $opts['disable_user_enumeration'] ); 291 289 $facts['rest_restricted'] = ! empty( $opts['disable_rest_api'] ); 292 $facts['rest_allowlist'] = GUARDFORGE_Hardening::parse_lines( (string) ( $opts['rest_allowlist'] ?? '' ) );293 290 $facts['security_headers'] = ! empty( $opts['security_headers'] ); 294 291 $facts['csp_enabled'] = ! empty( $opts['csp_enabled'] ); … … 718 715 719 716 /* 720 * The allowlist is matched by GUARDFORGE_Hardening as 721 * strpos( $route, $needle ) === 0 — a prefix of the requested route. 722 * So core comes back in two ways, and both have to count: an entry 723 * short enough to be a prefix of "wp/v2" ("wp", or the whole thing), 724 * and an entry that starts with "wp/v2" and re-admits one branch of 725 * it ("wp/v2/users" is narrower and is still the login names). 726 */ 727 $readmits_core = false; 728 foreach ( (array) $f['rest_allowlist'] as $needle ) { 729 $needle = trim( (string) $needle ); 730 if ( $needle === '' ) { 731 continue; 732 } 733 if ( strpos( 'wp/v2', $needle ) === 0 || strpos( $needle, 'wp/v2' ) === 0 ) { 734 $readmits_core = true; 735 break; 736 } 737 } 738 if ( ! $f['rest_restricted'] ) { 739 $rest_earned = 0; 740 $rest_message = __( 'The REST API answers anonymous callers on every namespace.', 'guardforge' ); 741 } elseif ( $readmits_core ) { 742 $rest_earned = 0; 743 $rest_message = __( 'Restricted, but the allowlist lets wp/v2 back in — which is the part that was being restricted.', 'guardforge' ); 744 } else { 745 $rest_earned = 1; 746 $rest_message = __( 'Anonymous REST access is limited to the allowlisted namespaces.', 'guardforge' ); 747 } 717 * The REST protection that ships on (GUARD-REST-01, 1.6.4): user 718 * records closed to anyone who is not staff. The full lockdown is not 719 * scored — it breaks checkout, forms and webhooks, and a score that 720 * asked for it would push owners into breaking their own site. The 721 * allowlist belongs to the lockdown and cannot re-open user records, 722 * so it no longer bears on this row. 723 */ 748 724 $items[] = self::item( 749 725 'rest_restricted', 750 726 self::WEIGHT_MEDIUM, 751 __( 'The REST API is restricted to signed-in callers', 'guardforge' ), 752 $rest_earned, 753 $rest_message, 754 __( 'An open REST API publishes users, posts, media and some settings to anonymous callers, and an allowlist entry that re-admits wp/v2 undoes the whole restriction while the checkbox still reads as on.', 'guardforge' ), 727 __( 'The REST API keeps user records private', 'guardforge' ), 728 $f['rest_restricted'] ? 1 : 0, 729 $f['rest_restricted'] 730 ? __( 'Visitors and customers cannot list your users or read their records through the REST API.', 'guardforge' ) 731 : __( 'Anyone can list your users through the REST API.', 'guardforge' ), 732 __( 'The REST users route hands out every author\'s login slug to anyone who asks, which turns password guessing from two unknowns into one.', 'guardforge' ), 755 733 true, 756 734 self::settings_anchor( 'api' ), 757 __( 'Turn on the REST restriction and remove any allowlist line that matches wp/v2.', 'guardforge' )735 __( 'Turn on "Keep user records out of the REST API" under API & Protocols.', 'guardforge' ) 758 736 ); 759 737 -
guardforge/trunk/includes/class-hardening.php
r3712655 r3754541 35 35 add_action( 'init', [ $this, 'block_xmlrpc_php' ], 1 ); 36 36 37 // REST API gating 37 // REST API. The narrow protection (on by default) judges the request 38 // WordPress is about to answer, whatever address reached it — served, 39 // embedded (_embed) or internal. The full lockdown (opt-in) judges 40 // only requests served over HTTP, so a page that renders REST data on 41 // the server for a visitor keeps rendering. 42 add_filter( 'rest_request_before_callbacks', [ $this, 'guard_user_records' ], 10, 3 ); 38 43 add_filter( 'rest_authentication_errors', [ $this, 'filter_rest_authentication' ], 99 ); 39 44 … … 56 61 add_filter( 'rest_endpoints', [ $this, 'maybe_remove_users_endpoint' ] ); 57 62 add_filter( 'rest_user_query', [ $this, 'filter_rest_user_query' ] ); 63 // The other two places core publishes login slugs: the author link in 64 // an oEmbed answer and the users sitemap (Wordfence closes the same). 65 add_filter( 'oembed_response_data', [ $this, 'filter_oembed_author' ], 99 ); 66 add_filter( 'wp_sitemaps_add_provider', [ $this, 'filter_sitemap_provider' ], 99, 2 ); 58 67 59 68 // oEmbed … … 93 102 94 103 /** 95 * Return WP_Error to block REST unless either: 96 * - the user is logged in, or 97 * - the requested route matches an allowlisted namespace. 98 * 99 * The allowlist prevents the original Lyuhon behaviour from breaking 100 * block-editor previews, oEmbed, FormForge submissions, etc. 104 * Narrow protection ('disable_rest_api', on by default): user records. 105 * 106 * The REST users route is how login names are harvested — the list, its 107 * search, and a record by ID all carry the slug, which is usually the 108 * login. Anyone who cannot write posts is refused it: visitors, and also 109 * subscribers and customers, because on a store anyone can register and 110 * "signed in" is no barrier. Staff keep it (the block editor lists 111 * authors over REST), as does everyone for their own record and for 112 * users/me, which core already limits to the caller. 113 * 114 * Hooked on rest_request_before_callbacks, so the decision is made on the 115 * handler WordPress picked — not on the address the caller typed. That 116 * covers /wp-json/, ?rest_route=, any spelling core's case-insensitive 117 * matching accepts, and the internal request behind _embed=author. 118 * 119 * Nothing else is closed by default: the Store API, form submissions, 120 * webhooks and published content are public by design. 121 * 122 * @param mixed $response Null, or an earlier refusal. 123 * @param array $handler The matched handler. 124 * @param WP_REST_Request $request 125 * @return mixed 126 */ 127 public function guard_user_records( $response, $handler, $request ) { 128 if ( ! GUARDFORGE_Options::get( 'disable_rest_api' ) ) { 129 return $response; 130 } 131 if ( $response instanceof WP_Error ) { 132 return $response; 133 } 134 if ( ! is_object( $request ) || ! method_exists( $request, 'get_route' ) ) { 135 return $response; 136 } 137 $kind = self::user_record_read( $handler, $request ); 138 if ( $kind === '' ) { 139 return $response; 140 } 141 if ( current_user_can( 'edit_posts' ) ) { 142 return $response; 143 } 144 if ( $kind === 'item' ) { 145 $own = (int) get_current_user_id(); 146 $id = (int) $request->get_param( 'id' ); 147 if ( $id === 0 && preg_match( '#/users/+(\d+)/*$#i', (string) $request->get_route(), $m ) ) { 148 $id = (int) $m[1]; 149 } 150 if ( $own > 0 && $id === $own ) { 151 return $response; 152 } 153 // Core's own answer for an ID that is not there, so the refusal 154 // says nothing about whether the account exists. 155 return new WP_Error( 'rest_user_invalid_id', __( 'Invalid user ID.', 'guardforge' ), [ 'status' => 404 ] ); 156 } 157 return new WP_Error( 158 'rest_user_cannot_view', 159 __( 'Sorry, you are not allowed to list users.', 'guardforge' ), 160 [ 'status' => rest_authorization_required_code() ] 161 ); 162 } 163 164 /** 165 * 'list', 'item' or '' — whether this request reads user records. 166 */ 167 private static function user_record_read( $handler, $request ) { 168 $method = method_exists( $request, 'get_method' ) ? strtoupper( (string) $request->get_method() ) : 'GET'; 169 if ( $method !== 'GET' && $method !== 'HEAD' ) { 170 return ''; 171 } 172 $callback = is_array( $handler ) && isset( $handler['callback'] ) ? $handler['callback'] : null; 173 if ( is_array( $callback ) && isset( $callback[0], $callback[1] ) && is_object( $callback[0] ) 174 && class_exists( 'WP_REST_Users_Controller' ) && $callback[0] instanceof WP_REST_Users_Controller ) { 175 $name = strtolower( (string) $callback[1] ); 176 if ( $name === 'get_items' ) { 177 return 'list'; 178 } 179 return $name === 'get_item' ? 'item' : ''; 180 } 181 $route = (string) $request->get_route(); 182 if ( preg_match( '#^/*wp/+v2/+users/*$#i', $route ) ) { 183 return 'list'; 184 } 185 if ( preg_match( '#^/*wp/+v2/+users/+\d+/*$#i', $route ) ) { 186 return 'item'; 187 } 188 return ''; 189 } 190 191 /** 192 * Full lockdown ('rest_lockdown', off by default): every anonymous REST 193 * call is refused unless its route is on the allowlist. 194 * 195 * The owner switches this on knowing it breaks whatever talks to the site 196 * without signing in; the settings screen lists what that is on this site 197 * (lockdown_casualties). The route judged is the one WordPress is 198 * serving — its parsed rest_route query var, which /wp-json/<route> and 199 * ?rest_route=<route> both fill — so plain permalinks behave exactly like 200 * pretty ones. 101 201 */ 102 202 public function filter_rest_authentication( $result ) { 103 if ( ! GUARDFORGE_Options::get( ' disable_rest_api' ) ) {203 if ( ! GUARDFORGE_Options::get( 'rest_lockdown' ) ) { 104 204 return $result; 105 205 } … … 118 218 119 219 private function current_rest_route_is_allowlisted() { 120 $route = ''; 121 if ( function_exists( 'rest_get_url_prefix' ) ) { 122 $prefix = rest_get_url_prefix(); 123 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only searched for the REST prefix and compared with the allowlist, never stored or printed; sanitising would change the route being judged. 124 $path = wp_unslash( $_SERVER['REQUEST_URI'] ?? '' ); 125 $needle = '/' . trim( $prefix, '/' ) . '/'; 126 $pos = strpos( $path, $needle ); 127 if ( $pos !== false ) { 128 $route = ltrim( substr( $path, $pos + strlen( $needle ) ), '/' ); 129 $qpos = strpos( $route, '?' ); 130 if ( $qpos !== false ) { 131 $route = substr( $route, 0, $qpos ); 132 } 133 } 134 } 220 $route = self::current_rest_route(); 135 221 if ( $route === '' ) { 136 222 return false; … … 146 232 $allowlist = apply_filters( 'guardforge/rest_allowlist', $allowlist, $route ); 147 233 148 foreach ( $allowlist as $needle ) { 149 if ( $needle === '' ) { 234 return self::route_is_allowlisted( $route, (array) $allowlist ); 235 } 236 237 /** 238 * The REST route of the current request, normalised (see normalise_route). 239 */ 240 private static function current_rest_route() { 241 global $wp; 242 if ( isset( $wp ) && is_object( $wp ) && isset( $wp->query_vars['rest_route'] ) && is_string( $wp->query_vars['rest_route'] ) ) { 243 return self::normalise_route( $wp->query_vars['rest_route'] ); 244 } 245 // Before WordPress has parsed the request: read it the way 246 // WP::parse_request will — the query var first, then the path. 247 // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- an anonymous REST request names its route here; it is only compared with the allowlist, never stored or printed. 248 if ( isset( $_GET['rest_route'] ) && is_string( $_GET['rest_route'] ) ) { 249 // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- same read-only comparison. 250 return self::normalise_route( wp_unslash( $_GET['rest_route'] ) ); 251 } 252 if ( ! function_exists( 'rest_get_url_prefix' ) ) { 253 return ''; 254 } 255 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only searched for the REST prefix and compared with the allowlist, never stored or printed; sanitising would change the route being judged. 256 $path = (string) wp_unslash( $_SERVER['REQUEST_URI'] ?? '' ); 257 $qpos = strpos( $path, '?' ); 258 if ( $qpos !== false ) { 259 $path = substr( $path, 0, $qpos ); 260 } 261 $needle = '/' . trim( rest_get_url_prefix(), '/' ) . '/'; 262 $pos = strpos( $path, $needle ); 263 if ( $pos === false ) { 264 return ''; 265 } 266 return self::normalise_route( substr( $path, $pos + strlen( $needle ) ) ); 267 } 268 269 /** 270 * Lower case, single slashes, no slash at either end: "wc/store/v1/cart". 271 * Core matches routes case-insensitively, so the allowlist does too. 272 */ 273 public static function normalise_route( $route ) { 274 $route = strtolower( (string) $route ); 275 $route = (string) preg_replace( '#/+#', '/', $route ); 276 return trim( $route, '/' ); 277 } 278 279 /** 280 * Whether a route falls under one of the allowlist lines. A line covers 281 * the route it names and everything below it, on whole segments: 282 * "formforge/v1" covers "formforge/v1/forms/3/submit" but not 283 * "formforge/v10", and "flowforge/v1/webhook" does not open the canvas. 284 * 285 * @param string $route 286 * @param string $allowlist 287 */ 288 public static function route_is_allowlisted( $route, array $allowlist ) { 289 $route = self::normalise_route( $route ); 290 if ( $route === '' ) { 291 return false; 292 } 293 foreach ( $allowlist as $line ) { 294 $line = self::normalise_route( $line ); 295 if ( $line === '' ) { 150 296 continue; 151 297 } 152 if ( strpos( $route, $needle) === 0 ) {298 if ( $route === $line || strpos( $route, $line . '/' ) === 0 ) { 153 299 return true; 154 300 } 301 } 302 return false; 303 } 304 305 /** 306 * What the full lockdown stops for visitors on this site: the public 307 * REST endpoints of active plugins (and core's oEmbed) that the given 308 * allowlist does not cover. For the settings screen. 309 * 310 * @param string $allowlist 311 * @param callable|null $is_active fn( string $slug ): bool — for tests. 312 * @return array<int,array{label:string,namespace:string}> 313 */ 314 public static function lockdown_casualties( array $allowlist, $is_active = null ) { 315 if ( ! is_callable( $is_active ) ) { 316 $is_active = [ __CLASS__, 'plugin_is_active' ]; 317 } 318 $known = [ 319 [ 'slug' => 'core-oembed', 'namespace' => 'oembed/1.0', 'label' => __( 'Embeds of your posts on other sites', 'guardforge' ) ], 320 [ 'slug' => 'woocommerce', 'namespace' => 'wc/store', 'label' => __( 'WooCommerce block cart and checkout (guest orders)', 'guardforge' ) ], 321 [ 'slug' => 'contact-form-7', 'namespace' => 'contact-form-7/v1', 'label' => __( 'Contact Form 7 form submissions', 'guardforge' ) ], 322 [ 'slug' => 'jetpack', 'namespace' => 'jetpack/v4', 'label' => __( 'Jetpack connection to WordPress.com', 'guardforge' ) ], 323 [ 'slug' => 'formforge', 'namespace' => 'formforge/v1', 'label' => __( 'Form Forge form submissions', 'guardforge' ) ], 324 [ 'slug' => 'flowforge', 'namespace' => 'flowforge/v1/webhook', 'label' => __( 'Cascade Forge webhooks from other services', 'guardforge' ) ], 325 [ 'slug' => 'inclusiveforge', 'namespace' => 'inclusiveforge/v1/scan-completed', 'label' => __( 'Inclusive Forge scan results', 'guardforge' ) ], 326 ]; 327 $out = []; 328 foreach ( $known as $row ) { 329 if ( $row['slug'] !== 'core-oembed' && ! call_user_func( $is_active, $row['slug'] ) ) { 330 continue; 331 } 332 if ( self::route_is_allowlisted( $row['namespace'], $allowlist ) ) { 333 continue; 334 } 335 $out[] = [ 'label' => $row['label'], 'namespace' => $row['namespace'] ]; 336 } 337 return $out; 338 } 339 340 /** 341 * Whether a plugin with a public REST endpoint is running, by the class 342 * or constant it defines once loaded. 343 */ 344 public static function plugin_is_active( $slug ) { 345 switch ( $slug ) { 346 case 'woocommerce': 347 return class_exists( 'WooCommerce' ); 348 case 'contact-form-7': 349 return defined( 'WPCF7_VERSION' ); 350 case 'jetpack': 351 return defined( 'JETPACK__VERSION' ); 352 case 'formforge': 353 return defined( 'FORMFORGE_VERSION' ); 354 case 'flowforge': 355 return defined( 'FLOWFORGE_VERSION' ); 356 case 'inclusiveforge': 357 return defined( 'INCLUSIVEFORGE_VERSION' ); 155 358 } 156 359 return false; … … 221 424 unset( $endpoints['/wp/v2/users/(?P<id>[\d]+)'] ); 222 425 return $endpoints; 426 } 427 428 /** 429 * An oEmbed answer names the author and links their archive, whose slug 430 * is usually the login. 431 */ 432 public function filter_oembed_author( $data ) { 433 if ( ! GUARDFORGE_Options::get( 'disable_user_enumeration' ) || ! is_array( $data ) ) { 434 return $data; 435 } 436 unset( $data['author_name'], $data['author_url'] ); 437 return $data; 438 } 439 440 /** 441 * The users sitemap (wp-sitemap-users-1.xml) is a list of every author 442 * archive — every author's slug in one file. 443 */ 444 public function filter_sitemap_provider( $provider, $name ) { 445 if ( $name === 'users' && GUARDFORGE_Options::get( 'disable_user_enumeration' ) ) { 446 return false; 447 } 448 return $provider; 223 449 } 224 450 … … 307 533 return $user; 308 534 } 535 // The field is drawn on the login_form action, which only wp-login.php 536 // fires, so that is where it is checked — plus any form that posted the 537 // field back because it drew it too. Every other sign-in (the shop's 538 // My Account form, a membership plugin's form, an application password 539 // over REST, wp_signon called by another plugin) never showed the 540 // field and used to fail every time. 541 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- only asks whether the field was posted; nothing is read or stored. 542 $field_posted = isset( $_POST['guardforge_captcha_key'] ) || isset( $_POST['guardforge_captcha_answer'] ); 543 if ( ! did_action( 'login_init' ) && ! $field_posted ) { 544 return $user; 545 } 309 546 // wp-login.php posts no nonce, and cannot: this runs before anyone is 310 547 // logged in. The key names a ten-minute transient the same form -
guardforge/trunk/includes/class-options.php
r3735184 r3754541 19 19 20 20 /** 21 * The allowlist every site got before 1.6.4. A stored copy of exactly 22 * this is a default nobody chose, so the upgrade replaces it with the 23 * current one (migrate_rest_settings); an edited list is left alone. 24 */ 25 /** The one-time record of what the 1.6.4 REST migration chose (see migrate_rest_settings). */ 26 const REST_MIGRATION_OPTION = 'guardforge_rest_migration'; 27 28 const LEGACY_REST_ALLOWLIST = "oembed/1.0\nformforge/v1\nguardforge/v1"; 29 30 /** 21 31 * Schema. Each entry: ['type' => bool|int|string|email|textarea|csv, 'default' => mixed]. 22 32 * Used by `set` to sanitise, and by tests to enumerate. … … 26 36 // API & Protocols 27 37 'disable_xmlrpc' => [ 'type' => 'bool', 'default' => 1 ], 38 // Until 1.6.4 'disable_rest_api' refused every anonymous REST call 39 // outside the allowlist, on by default — and took the WooCommerce 40 // Store API (block cart and checkout), contact forms and inbound 41 // webhooks with it. The key keeps its name and its stored "on"; it 42 // now means the narrow protection (user records closed to anyone 43 // who is not staff, see GUARDFORGE_Hardening::guard_user_records). 44 // Closing the whole REST API to visitors is 'rest_lockdown', off 45 // until the owner asks for it, and only that switch reads the 46 // allowlist. The allowlist's default carries the public endpoints 47 // of our own plugins and the Store API: they hold nothing private, 48 // and closing them only breaks the site. 28 49 'disable_rest_api' => [ 'type' => 'bool', 'default' => 1 ], 29 'rest_allowlist' => [ 'type' => 'textarea', 'default' => "oembed/1.0\nformforge/v1\nguardforge/v1" ], 50 'rest_lockdown' => [ 'type' => 'bool', 'default' => 0 ], 51 'rest_allowlist' => [ 'type' => 'textarea', 'default' => "oembed/1.0\nguardforge/v1\nformforge/v1\nflowforge/v1/webhook\ninclusiveforge/v1/scan-completed\nwc/store" ], 30 52 'disable_rest_comments' => [ 'type' => 'bool', 'default' => 1 ], 31 53 'disable_embed' => [ 'type' => 'bool', 'default' => 0 ], … … 301 323 // from here read as "every secondary screen was switched off". 302 324 'main' => [ 303 'disable_xmlrpc', 'disable_rest_api', 'rest_ allowlist', 'disable_rest_comments',325 'disable_xmlrpc', 'disable_rest_api', 'rest_lockdown', 'rest_allowlist', 'disable_rest_comments', 304 326 'disable_embed', 'disable_pingback', 'hide_wp_version', 'disable_file_edit', 305 327 'disable_user_enumeration', 'security_headers', 'login_captcha_math', … … 362 384 363 385 /** 386 * 1.6.4 (GUARD-REST-01): the REST settings after the split into the 387 * narrow protection and the opt-in lockdown. 388 * 389 * Before 1.6.4 "disable_rest_api" closed the whole REST API to visitors 390 * outside an allowlist. It now means the narrow protection, and the old 391 * behaviour is 'rest_lockdown', off by default. What an update does with a 392 * site that had it on depends on what the owner did with the list: 393 * 394 * - the list is still the old default: nobody chose the full closure, it 395 * was the default, and it took the cart, forms and webhooks down. The 396 * site gets the narrow protection and the new default list; 397 * - the list is the owner's own: they wrote exceptions to a full closure 398 * and meant it. 'rest_lockdown' is switched on with their list, so the 399 * update does not loosen a site silently. 400 * 401 * A site that had the restriction off changes nothing. In both cases of a 402 * site that had it on, one notice (GUARDFORGE_Core::rest_migration_notice) 403 * says what was chosen and where to change it. 404 * 405 * The decision is taken once: the first run records it in 406 * REST_MIGRATION_OPTION, and every later run (the next database version) 407 * stops there, so an owner who turned the lockdown off, or saved a list of 408 * their own on the narrow protection, is never moved again. A fresh install 409 * ($upgrading false) has nothing to move and nothing to say. 410 * 411 * @param bool $upgrading False for a site with no recorded database version. 412 */ 413 public static function migrate_rest_settings( $upgrading = true ) { 414 if ( false !== get_option( self::REST_MIGRATION_OPTION, false ) ) { 415 return; 416 } 417 $mode = 'none'; 418 if ( $upgrading ) { 419 $stored = get_option( self::OPTION_KEY, [] ); 420 if ( ! is_array( $stored ) ) { 421 $stored = []; 422 } 423 // Never saved means the defaults of 1.6.3: the restriction on, the old list. 424 $was_on = ! array_key_exists( 'disable_rest_api', $stored ) || ! empty( $stored['disable_rest_api'] ); 425 $list = isset( $stored['rest_allowlist'] ) && is_string( $stored['rest_allowlist'] ) ? $stored['rest_allowlist'] : self::LEGACY_REST_ALLOWLIST; 426 $legacy = GUARDFORGE_Hardening::parse_lines( $list ) === GUARDFORGE_Hardening::parse_lines( self::LEGACY_REST_ALLOWLIST ); 427 if ( $legacy ) { 428 if ( isset( $stored['rest_allowlist'] ) ) { 429 $stored['rest_allowlist'] = self::defaults()['rest_allowlist']; 430 update_option( self::OPTION_KEY, $stored ); 431 } 432 $mode = $was_on ? 'narrow' : 'none'; 433 } elseif ( $was_on ) { 434 $stored['rest_lockdown'] = 1; 435 update_option( self::OPTION_KEY, $stored ); 436 $mode = 'lockdown'; 437 } 438 } 439 update_option( self::REST_MIGRATION_OPTION, [ 'mode' => $mode, 'notice' => $mode === 'none' ? 0 : 1 ], false ); 440 } 441 442 /** 443 * What the REST migration chose, for the notice: 'lockdown' or 'narrow' 444 * while it is open for somebody who can change the settings, null 445 * otherwise (nothing changed, dismissed, or not that person's to read). 446 * 447 * @return string|null 448 */ 449 public static function rest_migration_notice() { 450 $state = get_option( self::REST_MIGRATION_OPTION, false ); 451 if ( ! is_array( $state ) || empty( $state['notice'] ) || empty( $state['mode'] ) ) { 452 return null; 453 } 454 if ( ! in_array( $state['mode'], [ 'lockdown', 'narrow' ], true ) || ! current_user_can( 'manage_options' ) ) { 455 return null; 456 } 457 return $state['mode']; 458 } 459 460 /** Close the notice for good; the decision itself stays recorded. */ 461 public static function dismiss_rest_migration_notice() { 462 $state = get_option( self::REST_MIGRATION_OPTION, false ); 463 if ( ! is_array( $state ) ) { 464 return; 465 } 466 $state['notice'] = 0; 467 update_option( self::REST_MIGRATION_OPTION, $state, false ); 468 } 469 470 /** 364 471 * Reset to defaults — used by uninstall.php and tests. 365 472 */ -
guardforge/trunk/includes/class-schema-manager.php
r3731705 r3754541 22 22 self::run_dbdelta(); 23 23 self::stamp_enabled_since(); 24 // 1.6.4: the REST restriction split into a narrow default and an 25 // opt-in lockdown; see the method for what it writes and what not. 26 // No recorded version is a new install: nothing to move. 27 GUARDFORGE_Options::migrate_rest_settings( $current !== '' ); 24 28 update_option( self::VERSION_OPTION, GUARDFORGE_DB_VERSION, false ); 25 29 } -
guardforge/trunk/includes/class-two-factor.php
r3712655 r3754541 272 272 } 273 273 274 /** 275 * The code page. The redirects live here; what is decided lives in 276 * judge_challenge, which a test can call without the request ending. 277 */ 274 278 public function handle_verify_challenge() { 275 279 // The pending token stands in for a nonce here, and is the stronger of … … 280 284 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- see above. 281 285 $code = isset( $_POST['guardforge_2fa_code'] ) ? sanitize_text_field( wp_unslash( $_POST['guardforge_2fa_code'] ) ) : ''; 282 $pending = $token !== '' ? self::read_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ) : false; 283 if ( ! is_array( $pending ) ) { 286 287 $verdict = $this->judge_challenge( $token, $code ); 288 if ( $verdict['status'] === 'expired' ) { 284 289 wp_safe_redirect( wp_login_url() ); 285 290 exit; 286 291 } 287 if ( ! $this->verify_code( (int) $pending['user_id'], $code )) {292 if ( $verdict['status'] === 'wrong' ) { 288 293 $url = add_query_arg( [ 289 294 'action' => 'validate_2fa', … … 294 299 exit; 295 300 } 301 $pending = $verdict['pending']; 296 302 self::forget_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ); 297 303 wp_set_auth_cookie( (int) $pending['user_id'], ! empty( $pending['remember'] ) ); 298 304 wp_safe_redirect( admin_url() ); 299 305 exit; 306 } 307 308 /** 309 * Judge one try at the code page: 'expired' (no such pending login), 310 * 'wrong' or 'ok'. 311 * 312 * This page posts to admin-post.php, not wp-login.php, so neither of the 313 * two things that stop a password guesser ever saw it: core's failure hook 314 * (fired only when wp-login authenticates) and the lockout check on 315 * login_init. Someone holding a stolen password could therefore try 316 * six-digit codes for as long as the token lived. So the lockout is asked 317 * first, before the code is even looked at, and a wrong code is reported 318 * through the same failure hook a wrong password is — one counter, one 319 * threshold, one log, one alert. 320 * 321 * @return array{status:string,pending:?array} 322 */ 323 public function judge_challenge( $token, $code ) { 324 $pending = $token !== '' ? self::read_transient( self::PENDING_TRANSIENT, self::LEGACY_PENDING_TRANSIENT, $token ) : false; 325 if ( ! is_array( $pending ) ) { 326 return [ 'status' => 'expired', 'pending' => null ]; 327 } 328 if ( class_exists( 'GUARDFORGE_Bruteforce' ) ) { 329 // Ends the request with the lockout page when this address is out of tries. 330 GUARDFORGE_Bruteforce::instance()->maybe_block_login(); 331 } 332 if ( $this->verify_code( (int) $pending['user_id'], $code ) ) { 333 return [ 'status' => 'ok', 'pending' => $pending ]; 334 } 335 $account = get_userdata( (int) $pending['user_id'] ); 336 /** This action is documented in wp-includes/pluggable.php */ 337 do_action( 338 'wp_login_failed', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- core's own action, fired so every failed-login listener counts a wrong code. 339 $account && isset( $account->user_login ) ? (string) $account->user_login : '', 340 new WP_Error( 'gf_2fa_wrong', __( '<strong>Error:</strong> two-factor code is invalid.', 'guardforge' ) ) 341 ); 342 return [ 'status' => 'wrong', 'pending' => $pending ]; 300 343 } 301 344 -
guardforge/trunk/languages/guardforge.pot
r3752344 r3754541 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Guard Forge – Security, Login Protection, 2FA & Audit Log 1.6. 2\n"5 "Project-Id-Version: Guard Forge – Security, Login Protection, 2FA & Audit Log 1.6.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/guardforge\n" 7 "POT-Creation-Date: 2026-10-1 6T09:54:01+00:00\n"7 "POT-Creation-Date: 2026-10-19T10:40:39+00:00\n" 8 8 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 9 9 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 70 70 #: includes/class-audit-log.php:198 71 71 #: includes/class-case-actions.php:346 72 #: includes/class-core.php:115 72 73 #: includes/class-guard-report-export.php:109 73 74 #: includes/class-hardening-score-badge.php:457 74 #: includes/class-hardening-score.php:15 3375 #: includes/class-hardening-score.php:1511 75 76 #: includes/class-integrity.php:818 76 #: includes/class-two-factor.php:3 0677 #: includes/class-two-factor.php:3 2477 #: includes/class-two-factor.php:349 78 #: includes/class-two-factor.php:367 78 79 msgid "Access denied." 79 80 msgstr "" … … 90 91 91 92 #: admin/partials/audit-log.php:53 92 #: includes/class-core.php:1 3893 #: includes/class-core.php:184 93 94 msgid "Audit log" 94 95 msgstr "" … … 186 187 187 188 #: admin/partials/audit-log.php:161 188 #: admin/partials/unblock.php: 89189 #: admin/partials/unblock.php:96 189 190 msgid "IP" 190 191 msgstr "" … … 298 299 #: admin/partials/cases.php:76 299 300 #: admin/partials/cases.php:220 300 #: includes/class-core.php:1 37301 #: includes/class-core.php:183 301 302 msgid "Cases" 302 303 msgstr "" … … 764 765 765 766 #: admin/partials/hardening-score.php:50 766 #: includes/class-core.php:1 28767 #: includes/class-core.php:174 767 768 msgid "Hardening score" 768 769 msgstr "" … … 937 938 938 939 #: admin/partials/integrity.php:59 939 #: includes/class-core.php:1 31940 #: includes/class-core.php:177 940 941 msgid "File integrity" 941 942 msgstr "" … … 1262 1263 1263 1264 #: admin/partials/login-log.php:60 1264 #: includes/class-core.php:1 391265 #: includes/class-core.php:185 1265 1266 msgid "Login log" 1266 1267 msgstr "" … … 1308 1309 #: admin/partials/scanner.php:15 1309 1310 #: admin/partials/scanner.php:35 1310 #: includes/class-core.php:1 301311 #: includes/class-core.php:176 1311 1312 msgid "Malware scanner" 1312 1313 msgstr "" … … 1413 1414 1414 1415 #: admin/partials/settings.php:46 1415 #: includes/class-core.php:1 271416 #: includes/class-core.php:173 1416 1417 msgid "Settings" 1417 1418 msgstr "" … … 1501 1502 1502 1503 #: admin/partials/settings.php:190 1503 #: includes/class-core.php:1 321504 #: includes/class-core.php:178 1504 1505 msgid "Cloudflare" 1505 1506 msgstr "" … … 1601 1602 1602 1603 #: admin/partials/settings.php:476 1603 msgid " Restrict REST API to logged-in users"1604 msgid "Keep user records out of the REST API" 1604 1605 msgstr "" 1605 1606 1606 1607 #: admin/partials/settings.php:476 1607 msgid " Anonymous REST access is limited to the namespaces in the allowlist below."1608 msgid "Visitors and customers cannot list your users or read their records through the REST API, the usual way login names are collected. Checkout, forms and webhooks keep working." 1608 1609 msgstr "" 1609 1610 … … 1617 1618 1618 1619 #: admin/partials/settings.php:478 1620 msgid "Close the whole REST API to visitors who are not signed in" 1621 msgstr "" 1622 1623 #: admin/partials/settings.php:478 1624 msgid "Only the namespaces in the REST API allowlist stay open to them. Anything that talks to your site through the REST API without signing in stops working unless its namespace is on that list." 1625 msgstr "" 1626 1627 #: admin/partials/settings.php:484 1628 msgid "The REST API is closed to visitors who are not signed in." 1629 msgstr "" 1630 1631 #: admin/partials/settings.php:486 1632 msgid "Before you close the whole REST API: it breaks the WooCommerce block cart and checkout, contact forms, webhooks other services send to your site, and embeds of your posts on other sites, unless their namespaces are in the allowlist." 1633 msgstr "" 1634 1635 #: admin/partials/settings.php:492 1636 msgid "Not working for them on this site right now:" 1637 msgstr "" 1638 1639 #: admin/partials/settings.php:494 1640 msgid "On this site, these would stop working for visitors:" 1641 msgstr "" 1642 1643 #. translators: %s: a REST namespace such as wc/store 1644 #: admin/partials/settings.php:503 1645 #, php-format 1646 msgid "add %s to the allowlist to keep it" 1647 msgstr "" 1648 1649 #: admin/partials/settings.php:514 1619 1650 msgid "Disable oEmbed discovery" 1620 1651 msgstr "" 1621 1652 1622 #: admin/partials/settings.php: 4781653 #: admin/partials/settings.php:514 1623 1654 msgid "Removes /oembed information leaks." 1624 1655 msgstr "" 1625 1656 1626 #: admin/partials/settings.php: 4791657 #: admin/partials/settings.php:515 1627 1658 msgid "Disable self-pingbacks" 1628 1659 msgstr "" 1629 1660 1630 #: admin/partials/settings.php: 4791661 #: admin/partials/settings.php:515 1631 1662 msgid "Blocks pingbacks pointing at your own URLs." 1632 1663 msgstr "" 1633 1664 1634 #: admin/partials/settings.php: 4851665 #: admin/partials/settings.php:521 1635 1666 msgid "Hardening" 1636 1667 msgstr "" 1637 1668 1638 #: admin/partials/settings.php: 4881669 #: admin/partials/settings.php:524 1639 1670 msgid "Hide WordPress version" 1640 1671 msgstr "" 1641 1672 1642 #: admin/partials/settings.php: 4881673 #: admin/partials/settings.php:524 1643 1674 msgid "Removes the generator meta and ver=… query strings." 1644 1675 msgstr "" 1645 1676 1646 #: admin/partials/settings.php: 4891677 #: admin/partials/settings.php:525 1647 1678 msgid "Disable theme/plugin file editor" 1648 1679 msgstr "" 1649 1680 1650 #: admin/partials/settings.php: 4891681 #: admin/partials/settings.php:525 1651 1682 msgid "Defines DISALLOW_FILE_EDIT so PHP can't be edited from the admin." 1652 1683 msgstr "" 1653 1684 1654 #: admin/partials/settings.php: 4901685 #: admin/partials/settings.php:526 1655 1686 msgid "Block user enumeration" 1656 1687 msgstr "" 1657 1688 1658 #: admin/partials/settings.php: 4901689 #: admin/partials/settings.php:526 1659 1690 msgid "Redirects ?author=N and hides anonymous /wp/v2/users." 1660 1691 msgstr "" 1661 1692 1662 #: admin/partials/settings.php: 4911693 #: admin/partials/settings.php:527 1663 1694 msgid "Send security HTTP headers" 1664 1695 msgstr "" 1665 1696 1666 #: admin/partials/settings.php: 4911697 #: admin/partials/settings.php:527 1667 1698 msgid "Referrer-Policy, X-Content-Type-Options, X-Frame-Options, Permissions-Policy." 1668 1699 msgstr "" 1669 1700 1670 #: admin/partials/settings.php: 4921701 #: admin/partials/settings.php:528 1671 1702 msgid "Math captcha on login" 1672 1703 msgstr "" 1673 1704 1674 #: admin/partials/settings.php: 4921675 msgid "Adds an a + b = ? challenge to the login form."1676 msgstr "" 1677 1678 #: admin/partials/settings.php: 4981705 #: admin/partials/settings.php:528 1706 msgid "Adds an a + b = ? challenge to the WordPress login page. Sign-in forms of shops and membership plugins are not affected, so customers can still log in." 1707 msgstr "" 1708 1709 #: admin/partials/settings.php:534 1679 1710 msgid "Files & Directories" 1680 1711 msgstr "" 1681 1712 1682 #: admin/partials/settings.php:5 011713 #: admin/partials/settings.php:537 1683 1714 msgid "Protect sensitive files" 1684 1715 msgstr "" 1685 1716 1686 #: admin/partials/settings.php:5 011717 #: admin/partials/settings.php:537 1687 1718 msgid "Denies direct access to wp-config.php, .htaccess, readme.html, license.txt via .htaccess." 1688 1719 msgstr "" 1689 1720 1690 #: admin/partials/settings.php:5 021721 #: admin/partials/settings.php:538 1691 1722 msgid "Disable directory listing" 1692 1723 msgstr "" 1693 1724 1694 #: admin/partials/settings.php:5 021725 #: admin/partials/settings.php:538 1695 1726 msgid "Options -Indexes — folders no longer show their contents." 1696 1727 msgstr "" 1697 1728 1698 #: admin/partials/settings.php:5 081729 #: admin/partials/settings.php:544 1699 1730 msgid "Spam & Bots" 1700 1731 msgstr "" 1701 1732 1702 #: admin/partials/settings.php:5 111733 #: admin/partials/settings.php:547 1703 1734 msgid "Comment-form honeypot" 1704 1735 msgstr "" 1705 1736 1706 #: admin/partials/settings.php:5 111737 #: admin/partials/settings.php:547 1707 1738 msgid "Adds a hidden field bots tend to fill — humans don't." 1708 1739 msgstr "" 1709 1740 1710 #: admin/partials/settings.php:5 121741 #: admin/partials/settings.php:548 1711 1742 msgid "Block malicious bot User-Agents" 1712 1743 msgstr "" 1713 1744 1714 #: admin/partials/settings.php:5 121745 #: admin/partials/settings.php:548 1715 1746 msgid "Blocks sqlmap, nikto, masscan, wpscan, nessus and similar scanners." 1716 1747 msgstr "" 1717 1748 1718 #: admin/partials/settings.php:5 181749 #: admin/partials/settings.php:554 1719 1750 msgid "Staging / development mode" 1720 1751 msgstr "" 1721 1752 1722 #: admin/partials/settings.php:5 331753 #: admin/partials/settings.php:569 1723 1754 msgid "Right now: staging mode is ON." 1724 1755 msgstr "" 1725 1756 1726 #: admin/partials/settings.php:5 341757 #: admin/partials/settings.php:570 1727 1758 msgid "Right now: staging mode is off and every protection is enforced." 1728 1759 msgstr "" 1729 1760 1730 #: admin/partials/settings.php:5 381761 #: admin/partials/settings.php:574 1731 1762 msgid "The address matched against your list:" 1732 1763 msgstr "" 1733 1764 1734 #: admin/partials/settings.php:5 441765 #: admin/partials/settings.php:580 1735 1766 msgid "Staging host names" 1736 1767 msgstr "" 1737 1768 1738 #: admin/partials/settings.php:5 461769 #: admin/partials/settings.php:582 1739 1770 msgid "One host name per line, matched against the address this site is actually served on. A leading dot matches every subdomain of that name but never the name itself, so \".example.com\" covers dev.example.com and leaves example.com alone. Nothing else is a pattern. Because the match is against the live address, copying this database onto your production site stops it matching the moment the domain changes." 1740 1771 msgstr "" 1741 1772 1742 #: admin/partials/settings.php:5 511773 #: admin/partials/settings.php:587 1743 1774 msgid "Always treat this site as production" 1744 1775 msgstr "" 1745 1776 1746 #: admin/partials/settings.php:5 521777 #: admin/partials/settings.php:588 1747 1778 msgid "Overrules everything above and every signal below it. Use this when a real site is being mistaken for a copy — it can only ever make GuardForge more protective, never less, which is why it is safe to keep in the database." 1748 1779 msgstr "" 1749 1780 1750 #: admin/partials/settings.php:5 571781 #: admin/partials/settings.php:593 1751 1782 msgid "While staging mode is on, GuardForge holds back:" 1752 1783 msgstr "" 1753 1784 1754 #: admin/partials/settings.php:5 591785 #: admin/partials/settings.php:595 1755 1786 msgid "Brute-force lockouts — attempts are still counted and written to the login log as \"soft_locked\", but nobody is shut out." 1756 1787 msgstr "" 1757 1788 1758 #: admin/partials/settings.php:5 601789 #: admin/partials/settings.php:596 1759 1790 msgid "Every notification e-mail: lockouts, new administrators and file-integrity changes." 1760 1791 msgstr "" 1761 1792 1762 #: admin/partials/settings.php: 5691793 #: admin/partials/settings.php:605 1763 1794 msgid "Telegram, Slack and webhook alerts." 1764 1795 msgstr "" 1765 1796 1766 #: admin/partials/settings.php: 5721797 #: admin/partials/settings.php:608 1767 1798 msgid "Cloudflare firewall rules — a copy shares the live zone and token, so a block pushed from here would land in front of your real site." 1768 1799 msgstr "" 1769 1800 1770 #: admin/partials/settings.php: 5751801 #: admin/partials/settings.php:611 1771 1802 msgid "Auto-lockdown — a spike in lockouts or a malware finding on a copy does not shut the site down." 1772 1803 msgstr "" 1773 1804 1774 #: admin/partials/settings.php: 5781805 #: admin/partials/settings.php:614 1775 1806 msgid "AI threat analysis, so a forgotten copy cannot spend your credits." 1776 1807 msgstr "" 1777 1808 1778 #: admin/partials/settings.php: 5811809 #: admin/partials/settings.php:617 1779 1810 msgid "To switch staging mode on by hand, add define( 'GUARDFORGE_STAGING_MODE', true ); to wp-config.php. Setting it to false pins the site to production. It lives in wp-config.php rather than in a setting on purpose: a database copied from staging onto your live site must never be able to carry the switch that turns your security off." 1780 1811 msgstr "" 1781 1812 1782 #: admin/partials/settings.php: 5871813 #: admin/partials/settings.php:623 1783 1814 msgid "Brute-force protection" 1784 1815 msgstr "" 1785 1816 1786 #: admin/partials/settings.php: 5901817 #: admin/partials/settings.php:626 1787 1818 msgid "Enable brute-force protection" 1788 1819 msgstr "" 1789 1820 1790 #: admin/partials/settings.php: 5901821 #: admin/partials/settings.php:626 1791 1822 msgid "Locks IPs that exceed the failed-attempt threshold." 1792 1823 msgstr "" 1793 1824 1794 #: admin/partials/settings.php: 5911825 #: admin/partials/settings.php:627 1795 1826 msgid "Record login attempts" 1796 1827 msgstr "" 1797 1828 1798 #: admin/partials/settings.php: 5911829 #: admin/partials/settings.php:627 1799 1830 msgid "Stores every login attempt in the database." 1800 1831 msgstr "" 1801 1832 1802 #: admin/partials/settings.php: 5921833 #: admin/partials/settings.php:628 1803 1834 msgid "Email on lockout" 1804 1835 msgstr "" 1805 1836 1806 #: admin/partials/settings.php: 5921837 #: admin/partials/settings.php:628 1807 1838 msgid "Send an email whenever an IP is locked out." 1808 1839 msgstr "" 1809 1840 1810 #: admin/partials/settings.php: 5981841 #: admin/partials/settings.php:634 1811 1842 msgid "Integrity monitoring" 1812 1843 msgstr "" 1813 1844 1814 #: admin/partials/settings.php:6 031845 #: admin/partials/settings.php:639 1815 1846 msgid "Monitor core file integrity" 1816 1847 msgstr "" 1817 1848 1818 #: admin/partials/settings.php:6 061849 #: admin/partials/settings.php:642 1819 1850 msgid "Off by default. When on, this site asks api.wordpress.org once a day for the official checksums of your WordPress version and compares wp-admin and wp-includes against them. The request carries the version and the locale, nothing about your site. \"Run scan now\" on the File integrity screen runs one scan without putting anything on a schedule." 1820 1851 msgstr "" 1821 1852 1822 #: admin/partials/settings.php:6 081853 #: admin/partials/settings.php:644 1823 1854 msgid "Email on integrity changes" 1824 1855 msgstr "" 1825 1856 1826 #: admin/partials/settings.php:6 081857 #: admin/partials/settings.php:644 1827 1858 msgid "Alerts you when modified or removed files are detected." 1828 1859 msgstr "" 1829 1860 1830 #: admin/partials/settings.php:6 091861 #: admin/partials/settings.php:645 1831 1862 msgid "Also monitor plugins & themes" 1832 1863 msgstr "" 1833 1864 1834 #: admin/partials/settings.php:6 091865 #: admin/partials/settings.php:645 1835 1866 msgid "Extends the scan to wp-content/plugins and wp-content/themes." 1836 1867 msgstr "" 1837 1868 1838 #: admin/partials/settings.php:6 131869 #: admin/partials/settings.php:649 1839 1870 msgid "Last scan:" 1840 1871 msgstr "" 1841 1872 1842 #: admin/partials/settings.php:6 381873 #: admin/partials/settings.php:674 1843 1874 msgid "Action audit" 1844 1875 msgstr "" 1845 1876 1846 #: admin/partials/settings.php:6 411877 #: admin/partials/settings.php:677 1847 1878 msgid "Log admin actions" 1848 1879 msgstr "" 1849 1880 1850 #: admin/partials/settings.php:6 411881 #: admin/partials/settings.php:677 1851 1882 msgid "Records plugin/theme/post/option/user/role changes." 1852 1883 msgstr "" 1853 1884 1854 #: admin/partials/settings.php:6 421885 #: admin/partials/settings.php:678 1855 1886 msgid "Email on new administrator" 1856 1887 msgstr "" 1857 1888 1858 #: admin/partials/settings.php:6 421889 #: admin/partials/settings.php:678 1859 1890 msgid "Sends an alert whenever a user is promoted to administrator." 1860 1891 msgstr "" 1861 1892 1862 #: admin/partials/settings.php:6 481893 #: admin/partials/settings.php:684 1863 1894 msgid "Content Security Policy" 1864 1895 msgstr "" 1865 1896 1866 #: admin/partials/settings.php:6 511897 #: admin/partials/settings.php:687 1867 1898 msgid "Send Content-Security-Policy header" 1868 1899 msgstr "" 1869 1900 1870 #: admin/partials/settings.php:6 511901 #: admin/partials/settings.php:687 1871 1902 msgid "Controls where scripts and styles may load from. Excellent XSS hardening when tuned." 1872 1903 msgstr "" 1873 1904 1874 #: admin/partials/settings.php:6 521905 #: admin/partials/settings.php:688 1875 1906 msgid "Send as report-only (recommended first)" 1876 1907 msgstr "" 1877 1908 1878 #: admin/partials/settings.php:6 521909 #: admin/partials/settings.php:688 1879 1910 msgid "Reports violations without blocking — flip off once your policy is tuned." 1880 1911 msgstr "" 1881 1912 1882 #: admin/partials/settings.php:6 551913 #: admin/partials/settings.php:691 1883 1914 msgid "CSP policy" 1884 1915 msgstr "" 1885 1916 1886 #: admin/partials/settings.php:6 571917 #: admin/partials/settings.php:693 1887 1918 msgid "Value of the Content-Security-Policy header. Test thoroughly — aggressive policies can break plugins." 1888 1919 msgstr "" 1889 1920 1890 #: admin/partials/settings.php:6 631921 #: admin/partials/settings.php:699 1891 1922 msgid "Brute-force & notification parameters" 1892 1923 msgstr "" 1893 1924 1894 #: admin/partials/settings.php: 6661925 #: admin/partials/settings.php:702 1895 1926 msgid "Max attempts" 1896 1927 msgstr "" 1897 1928 1898 #: admin/partials/settings.php: 6681929 #: admin/partials/settings.php:704 1899 1930 msgid "Failed attempts before the IP is locked." 1900 1931 msgstr "" 1901 1932 1902 #: admin/partials/settings.php: 6711933 #: admin/partials/settings.php:707 1903 1934 msgid "Lockout duration (minutes)" 1904 1935 msgstr "" 1905 1936 1906 #: admin/partials/settings.php: 6731937 #: admin/partials/settings.php:709 1907 1938 msgid "How long an IP stays locked." 1908 1939 msgstr "" 1909 1940 1910 #: admin/partials/settings.php: 6761941 #: admin/partials/settings.php:712 1911 1942 msgid "Login log retention (days)" 1912 1943 msgstr "" 1913 1944 1914 #: admin/partials/settings.php: 6781945 #: admin/partials/settings.php:714 1915 1946 msgid "Older login-log rows are pruned." 1916 1947 msgstr "" 1917 1948 1918 #: admin/partials/settings.php: 6811949 #: admin/partials/settings.php:717 1919 1950 msgid "Audit log retention (days)" 1920 1951 msgstr "" 1921 1952 1922 #: admin/partials/settings.php: 6831953 #: admin/partials/settings.php:719 1923 1954 msgid "Older audit rows are pruned." 1924 1955 msgstr "" 1925 1956 1926 #: admin/partials/settings.php: 6861957 #: admin/partials/settings.php:722 1927 1958 msgid "Notification email" 1928 1959 msgstr "" 1929 1960 1930 #: admin/partials/settings.php: 6881961 #: admin/partials/settings.php:724 1931 1962 msgid "Falls back to the site administrator email." 1932 1963 msgstr "" 1933 1964 1934 #: admin/partials/settings.php: 6911965 #: admin/partials/settings.php:727 1935 1966 msgid "IP whitelist" 1936 1967 msgstr "" 1937 1968 1938 #: admin/partials/settings.php: 6931969 #: admin/partials/settings.php:729 1939 1970 msgid "One IP or CIDR per line — never blocked." 1940 1971 msgstr "" 1941 1972 1942 #: admin/partials/settings.php: 6961973 #: admin/partials/settings.php:732 1943 1974 msgid "Trusted proxy CIDRs" 1944 1975 msgstr "" 1945 1976 1946 #: admin/partials/settings.php: 6981977 #: admin/partials/settings.php:734 1947 1978 msgid "Forwarded-IP headers are only trusted when REMOTE_ADDR matches one of these ranges. Leave empty if you do not run behind a proxy." 1948 1979 msgstr "" 1949 1980 1950 #: admin/partials/settings.php:7 011981 #: admin/partials/settings.php:737 1951 1982 msgid "REST API allowlist" 1952 1983 msgstr "" 1953 1984 1954 #: admin/partials/settings.php:7 031955 msgid " One namespace prefix per line. Routes whose namespace starts with one of these remain accessible to anonymous callers (oembed, formforge submissions, etc.)."1956 msgstr "" 1957 1958 #: admin/partials/settings.php:7 061985 #: admin/partials/settings.php:739 1986 msgid "Used only when the whole REST API is closed to visitors. One route per line; it stays open together with everything under it. The defaults keep embeds, WooCommerce checkout and the public endpoints of Avakode plugins working." 1987 msgstr "" 1988 1989 #: admin/partials/settings.php:742 1959 1990 msgid "Extra User-Agent blocklist" 1960 1991 msgstr "" 1961 1992 1962 #: admin/partials/settings.php:7 081993 #: admin/partials/settings.php:744 1963 1994 msgid "One substring per line. Case-insensitive contains match." 1964 1995 msgstr "" 1965 1996 1966 #: admin/partials/settings.php:7 141997 #: admin/partials/settings.php:750 1967 1998 msgid "When GuardForge is deleted" 1968 1999 msgstr "" 1969 2000 1970 #: admin/partials/settings.php:7 182001 #: admin/partials/settings.php:754 1971 2002 msgid "Delete GuardForge data on uninstall" 1972 2003 msgstr "" 1973 2004 1974 #: admin/partials/settings.php:7 192005 #: admin/partials/settings.php:755 1975 2006 msgid "Off by default: deleting the plugin leaves your login log, integrity snapshots and audit trail in place, so an accidental removal does not take your history with it. Two-factor enrolments are the exception and are always removed — they are shared secrets, and a database that outlives the plugin should not keep them." 1976 2007 msgstr "" 1977 2008 1978 #: admin/partials/settings.php:7 282009 #: admin/partials/settings.php:764 1979 2010 msgid "Save settings" 1980 2011 msgstr "" … … 2079 2110 2080 2111 #. translators: %s is the IP address that was unblocked. 2081 #: admin/partials/unblock.php:1 52112 #: admin/partials/unblock.php:17 2082 2113 #, php-format 2083 2114 msgid "IP %s unblocked." 2084 2115 msgstr "" 2085 2116 2086 #: admin/partials/unblock.php:41 2087 #: includes/class-core.php:140 2117 #: admin/partials/unblock.php:19 2118 msgid "Lockout lifted." 2119 msgstr "" 2120 2121 #: admin/partials/unblock.php:21 2122 msgid "That is not an IP address, so nothing was unblocked." 2123 msgstr "" 2124 2125 #: admin/partials/unblock.php:48 2126 #: includes/class-core.php:186 2088 2127 msgid "Unblock IP" 2089 2128 msgstr "" 2090 2129 2091 #: admin/partials/unblock.php:4 12130 #: admin/partials/unblock.php:48 2092 2131 msgid "Lift brute-force lockouts" 2093 2132 msgstr "" 2094 2133 2095 #: admin/partials/unblock.php: 442134 #: admin/partials/unblock.php:51 2096 2135 msgid "Manual unblock" 2097 2136 msgstr "" 2098 2137 2099 #: admin/partials/unblock.php: 482138 #: admin/partials/unblock.php:55 2100 2139 msgid "Enter IP address" 2101 2140 msgstr "" 2102 2141 2103 #: admin/partials/unblock.php: 492104 #: admin/partials/unblock.php: 752105 #: admin/partials/unblock.php:10 02106 #: includes/class-core.php: 1872142 #: admin/partials/unblock.php:56 2143 #: admin/partials/unblock.php:82 2144 #: admin/partials/unblock.php:107 2145 #: includes/class-core.php:233 2107 2146 msgid "Unblock" 2108 2147 msgstr "" 2109 2148 2110 2149 #. translators: %d is the number of active IP lockouts. 2111 #: admin/partials/unblock.php: 572150 #: admin/partials/unblock.php:64 2112 2151 #, php-format 2113 2152 msgid "Active lockouts (%d)" 2114 2153 msgstr "" 2115 2154 2116 #: admin/partials/unblock.php:6 02155 #: admin/partials/unblock.php:67 2117 2156 msgid "No active lockouts." 2118 2157 msgstr "" 2119 2158 2120 #: admin/partials/unblock.php: 632159 #: admin/partials/unblock.php:70 2121 2160 msgid "Transient key" 2122 2161 msgstr "" 2123 2162 2124 #: admin/partials/unblock.php: 632163 #: admin/partials/unblock.php:70 2125 2164 msgid "Attempts" 2126 2165 msgstr "" 2127 2166 2128 #: admin/partials/unblock.php: 632129 #: admin/partials/unblock.php: 892167 #: admin/partials/unblock.php:70 2168 #: admin/partials/unblock.php:96 2130 2169 msgid "Action" 2131 2170 msgstr "" 2132 2171 2133 #: admin/partials/unblock.php: 872172 #: admin/partials/unblock.php:94 2134 2173 msgid "IPs from lockout log" 2135 2174 msgstr "" 2136 2175 2137 #: admin/partials/unblock.php: 892176 #: admin/partials/unblock.php:96 2138 2177 msgid "Times locked" 2139 2178 msgstr "" 2140 2179 2141 #: admin/partials/unblock.php: 892180 #: admin/partials/unblock.php:96 2142 2181 msgid "Last time" 2143 2182 msgstr "" … … 2158 2197 2159 2198 #: admin/partials/vuln-db.php:105 2160 #: includes/class-core.php:1 292199 #: includes/class-core.php:175 2161 2200 msgid "Vulnerabilities" 2162 2201 msgstr "" … … 2217 2256 2218 2257 #: admin/partials/vuln-db.php:167 2258 #: includes/class-core.php:109 2219 2259 msgid "Open Settings" 2220 2260 msgstr "" … … 2301 2341 2302 2342 #. translators: %d is the lockout window in minutes. 2303 #: includes/class-bruteforce.php:57 2343 #: includes/class-bruteforce.php:72 2344 #: includes/class-bruteforce.php:106 2304 2345 #, php-format 2305 2346 msgid "Too many failed attempts. Try again in %d minutes." 2306 2347 msgstr "" 2307 2348 2308 #: includes/class-bruteforce.php: 602349 #: includes/class-bruteforce.php:75 2309 2350 msgid "Access temporarily blocked" 2310 2351 msgstr "" 2311 2352 2312 #: includes/class-bruteforce.php: 2502353 #: includes/class-bruteforce.php:409 2313 2354 msgid "GuardForge — IP locked out" 2314 2355 msgstr "" 2315 2356 2316 2357 #. translators: 1: IP, 2: username, 3: timestamp. 2317 #: includes/class-bruteforce.php: 2542358 #: includes/class-bruteforce.php:413 2318 2359 #, php-format 2319 2360 msgid "" … … 2342 2383 2343 2384 #. translators: 1: installed Pro version, 2: required Pro version 2344 #: includes/class-core.php:6 52385 #: includes/class-core.php:67 2345 2386 #, php-format 2346 2387 msgid "GuardForge Pro %1$s is too old for this version of GuardForge, so it is switched off rather than left running. Install GuardForge Pro %2$s or newer." 2347 2388 msgstr "" 2348 2389 2349 #: includes/class-core.php:7 12390 #: includes/class-core.php:73 2350 2391 msgid "Until then alerts to Telegram, Slack or a webhook, the Cloudflare firewall push, automatic lockdown, patch by update, the WAF, malware scanning, AI threat analysis, required 2FA and audit export are unavailable. Your logs, baselines and settings are kept." 2351 2392 msgstr "" 2352 2393 2353 #: includes/class-core.php:7 32394 #: includes/class-core.php:75 2354 2395 msgid "If Dashboard → Updates lists no update for it, download the add-on from your Avakode dashboard and upload it over this copy in Plugins → Add New Plugin → Upload Plugin." 2355 2396 msgstr "" 2356 2397 2357 #: includes/class-core.php:7 42398 #: includes/class-core.php:76 2358 2399 msgid "Open Downloads" 2359 2400 msgstr "" 2360 2401 2361 #: includes/class-core.php:102 2402 #: includes/class-core.php:101 2403 msgid "GuardForge still closes the REST API to visitors who are not signed in, as you had set it." 2404 msgstr "" 2405 2362 2406 #: includes/class-core.php:103 2407 msgid "Version 1.6.4 split the REST API protection in two. Because you had written your own list of exceptions, the switch that closes the whole REST API is now on, with your list. To keep only user records private instead, turn that switch off in Settings, under API & Protocols." 2408 msgstr "" 2409 2410 #: includes/class-core.php:105 2411 msgid "GuardForge now keeps only user records private in the REST API." 2412 msgstr "" 2413 2414 #: includes/class-core.php:107 2415 msgid "Version 1.6.4 split the REST API protection in two. The protection you had used the default list, which also shut out the WooCommerce cart and checkout, contact forms and webhooks, so it now closes user records to visitors and nothing else. To close the whole REST API to visitors who are not signed in, turn that switch on in Settings, under API & Protocols." 2416 msgstr "" 2417 2418 #: includes/class-core.php:110 2419 msgid "Dismiss" 2420 msgstr "" 2421 2422 #: includes/class-core.php:148 2423 #: includes/class-core.php:149 2363 2424 msgid "GuardForge" 2364 2425 msgstr "" 2365 2426 2366 #: includes/class-core.php:1 412427 #: includes/class-core.php:187 2367 2428 msgid "Lockdown" 2368 2429 msgstr "" 2369 2430 2370 #: includes/class-core.php:1 422431 #: includes/class-core.php:188 2371 2432 msgid "Geo-IP" 2372 2433 msgstr "" 2373 2434 2374 #: includes/class-core.php:1 432435 #: includes/class-core.php:189 2375 2436 msgid "2FA" 2376 2437 msgstr "" 2377 2438 2378 #: includes/class-core.php: 1852439 #: includes/class-core.php:231 2379 2440 msgid "Clear the log? This cannot be undone." 2380 2441 msgstr "" 2381 2442 2382 #: includes/class-core.php: 1862443 #: includes/class-core.php:232 2383 2444 msgid "Scanning…" 2384 2445 msgstr "" … … 2572 2633 msgstr "" 2573 2634 2635 #: includes/class-hardening-score.php:493 2636 msgid "The site is served over HTTPS" 2637 msgstr "" 2638 2639 #: includes/class-hardening-score.php:495 2640 msgid "Yes." 2641 msgstr "" 2642 2643 #: includes/class-hardening-score.php:495 2644 msgid "No — this site answers on plain HTTP." 2645 msgstr "" 2646 2574 2647 #: includes/class-hardening-score.php:496 2575 msgid "The site is served over HTTPS" 2576 msgstr "" 2577 2578 #: includes/class-hardening-score.php:498 2579 msgid "Yes." 2580 msgstr "" 2581 2582 #: includes/class-hardening-score.php:498 2583 msgid "No — this site answers on plain HTTP." 2648 msgid "Without TLS every password and every session cookie crosses the network readable, so anyone on the same path can take the session and replay it." 2584 2649 msgstr "" 2585 2650 2586 2651 #: includes/class-hardening-score.php:499 2587 msgid "Without TLS every password and every session cookie crosses the network readable, so anyone on the same path can take the session and replay it."2588 msgstr ""2589 2590 #: includes/class-hardening-score.php:5022591 2652 msgid "Install a certificate with your host, then set the WordPress and site addresses to https." 2592 2653 msgstr "" 2593 2654 2594 #: includes/class-hardening-score.php:5 102655 #: includes/class-hardening-score.php:507 2595 2656 msgid "Administrators using two-factor authentication" 2596 2657 msgstr "" 2597 2658 2598 2659 #. translators: %1$d is the number of enrolled administrators, %2$d the total. 2599 #: includes/class-hardening-score.php:51 52660 #: includes/class-hardening-score.php:512 2600 2661 #, php-format 2601 2662 msgid "%1$d of %2$d administrators are enrolled." 2602 2663 msgstr "" 2603 2664 2604 #: includes/class-hardening-score.php:51 92665 #: includes/class-hardening-score.php:516 2605 2666 msgid "This site has no administrator accounts." 2606 2667 msgstr "" 2607 2668 2669 #: includes/class-hardening-score.php:517 2670 msgid "A reused or phished administrator password is the shortest route to running code on the server; a second factor is what makes the password on its own worthless." 2671 msgstr "" 2672 2608 2673 #: includes/class-hardening-score.php:520 2609 msgid "A reused or phished administrator password is the shortest route to running code on the server; a second factor is what makes the password on its own worthless."2610 msgstr ""2611 2612 #: includes/class-hardening-score.php:5232613 2674 msgid "Enrol on the 2FA screen, and ask every other administrator to do the same." 2614 2675 msgstr "" 2615 2676 2677 #: includes/class-hardening-score.php:528 2678 msgid "WordPress has not checked for updates yet on this install." 2679 msgstr "" 2680 2616 2681 #: includes/class-hardening-score.php:531 2617 msgid "WordPress has not checked for updates yet on this install."2618 msgstr ""2619 2620 #: includes/class-hardening-score.php:5342621 2682 msgid "WordPress core is behind." 2622 2683 msgstr "" 2623 2684 2624 2685 #. translators: %d is the number of plugins and themes with an update waiting. 2625 #: includes/class-hardening-score.php:53 92686 #: includes/class-hardening-score.php:536 2626 2687 #, php-format 2627 2688 msgid "Core is current; %d plugin or theme updates are waiting." 2628 2689 msgstr "" 2629 2690 2630 #: includes/class-hardening-score.php:54 42691 #: includes/class-hardening-score.php:541 2631 2692 msgid "Nothing is waiting to be updated." 2632 2693 msgstr "" 2633 2694 2695 #: includes/class-hardening-score.php:546 2696 msgid "Core, plugins and themes are up to date" 2697 msgstr "" 2698 2634 2699 #: includes/class-hardening-score.php:549 2635 msgid " Core, plugins and themes are up to date"2700 msgid "Almost every mass compromise of a WordPress site starts with a version whose vulnerability was published, and patched, weeks earlier." 2636 2701 msgstr "" 2637 2702 2638 2703 #: includes/class-hardening-score.php:552 2639 msgid "Almost every mass compromise of a WordPress site starts with a version whose vulnerability was published, and patched, weeks earlier."2640 msgstr ""2641 2642 #: includes/class-hardening-score.php:5552643 2704 msgid "Apply the waiting updates, then turn on automatic updates for anything you do not review by hand." 2644 2705 msgstr "" 2645 2706 2707 #: includes/class-hardening-score.php:560 2708 msgid "PHP errors are not printed to visitors" 2709 msgstr "" 2710 2646 2711 #: includes/class-hardening-score.php:563 2647 msgid "PHP errors are not printed to visitors"2648 msgstr ""2649 2650 #: includes/class-hardening-score.php:5662651 2712 msgid "WP_DEBUG and WP_DEBUG_DISPLAY are both on." 2652 2713 msgstr "" 2653 2714 2654 #: includes/class-hardening-score.php:56 72715 #: includes/class-hardening-score.php:564 2655 2716 msgid "Errors are not displayed." 2656 2717 msgstr "" 2657 2718 2658 #: includes/class-hardening-score.php:56 82719 #: includes/class-hardening-score.php:565 2659 2720 msgid "A displayed PHP error prints absolute paths, database names and fragments of your queries into the page for whoever triggered it." 2660 2721 msgstr "" 2661 2722 2662 #: includes/class-hardening-score.php:57 32723 #: includes/class-hardening-score.php:570 2663 2724 msgid "Edit wp-config.php: set WP_DEBUG to false, or leave WP_DEBUG on and set WP_DEBUG_DISPLAY to false with WP_DEBUG_LOG on. No admin screen can change this." 2664 2725 msgstr "" 2665 2726 2727 #: includes/class-hardening-score.php:576 2728 msgid "XML-RPC is switched off" 2729 msgstr "" 2730 2731 #: includes/class-hardening-score.php:578 2732 #: includes/class-hardening-score.php:647 2733 #: includes/class-hardening-score.php:837 2734 #: includes/class-hardening-score.php:851 2735 msgid "Off." 2736 msgstr "" 2737 2738 #: includes/class-hardening-score.php:578 2739 msgid "On — xmlrpc.php answers anonymous callers." 2740 msgstr "" 2741 2666 2742 #: includes/class-hardening-score.php:579 2667 msgid "XML-RPC is switched off" 2668 msgstr "" 2669 2670 #: includes/class-hardening-score.php:581 2671 #: includes/class-hardening-score.php:650 2672 #: includes/class-hardening-score.php:859 2673 #: includes/class-hardening-score.php:873 2674 msgid "Off." 2675 msgstr "" 2676 2677 #: includes/class-hardening-score.php:581 2678 msgid "On — xmlrpc.php answers anonymous callers." 2743 msgid "One xmlrpc.php request can try hundreds of passwords through system.multicall, and the same endpoint answers pingback.ping for reflection attacks against other people." 2679 2744 msgstr "" 2680 2745 2681 2746 #: includes/class-hardening-score.php:582 2682 msgid "One xmlrpc.php request can try hundreds of passwords through system.multicall, and the same endpoint answers pingback.ping for reflection attacks against other people."2683 msgstr ""2684 2685 #: includes/class-hardening-score.php:5852686 2747 msgid "Turn on \"Disable XML-RPC\" under API & Protocols. Only turn it back on if you still publish from a desktop or mobile client that needs it." 2687 2748 msgstr "" 2688 2749 2689 #: includes/class-hardening-score.php:5 912750 #: includes/class-hardening-score.php:588 2690 2751 msgid "Off — failed logins are never counted." 2691 2752 msgstr "" 2692 2753 2693 2754 #. translators: %d is the configured number of failed attempts before lockout. 2694 #: includes/class-hardening-score.php:59 62755 #: includes/class-hardening-score.php:593 2695 2756 #, php-format 2696 2757 msgid "On, locking out after %d failed attempts." … … 2698 2759 2699 2760 #. translators: %d is the configured number of failed attempts before lockout. 2700 #: includes/class-hardening-score.php:60 32761 #: includes/class-hardening-score.php:600 2701 2762 #, php-format 2702 2763 msgid "On, but %d attempts is a generous budget for a guessing script." … … 2704 2765 2705 2766 #. translators: %d is the configured number of failed attempts before lockout. 2706 #: includes/class-hardening-score.php:6 102767 #: includes/class-hardening-score.php:607 2707 2768 #, php-format 2708 2769 msgid "On, but a threshold of %d will never trip in practice." 2709 2770 msgstr "" 2710 2771 2772 #: includes/class-hardening-score.php:614 2773 msgid "Brute-force protection locks out guessers" 2774 msgstr "" 2775 2711 2776 #: includes/class-hardening-score.php:617 2712 msgid " Brute-force protection locks out guessers"2777 msgid "Password spraying only stops when the attempts stop. A threshold set so high that it never trips is a log, not a defence." 2713 2778 msgstr "" 2714 2779 2715 2780 #: includes/class-hardening-score.php:620 2716 msgid "Password spraying only stops when the attempts stop. A threshold set so high that it never trips is a log, not a defence."2717 msgstr ""2718 2719 #: includes/class-hardening-score.php:6232720 2781 msgid "Turn on brute-force protection and set the maximum attempts to ten or fewer." 2721 2782 msgstr "" 2722 2783 2723 #: includes/class-hardening-score.php:62 72784 #: includes/class-hardening-score.php:624 2724 2785 msgid "Staging mode is on, so this copy writes the lockout down and lets the request through. The setting is right; nothing is being blocked here." 2725 2786 msgstr "" 2726 2787 2788 #: includes/class-hardening-score.php:631 2789 msgid "The built-in theme and plugin editor is off" 2790 msgstr "" 2791 2727 2792 #: includes/class-hardening-score.php:634 2728 msgid "The built-in theme and plugin editor is off"2729 msgstr ""2730 2731 #: includes/class-hardening-score.php:6372732 2793 msgid "DISALLOW_FILE_EDIT is in force." 2733 2794 msgstr "" 2734 2795 2735 #: includes/class-hardening-score.php:63 82796 #: includes/class-hardening-score.php:635 2736 2797 msgid "The editor is reachable — DISALLOW_FILE_EDIT is not in force on this request." 2737 2798 msgstr "" 2738 2799 2800 #: includes/class-hardening-score.php:636 2801 msgid "The theme editor turns one hijacked administrator session into arbitrary PHP on your server, with no upload and no file access needed." 2802 msgstr "" 2803 2739 2804 #: includes/class-hardening-score.php:639 2740 msgid "The theme editor turns one hijacked administrator session into arbitrary PHP on your server, with no upload and no file access needed."2741 msgstr ""2742 2743 #: includes/class-hardening-score.php:6422744 2805 msgid "Turn on \"Disable theme/plugin file editor\". If it is already on, something in wp-config.php defines DISALLOW_FILE_EDIT as false and wins — fix it there." 2745 2806 msgstr "" 2746 2807 2747 #: includes/class-hardening-score.php:6 522808 #: includes/class-hardening-score.php:649 2748 2809 msgid "On, but no baseline has ever been taken — there is nothing to compare against." 2749 2810 msgstr "" 2750 2811 2751 2812 #. translators: %d is the number of files found that wordpress.org does not list. 2752 #: includes/class-hardening-score.php:65 62813 #: includes/class-hardening-score.php:653 2753 2814 #, php-format 2754 2815 msgid "The last scan found %d file that is not in the official build." … … 2757 2818 msgstr[1] "" 2758 2819 2759 #: includes/class-hardening-score.php:66 52820 #: includes/class-hardening-score.php:662 2760 2821 msgid "A baseline exists, but the last scan is more than a week old." 2761 2822 msgstr "" 2762 2823 2763 #: includes/class-hardening-score.php:66 72824 #: includes/class-hardening-score.php:664 2764 2825 msgid "A baseline exists and the last scan is recent." 2765 2826 msgstr "" 2766 2827 2767 #: includes/class-hardening-score.php:6 722828 #: includes/class-hardening-score.php:669 2768 2829 msgid "File integrity has a fresh baseline" 2769 2830 msgstr "" 2770 2831 2771 #: includes/class-hardening-score.php:67 92832 #: includes/class-hardening-score.php:676 2772 2833 msgid "A backdoor written into a core or plugin file looks like nothing at all from the dashboard; only a hash taken before it arrived can tell you it is there." 2773 2834 msgstr "" 2774 2835 2775 #: includes/class-hardening-score.php:68 32836 #: includes/class-hardening-score.php:680 2776 2837 msgid "Open the File integrity screen and look at what was found. A PHP file wordpress.org does not list, sitting in wp-admin or wp-includes, is not something a WordPress update leaves behind." 2777 2838 msgstr "" 2778 2839 2779 #: includes/class-hardening-score.php:68 42840 #: includes/class-hardening-score.php:681 2780 2841 msgid "Run a scan on the File integrity screen to create the baseline, and check that the daily cron is firing." 2781 2842 msgstr "" 2782 2843 2844 #: includes/class-hardening-score.php:693 2845 msgid "No account is called \"admin\"" 2846 msgstr "" 2847 2783 2848 #: includes/class-hardening-score.php:696 2784 msgid "No account is called \"admin\""2785 msgstr ""2786 2787 #: includes/class-hardening-score.php:6992788 2849 msgid "An account with the login \"admin\" exists." 2789 2850 msgstr "" 2790 2851 2791 #: includes/class-hardening-score.php: 7002852 #: includes/class-hardening-score.php:697 2792 2853 msgid "No account uses that login." 2793 2854 msgstr "" 2794 2855 2856 #: includes/class-hardening-score.php:698 2857 msgid "An account literally named admin hands over half of every credential pair before the guessing starts." 2858 msgstr "" 2859 2795 2860 #: includes/class-hardening-score.php:701 2796 msgid "An account literally named admin hands over half of every credential pair before the guessing starts."2797 msgstr ""2798 2799 #: includes/class-hardening-score.php:7042800 2861 msgid "Create a new administrator with a different login, move the content to it, and delete the old one." 2801 2862 msgstr "" 2802 2863 2864 #: includes/class-hardening-score.php:707 2865 msgid "Login names are not published" 2866 msgstr "" 2867 2868 #: includes/class-hardening-score.php:709 2869 #: includes/class-hardening-score.php:863 2870 msgid "Blocked." 2871 msgstr "" 2872 2873 #: includes/class-hardening-score.php:709 2874 msgid "Anyone can list your login names." 2875 msgstr "" 2876 2803 2877 #: includes/class-hardening-score.php:710 2804 msgid "Login names are not published" 2805 msgstr "" 2806 2807 #: includes/class-hardening-score.php:712 2808 #: includes/class-hardening-score.php:885 2809 msgid "Blocked." 2810 msgstr "" 2811 2812 #: includes/class-hardening-score.php:712 2813 msgid "Anyone can list your login names." 2878 msgid "The ?author=1 redirect and the REST users route hand out real login names, which turns password guessing from two unknowns into one." 2814 2879 msgstr "" 2815 2880 2816 2881 #: includes/class-hardening-score.php:713 2817 msgid "The ?author=1 redirect and the REST users route hand out real login names, which turns password guessing from two unknowns into one."2818 msgstr ""2819 2820 #: includes/class-hardening-score.php:7162821 2882 msgid "Turn on \"Block user enumeration\" under Hardening." 2822 2883 msgstr "" 2823 2884 2824 #: includes/class-hardening-score.php:740 2825 msgid "The REST API answers anonymous callers on every namespace." 2885 #: includes/class-hardening-score.php:727 2886 msgid "The REST API keeps user records private" 2887 msgstr "" 2888 2889 #: includes/class-hardening-score.php:730 2890 msgid "Visitors and customers cannot list your users or read their records through the REST API." 2891 msgstr "" 2892 2893 #: includes/class-hardening-score.php:731 2894 msgid "Anyone can list your users through the REST API." 2895 msgstr "" 2896 2897 #: includes/class-hardening-score.php:732 2898 msgid "The REST users route hands out every author's login slug to anyone who asks, which turns password guessing from two unknowns into one." 2899 msgstr "" 2900 2901 #: includes/class-hardening-score.php:735 2902 msgid "Turn on \"Keep user records out of the REST API\" under API & Protocols." 2903 msgstr "" 2904 2905 #: includes/class-hardening-score.php:741 2906 msgid "Security response headers are sent" 2826 2907 msgstr "" 2827 2908 2828 2909 #: includes/class-hardening-score.php:743 2829 msgid "Restricted, but the allowlist lets wp/v2 back in — which is the part that was being restricted." 2830 msgstr "" 2831 2832 #: includes/class-hardening-score.php:746 2833 msgid "Anonymous REST access is limited to the allowlisted namespaces." 2834 msgstr "" 2835 2836 #: includes/class-hardening-score.php:751 2837 msgid "The REST API is restricted to signed-in callers" 2838 msgstr "" 2839 2840 #: includes/class-hardening-score.php:754 2841 msgid "An open REST API publishes users, posts, media and some settings to anonymous callers, and an allowlist entry that re-admits wp/v2 undoes the whole restriction while the checkbox still reads as on." 2842 msgstr "" 2843 2844 #: includes/class-hardening-score.php:757 2845 msgid "Turn on the REST restriction and remove any allowlist line that matches wp/v2." 2910 msgid "Sent." 2911 msgstr "" 2912 2913 #: includes/class-hardening-score.php:743 2914 msgid "Not sent." 2915 msgstr "" 2916 2917 #: includes/class-hardening-score.php:744 2918 msgid "Without them the browser will sniff content types, render your pages inside somebody else's frame, and leak the full URL of every page as a referrer." 2919 msgstr "" 2920 2921 #: includes/class-hardening-score.php:747 2922 msgid "Turn on \"Send security HTTP headers\" under Hardening." 2923 msgstr "" 2924 2925 #: includes/class-hardening-score.php:752 2926 msgid "No Content-Security-Policy header is sent." 2927 msgstr "" 2928 2929 #: includes/class-hardening-score.php:755 2930 msgid "Sent in report-only mode, which records violations and blocks nothing." 2931 msgstr "" 2932 2933 #: includes/class-hardening-score.php:758 2934 msgid "Sent and enforcing." 2846 2935 msgstr "" 2847 2936 2848 2937 #: includes/class-hardening-score.php:763 2849 msgid "Security response headers are sent" 2850 msgstr "" 2851 2852 #: includes/class-hardening-score.php:765 2853 msgid "Sent." 2854 msgstr "" 2855 2856 #: includes/class-hardening-score.php:765 2857 msgid "Not sent." 2938 msgid "A Content-Security-Policy is enforced" 2858 2939 msgstr "" 2859 2940 2860 2941 #: includes/class-hardening-score.php:766 2861 msgid " Without them the browser will sniff content types, render your pages inside somebody else's frame, and leak the full URL of every page as a referrer."2942 msgid "A policy is the last line that stops an injected script from running at all. Report-only is the correct place to start and it is worth half — it watches, and it blocks nothing." 2862 2943 msgstr "" 2863 2944 2864 2945 #: includes/class-hardening-score.php:769 2865 msgid "Turn on \"Send security HTTP headers\" under Hardening." 2866 msgstr "" 2867 2868 #: includes/class-hardening-score.php:774 2869 msgid "No Content-Security-Policy header is sent." 2946 msgid "Run report-only until the reports are quiet, then turn report-only off so the policy actually blocks." 2870 2947 msgstr "" 2871 2948 2872 2949 #: includes/class-hardening-score.php:777 2873 msgid "Sen t in report-only mode, which records violations and blocks nothing."2950 msgid "Sensitive files are not directly readable" 2874 2951 msgstr "" 2875 2952 2876 2953 #: includes/class-hardening-score.php:780 2877 msgid "Sent and enforcing." 2878 msgstr "" 2879 2880 #: includes/class-hardening-score.php:785 2881 msgid "A Content-Security-Policy is enforced" 2882 msgstr "" 2883 2884 #: includes/class-hardening-score.php:788 2885 msgid "A policy is the last line that stops an injected script from running at all. Report-only is the correct place to start and it is worth half — it watches, and it blocks nothing." 2886 msgstr "" 2887 2888 #: includes/class-hardening-score.php:791 2889 msgid "Run report-only until the reports are quiet, then turn report-only off so the policy actually blocks." 2954 #: includes/class-hardening-score.php:822 2955 msgid "This server does not read .htaccess, so GuardForge cannot answer for it here." 2956 msgstr "" 2957 2958 #: includes/class-hardening-score.php:782 2959 msgid "The deny rules are present in .htaccess." 2960 msgstr "" 2961 2962 #: includes/class-hardening-score.php:783 2963 msgid "The deny rules are not in .htaccess." 2964 msgstr "" 2965 2966 #: includes/class-hardening-score.php:784 2967 msgid "A readable wp-config.php or a forgotten debug.log hands over database credentials, salts and query fragments without needing a single exploit." 2968 msgstr "" 2969 2970 #: includes/class-hardening-score.php:787 2971 msgid "Turn on \"Protect sensitive files\" and make sure .htaccess is writable so the rules can be written." 2972 msgstr "" 2973 2974 #: includes/class-hardening-score.php:793 2975 msgid "Administrator actions are recorded" 2976 msgstr "" 2977 2978 #: includes/class-hardening-score.php:795 2979 msgid "Recorded." 2980 msgstr "" 2981 2982 #: includes/class-hardening-score.php:795 2983 msgid "Not recorded." 2984 msgstr "" 2985 2986 #: includes/class-hardening-score.php:796 2987 msgid "Without a trail you cannot say which account changed what or when, so an incident ends in guesswork instead of a timeline." 2890 2988 msgstr "" 2891 2989 2892 2990 #: includes/class-hardening-score.php:799 2893 msgid "Sensitive files are not directly readable" 2894 msgstr "" 2895 2896 #: includes/class-hardening-score.php:802 2897 #: includes/class-hardening-score.php:844 2898 msgid "This server does not read .htaccess, so GuardForge cannot answer for it here." 2899 msgstr "" 2900 2901 #: includes/class-hardening-score.php:804 2902 msgid "The deny rules are present in .htaccess." 2903 msgstr "" 2904 2905 #: includes/class-hardening-score.php:805 2906 msgid "The deny rules are not in .htaccess." 2907 msgstr "" 2908 2909 #: includes/class-hardening-score.php:806 2910 msgid "A readable wp-config.php or a forgotten debug.log hands over database credentials, salts and query fragments without needing a single exploit." 2991 msgid "Turn on \"Log admin actions\" under Action audit." 2992 msgstr "" 2993 2994 #: includes/class-hardening-score.php:807 2995 msgid "The WordPress version is not advertised" 2911 2996 msgstr "" 2912 2997 2913 2998 #: includes/class-hardening-score.php:809 2914 msgid "Turn on \"Protect sensitive files\" and make sure .htaccess is writable so the rules can be written." 2915 msgstr "" 2916 2917 #: includes/class-hardening-score.php:815 2918 msgid "Administrator actions are recorded" 2919 msgstr "" 2920 2921 #: includes/class-hardening-score.php:817 2922 msgid "Recorded." 2923 msgstr "" 2924 2925 #: includes/class-hardening-score.php:817 2926 msgid "Not recorded." 2927 msgstr "" 2928 2929 #: includes/class-hardening-score.php:818 2930 msgid "Without a trail you cannot say which account changed what or when, so an incident ends in guesswork instead of a timeline." 2931 msgstr "" 2932 2933 #: includes/class-hardening-score.php:821 2934 msgid "Turn on \"Log admin actions\" under Action audit." 2999 msgid "Hidden." 3000 msgstr "" 3001 3002 #: includes/class-hardening-score.php:809 3003 msgid "Published in the generator tag and asset URLs." 3004 msgstr "" 3005 3006 #: includes/class-hardening-score.php:810 3007 msgid "A version in the generator tag turns a scan into a lookup: read it once, and you know which exploits are worth trying." 3008 msgstr "" 3009 3010 #: includes/class-hardening-score.php:813 3011 msgid "Turn on \"Hide WordPress version\" under Hardening." 3012 msgstr "" 3013 3014 #: includes/class-hardening-score.php:819 3015 msgid "Directories do not list their contents" 3016 msgstr "" 3017 3018 #: includes/class-hardening-score.php:824 3019 msgid "Options -Indexes is in place." 3020 msgstr "" 3021 3022 #: includes/class-hardening-score.php:825 3023 msgid "Options -Indexes is not in place." 3024 msgstr "" 3025 3026 #: includes/class-hardening-score.php:826 3027 msgid "An open directory index lists the backups, exports and stray archives that nobody ever linked to and everybody forgets about." 2935 3028 msgstr "" 2936 3029 2937 3030 #: includes/class-hardening-score.php:829 2938 msgid "The WordPress version is not advertised" 2939 msgstr "" 2940 2941 #: includes/class-hardening-score.php:831 2942 msgid "Hidden." 2943 msgstr "" 2944 2945 #: includes/class-hardening-score.php:831 2946 msgid "Published in the generator tag and asset URLs." 2947 msgstr "" 2948 2949 #: includes/class-hardening-score.php:832 2950 msgid "A version in the generator tag turns a scan into a lookup: read it once, and you know which exploits are worth trying." 3031 msgid "Turn on \"Disable directory listing\" under Files & Directories." 2951 3032 msgstr "" 2952 3033 2953 3034 #: includes/class-hardening-score.php:835 2954 msgid "Turn on \"Hide WordPress version\" under Hardening." 3035 msgid "The login form asks a question a script cannot answer" 3036 msgstr "" 3037 3038 #: includes/class-hardening-score.php:837 3039 #: includes/class-hardening-score.php:851 3040 msgid "On." 3041 msgstr "" 3042 3043 #: includes/class-hardening-score.php:838 3044 msgid "A trivial arithmetic challenge costs a person two seconds and stops the cheapest credential-stuffing bots outright." 2955 3045 msgstr "" 2956 3046 2957 3047 #: includes/class-hardening-score.php:841 2958 msgid "Directories do not list their contents" 2959 msgstr "" 2960 2961 #: includes/class-hardening-score.php:846 2962 msgid "Options -Indexes is in place." 2963 msgstr "" 2964 2965 #: includes/class-hardening-score.php:847 2966 msgid "Options -Indexes is not in place." 2967 msgstr "" 2968 2969 #: includes/class-hardening-score.php:848 2970 msgid "An open directory index lists the backups, exports and stray archives that nobody ever linked to and everybody forgets about." 2971 msgstr "" 2972 2973 #: includes/class-hardening-score.php:851 2974 msgid "Turn on \"Disable directory listing\" under Files & Directories." 2975 msgstr "" 2976 2977 #: includes/class-hardening-score.php:857 2978 msgid "The login form asks a question a script cannot answer" 2979 msgstr "" 2980 2981 #: includes/class-hardening-score.php:859 3048 msgid "Turn on \"Math captcha on login\" under Hardening." 3049 msgstr "" 3050 3051 #: includes/class-hardening-score.php:849 3052 msgid "Pingbacks are switched off" 3053 msgstr "" 3054 3055 #: includes/class-hardening-score.php:852 3056 msgid "Pingbacks let your site be pointed at somebody else's as a reflector in a denial-of-service, and they advertise that with an X-Pingback header." 3057 msgstr "" 3058 3059 #: includes/class-hardening-score.php:855 3060 msgid "Turn on \"Disable self-pingbacks\" under API & Protocols." 3061 msgstr "" 3062 3063 #: includes/class-hardening-score.php:861 3064 msgid "Known scanner User-Agents are blocked" 3065 msgstr "" 3066 3067 #: includes/class-hardening-score.php:863 3068 msgid "Not blocked." 3069 msgstr "" 3070 3071 #: includes/class-hardening-score.php:864 3072 msgid "Blocking the default signatures of sqlmap, nikto and wpscan removes the noisy, automated half of hostile traffic before it reaches PHP at all." 3073 msgstr "" 3074 3075 #: includes/class-hardening-score.php:867 3076 msgid "Turn on \"Block malicious bot User-Agents\" under Spam & Bots." 3077 msgstr "" 3078 3079 #: includes/class-hardening-score.php:871 3080 msgid "Nothing is set to send an alert, so nothing will be sent." 3081 msgstr "" 3082 2982 3083 #: includes/class-hardening-score.php:873 2983 msgid "On." 2984 msgstr "" 2985 2986 #: includes/class-hardening-score.php:860 2987 msgid "A trivial arithmetic challenge costs a person two seconds and stops the cheapest credential-stuffing bots outright." 2988 msgstr "" 2989 2990 #: includes/class-hardening-score.php:863 2991 msgid "Turn on \"Math captcha on login\" under Hardening." 2992 msgstr "" 2993 2994 #: includes/class-hardening-score.php:871 2995 msgid "Pingbacks are switched off" 2996 msgstr "" 2997 2998 #: includes/class-hardening-score.php:874 2999 msgid "Pingbacks let your site be pointed at somebody else's as a reflector in a denial-of-service, and they advertise that with an X-Pingback header." 3000 msgstr "" 3001 3002 #: includes/class-hardening-score.php:877 3003 msgid "Turn on \"Disable self-pingbacks\" under API & Protocols." 3084 msgid "Alerts are switched on, but there is no address for them to reach." 3085 msgstr "" 3086 3087 #: includes/class-hardening-score.php:875 3088 msgid "Alerts are switched on and an address resolves." 3089 msgstr "" 3090 3091 #: includes/class-hardening-score.php:880 3092 msgid "Someone is told when something happens" 3004 3093 msgstr "" 3005 3094 3006 3095 #: includes/class-hardening-score.php:883 3007 msgid "Known scanner User-Agents are blocked" 3008 msgstr "" 3009 3010 #: includes/class-hardening-score.php:885 3011 msgid "Not blocked." 3096 msgid "A lockout or an integrity change that nobody is told about is a detection that arrives whenever somebody next happens to open the dashboard." 3012 3097 msgstr "" 3013 3098 3014 3099 #: includes/class-hardening-score.php:886 3015 msgid "Blocking the default signatures of sqlmap, nikto and wpscan removes the noisy, automated half of hostile traffic before it reaches PHP at all."3016 msgstr ""3017 3018 #: includes/class-hardening-score.php:8893019 msgid "Turn on \"Block malicious bot User-Agents\" under Spam & Bots."3020 msgstr ""3021 3022 #: includes/class-hardening-score.php:8933023 msgid "Nothing is set to send an alert, so nothing will be sent."3024 msgstr ""3025 3026 #: includes/class-hardening-score.php:8953027 msgid "Alerts are switched on, but there is no address for them to reach."3028 msgstr ""3029 3030 #: includes/class-hardening-score.php:8973031 msgid "Alerts are switched on and an address resolves."3032 msgstr ""3033 3034 #: includes/class-hardening-score.php:9023035 msgid "Someone is told when something happens"3036 msgstr ""3037 3038 #: includes/class-hardening-score.php:9053039 msgid "A lockout or an integrity change that nobody is told about is a detection that arrives whenever somebody next happens to open the dashboard."3040 msgstr ""3041 3042 #: includes/class-hardening-score.php:9083043 3100 msgid "Switch on the lockout, integrity and new-administrator alerts, and set the address they should reach." 3044 3101 msgstr "" 3045 3102 3046 #: includes/class-hardening-score.php: 9123103 #: includes/class-hardening-score.php:890 3047 3104 msgid "Staging mode is on, so this copy holds every one of these e-mails back. The setting is right; nothing is being sent from here." 3048 3105 msgstr "" 3049 3106 3050 #: includes/class-hardening.php: 883107 #: includes/class-hardening.php:97 3051 3108 msgid "XML-RPC is disabled on this site." 3052 3109 msgstr "" 3053 3110 3054 #: includes/class-hardening.php:114 3111 #: includes/class-hardening.php:155 3112 msgid "Invalid user ID." 3113 msgstr "" 3114 3115 #: includes/class-hardening.php:159 3116 msgid "Sorry, you are not allowed to list users." 3117 msgstr "" 3118 3119 #: includes/class-hardening.php:214 3055 3120 msgid "REST API is restricted to authenticated users." 3056 3121 msgstr "" 3057 3122 3058 #: includes/class-hardening.php:163 3123 #: includes/class-hardening.php:319 3124 msgid "Embeds of your posts on other sites" 3125 msgstr "" 3126 3127 #: includes/class-hardening.php:320 3128 msgid "WooCommerce block cart and checkout (guest orders)" 3129 msgstr "" 3130 3131 #: includes/class-hardening.php:321 3132 msgid "Contact Form 7 form submissions" 3133 msgstr "" 3134 3135 #: includes/class-hardening.php:322 3136 msgid "Jetpack connection to WordPress.com" 3137 msgstr "" 3138 3139 #: includes/class-hardening.php:323 3140 msgid "Form Forge form submissions" 3141 msgstr "" 3142 3143 #: includes/class-hardening.php:324 3144 msgid "Cascade Forge webhooks from other services" 3145 msgstr "" 3146 3147 #: includes/class-hardening.php:325 3148 msgid "Inclusive Forge scan results" 3149 msgstr "" 3150 3151 #: includes/class-hardening.php:366 3059 3152 msgid "Comments via REST are disabled." 3060 3153 msgstr "" 3061 3154 3062 3155 #. translators: %1$d and %2$d are random single-digit operands. 3063 #: includes/class-hardening.php: 2933156 #: includes/class-hardening.php:519 3064 3157 #, php-format 3065 3158 msgid "Verification: %1$d + %2$d = ?" 3066 3159 msgstr "" 3067 3160 3068 #: includes/class-hardening.php: 3173161 #: includes/class-hardening.php:554 3069 3162 msgid "<strong>Error:</strong> please answer the verification question." 3070 3163 msgstr "" 3071 3164 3072 #: includes/class-hardening.php: 3283165 #: includes/class-hardening.php:565 3073 3166 msgid "<strong>Error:</strong> verification expired, please try again." 3074 3167 msgstr "" 3075 3168 3076 #: includes/class-hardening.php: 3313169 #: includes/class-hardening.php:568 3077 3170 msgid "<strong>Error:</strong> the verification answer was wrong." 3078 3171 msgstr "" … … 3241 3334 3242 3335 #: includes/class-two-factor.php:223 3336 #: includes/class-two-factor.php:340 3243 3337 msgid "<strong>Error:</strong> two-factor code is invalid." 3244 3338 msgstr "" -
guardforge/trunk/readme.txt
r3752344 r3754541 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.6. 37 Stable tag: 1.6.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 119 119 Off unless you switch it on. When you do, GuardForge issues a link on your own site that publishes a letter grade and the month it was worked out — nothing else. 120 120 121 The grade is not your score. It is worked out only from the eleven checks a stranger can already run against your site from outside with no login: the scheme, XML-RPC, whether `?author=1` gives up a login name, whether the REST API answersanonymous callers, the version in your generator tag, your response headers, your Content-Security-Policy header, whether a directory lists its contents, whether sensitive files answer directly, the login form, and the X-Pingback header. Everything on that list is already public, so the badge tells a passer-by nothing they could not have found by loading your site.121 The grade is not your score. It is worked out only from the eleven checks a stranger can already run against your site from outside with no login: the scheme, XML-RPC, whether `?author=1` gives up a login name, whether the REST API hands your user records to anonymous callers, the version in your generator tag, your response headers, your Content-Security-Policy header, whether a directory lists its contents, whether sensitive files answer directly, the login form, and the X-Pingback header. Everything on that list is already public, so the badge tells a passer-by nothing they could not have found by loading your site. 122 122 123 123 Your numeric score, your two-factor coverage, your brute-force thresholds, your integrity results, whether an account is called admin, your pending updates and any vulnerable components are never published, in any form. The link carries an unguessable token so nobody can walk a list of sites looking for weak ones, it can be reissued or turned off at any moment, views are never logged, and until you switch it on the address is not registered at all — your site answers WordPress's own 404, exactly like a site without the plugin. … … 163 163 164 164 == Changelog == 165 166 = 1.6.4 = 167 * Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before. 168 * The REST API is no longer closed to visitors by default. Until now GuardForge refused every anonymous REST call outside a short list, which stopped the block-based WooCommerce cart and checkout, Contact Form 7, webhooks and other public REST routes for your visitors. The default protection now keeps only user records private (the REST user list and single user records, and the author name and archive link that an embed answer and the users sitemap give out), for visitors and also for customers and subscribers. Sites that already had "Restrict REST API" switched on with the list of exceptions left as it was are moved to this protection by the update. A site that had written its own list of exceptions keeps the whole REST API closed to visitors, with that list: the new separate setting is switched on for it. Either way a notice in the admin, shown once and closable, says what was chosen and where to change it. Refusing every anonymous REST call is now a separate setting, off by default for everybody else; the Settings screen says what it stops (cart, checkout, forms, webhooks) and which active plugins would be affected. 169 * The REST address is read the same way with pretty permalinks (/wp-json/) and with plain ones (?rest_route=), so an allowed route is no longer refused on a site with plain permalinks. 170 * A wrong two-factor code now counts towards the same lockout as a wrong password, so a stolen password cannot be paired with guessed codes without limit. A locked-out address is turned away at the code step too. 171 * The login lockout now holds on every login form: WooCommerce My Account and other forms that use the standard login, and on REST requests with an application password. Failed application-password attempts count as failed logins (one per request), and a locked-out address is refused even with the right password. An administrator who is signed in by cookie behind a server password prompt (htpasswd) is not mistaken for a guess: the block editor keeps working from a locked-out address. 172 * The login captcha is now checked only where it is shown. Logging in through WooCommerce My Account or other forms without the captcha field no longer fails every time. 173 * "Unblock" in the list of lockouts now lifts the block for the address; it used to leave it in place. 165 174 166 175 = 1.6.3 = … … 270 279 == Upgrade Notice == 271 280 281 = 1.6.4 = 282 Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before. Anonymous REST access is no longer blocked by default: only user records stay private, so the WooCommerce cart, forms and webhooks work for visitors again. 283 272 284 = 1.6.3 = 273 285 Needs GuardForge Pro 1.4.0 or newer if you run the add-on, as before.
Note:
See TracChangeset
for help on using the changeset viewer.