WP_FAIL2BAN_BLOCK_USER_ENUMERATION

Block user enumeration.

Default setting: disabled


Blocks attempts to enumerate users via author archives and the REST API. When enabled, unprivileged requests for the users list and for an individual user by id are refused and logged as a hard failure.

Example: Block user enumeration
/**
 * Block user enumeration.
 */
define('WP_FAIL2BAN_BLOCK_USER_ENUMERATION', true);

Important

You should define this in wp-config.php even if you are using the Premium flavour of WPf2b.

Warning

If your theme has Author profile pages (e.g. TwentyTwenty) you will need to block username logins instead.

History

Changed in version 6.3.0: Also blocks unprivileged REST requests for an individual user by id.

Changed in version 4.0.0: Now also blocks enumeration via the REST API.

Added in version 2.1.0: Based on a suggestion from @geeklol and a plugin by @ROIBOT.