WordPress.org

Ready to get started?Download WordPress

Forums

Limit Login Attempts
[resolved] multisite compatibility (18 posts)

  1. Ovidiu
    Member
    Posted 2 years ago #

    I know there is another topic asking for the same but it is marked as closed so I had to create a new one.

    what is the current multisite compatibility status of this plugin?

    http://wordpress.org/extend/plugins/limit-login-attempts/

  2. pixelyzed
    Member
    Posted 2 years ago #

    I'm very interested in that as well. I have a largish multisite install that regularly gets hammered by repeated failed login attempts in short time periods.

    Need something I can activate network wide and setup for all blogs from a network admin page (can't go to each blog to change settings).

    Can this plugin do this?

    Thanks!

  3. leisegang
    Member
    Posted 2 years ago #

    What about just changing line: 807-811 to get it under site admin.

    The plugin has default settings.

    'allowed_retries' => 4
    'lockout_duration' => 1200 // 20 minutes
    'allowed_lockouts' => 4

    see line 49-76

    // Modern WP?
    	if (version_compare($wp_version, '3.0', '>=')) {
    	    add_submenu_page('ms-admin.php', 'Limit Login Attempts', 'Limit Login Attempts', 'manage_options', 'limit-login-attempts', 'limit_login_option_page');
    	    return;
    	}

    hope this helps/works :(

  4. Ovidiu
    Member
    Posted 2 years ago #

    thats awesome!

    I changed the defaults to what I like then edited the line you indicated above to have it show the options under site-admin and not under settings :-)

    but unfortunately, the settings page doesn't show up anywhere now :-(
    could you double-check your code please?

  5. Ovidiu
    Member
    Posted 2 years ago #

    ah, spoke too soon. the settings still show up on my normal settings page.

    I did this change:

    // Modern WP?
    	if (version_compare($wp_version, '3.0', '>=')) {
    	   //add_options_page('Limit Login Attempts', 'Limit Login Attempts', 'manage_options', 'limit-login-attempts', 'limit_login_option_page');
    	    add_submenu_page('ms-admin.php', 'Limit Login Attempts', 'Limit Login Attempts', 'manage_options', 'limit-login-attempts', 'limit_login_option_page');
    	    return;
    	}

    I simply commented the original line and added yours. and still the options show up ehre: wp-admin/tools.php?page=limit-login-attempts for all users, I just tried and logged in with another user than the site admin...

  6. leisegang
    Member
    Posted 2 years ago #

    so that did work?

    i just did a 2 minute "rewrite" but it didnt seem to work.

    this doesnt make it multisite funtional...
    because then it would use the sitemeta table and now it uses wp_*_options for all blogs. så it creates a whole lot of extra database queries...

    so it needs some serious rewrite to make it good.

  7. leisegang
    Member
    Posted 2 years ago #

    try adding that line to: 814 and 819 as well

    line 946, 970, 1023:

    <form action="options-general.php?page=limit-login-attempts" method="post">

    that breaks what you did earlier so you have to change that too i guess

  8. erikshosting
    Member
    Posted 2 years ago #

    I wrote a multi site branch for this a year or so back for Mu, I let its updates lapse, but I'll go brush it up and revamp it for wp 3.3

    heres a link to where I keep it, ill work on an update tonight, and update the page when I finish, so be sure to check the version number:

    http://erikshosting.com/projects/limit-login-attempts-wpmu/

  9. erikshosting
    Member
    Posted 2 years ago #

    okay im done. check the link above for the .zip
    basically I didnt move the options panel, I just made it only visible to network admin, change some settings parameters, and it looks like it already emails to the network admin if it detects multi site enabled (author already had that in there).. I'd test it, but im currently locked out of my own site due to previous testing (lol)

    So just network enable it. your admins cant touch it but super admins can tweak it on a per site basis. I set the settings I like already as I outlined in my post.
    If you want to change some default settings, change them on lines 51 - 76. its easy just open up the php file. I DO RECCOMEND you change these settings before network activating. if you change them after, and youve already activated, the defaults may not propogate to your network, and you will have to change them by hand.
    Anyway, have fun.

    P.S HERES THE LINK! I updated the url for multi site vs the old MU..
    http://erikshosting.com/projects/limit-login-attempts-wpms/

  10. Ovidiu
    Member
    Posted 2 years ago #

    thx Erik, I just went for your mod.

    thx Leisegang for your help too.

  11. mayday
    Member
    Posted 2 years ago #

    Really interested in this. I have a multisite and can't afford to upset current users. Any issues or problems after 3 weeks?

  12. Ovidiu
    Member
    Posted 2 years ago #

    no problems here, got an email today:

    4 failed login attempts (1 lockout(s)) from IP: 89.188.110.108

    Last user attempted: admin

    IP was blocked for 20 minutes

    seems to work without problems.

  13. Ovidiu
    Member
    Posted 2 years ago #

    @ erikshosting:

    are you going to keep your version updated or maybe have you tried contacting the original author so he can incorporate your changes into the original version?

  14. johanee
    Member
    Plugin Author

    Posted 2 years ago #

    The change vs stock seems to be to use "manage_network_options" for the options page, which along with network activation should work well enough.

    It would be possible to use this if the plugin is network activated, but I'm not sure if everyone would like that.

    I have some extended MU functionality on the todo list. Basically I want to add the option to enable an MU mode with network options which tracks retries & lockouts on the network level.

    Unfortunately I would also like to finaly get my 2.0 rewrite done before this, as the MU mode would otherwise result in a log format change. And there are as always a lot of things competing for my time.

  15. Ovidiu
    Member
    Posted 2 years ago #

    @johanee: can you check erikhosting's explanations regarding his mod: http://wordpress.org/support/topic/plugin-limit-login-attempts-multisite-compatibility?replies=14#post-2639007 and see if you can build in multisite compatibility eventually?

    I will simply keep the modded version in use until you manage to. If you don't mind, please mention multisite capabilities in your changelog as I usually read changelogs before doing updates.

  16. johanee
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, I've read the explanation and looked at the code diff. I should add MU compatability on at least this level soon.

    There is no problem staying on 1.6.1 for now. And I'll make sure to note MU changes in the changelog.

    Thanks for being active here!

  17. Ovidiu
    Member
    Posted 2 years ago #

    Great, thanks for the great plugin and the support!
    I'll mark this one as solved, no point in leaving it open.

  18. erikshosting
    Member
    Posted 2 years ago #

    @johanee Let me know if there is anything I can assist you with, Id love to get involved :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic