Include spam feature in admin area

Hello, I activated the WP_FAIL2BAN_LOG_SPAM flag on my site and was choosing spam messages from the comments page in the admin area manually clicking the spam button on each that I saw spammy. However this didn’t trigger a log in the LOG_AUTH.

In wp-fail2ban-main.php:85 I saw:

if ( is_admin() ) {
    require 'admin/admin.php';
} else {
    require dirname( __FILE__ ) . '/feature/lib.php';
    /**
...

So, I got it working by including lib.php and runnning spam block always and all other feature blocks only outside of admin. Is this something you would be willing to change? It would be nice to be able to mark spam comments manually from the admin to have them ban by fail2ban.

Thanks in advance for your response and thank you very much for developing this plugin!

Technically, what you’ve found there is a bug :slight_smile:
I’ll fix that in the next release - thanks for letting me know!

This was resolved in 4.2.5.