Support » Plugin: Simple Login Lockdown » Couple of bugs

  • Resolved geoffdaw


    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Couple of bugs’ is closed to new replies.