Title: Bug in wp-fail2ban.php
Last modified: August 21, 2016

---

# Bug in wp-fail2ban.php

 *  Resolved [alekc](https://wordpress.org/support/users/alekc/)
 * (@alekc)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/bug-in-wp-fail2banphp/)
 * It shouldn’t be
    `if (array_key_exists($_SERVER,'HTTP_X_FORWARDED_FOR')) {`
 * but
 * `if (array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) {`
 * Also, i would suggest to force checking of HTTP_X_FORWARDED_FOR in case $ip =
   = private network (i.e. 192.168.x.x, 10.x.x.x.
 * [http://wordpress.org/plugins/wp-fail2ban/](http://wordpress.org/plugins/wp-fail2ban/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [invisnet](https://wordpress.org/support/users/invisnet/)
 * (@invisnet)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/bug-in-wp-fail2banphp/#post-4028613)
 * Thanks for that – it’s fixed in 2.0.1.
 * As for forcing a check on private networks, that needs a lot more thought – I
   don’t want to break things for people running WP locally.

Viewing 1 replies (of 1 total)

The topic ‘Bug in wp-fail2ban.php’ is closed to new replies.

 * ![](https://ps.w.org/wp-fail2ban/assets/icon-256x256.png?rev=2814701)
 * [WP fail2ban - Advanced Security](https://wordpress.org/plugins/wp-fail2ban/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fail2ban/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fail2ban/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fail2ban/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fail2ban/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fail2ban/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [invisnet](https://wordpress.org/support/users/invisnet/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/bug-in-wp-fail2banphp/#post-4028613)
 * Status: resolved