WordPress.org

Ready to get started?Download WordPress

Forums

Simple Login Lockdown
[resolved] Couple of bugs (2 posts)

  1. geoffdaw
    Member
    Posted 1 year ago #

    I just started looking at this plugin but when I tested it found that it didn't appear to work. It displayed the 'Too many login attemps (sic)' screen after multiple login attempts but I could login again almost straightaway. I then thought I would try changing the settings but found that any changes I made were not being saved.

    Because the plugin was just what I needed I thought it worth looking at the code and found the bugs. The reason I could login almost straightaway is that in lines 281/282 of login.php it uses set_transient to lockdown the IP but this requires an expiry time in seconds and it uses a time (default 60) which is in minutes. The lines need changing to:
    set_transient(self::get_lockdown_key($ip), true, apply_filters('simple_login_lockdown_length', self::opt('time', 60) * 60));

    The other problem of the settings not being saved is because of a bug in the register function of admin.php. It has references to an undefined variable '$this->setting'. I think the intention was that it should be populated with the name of the option from self::SETTING. I declared the variable and at the start of the register function added the line:
    $this->setting = self::SETTING;

    All seems to be working now.

    http://wordpress.org/extend/plugins/simple-login-lockdown/

  2. chrisguitarguy
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.