revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Confusing message about blocking a user

Open Ruslan-Aleev opened this issue 2 years ago • 3 comments

Bug report

Summary

It happens that if a user has a simple login, for example, admin, then, as it seems to me, the login form is blocked due to "brute force" on the manager.

And in the login form a message pops up: You have been blocked from the Manager by an administrator.

login_error

In the login.inc.php lexicon: $_lang['login_blocked_admin'] = 'You have been blocked from the Manager by an administrator.';

But it turns out that admin blocked himself, even if there are no other users in the manager at all.

Those either the message is displayed incorrectly, or the logic is broken in the file https://github.com/modxcms/revolution/blob/3.x/core/src/Revolution/Processors/Security/Login.php.

Environment

MODX 2.x >

Ruslan-Aleev avatar Apr 29 '22 16:04 Ruslan-Aleev

I'm unable to reproduce this error.

After X amount of failed attempts I get this error message:

You have been blocked due to too many failed login attempts.

If I try to log in again:

You are temporarily blocked and cannot log in. Please try again later.

JoshuaLuckers avatar May 17 '22 07:05 JoshuaLuckers

There is a message, and it is used in the code :) I don't know how to reproduce it manually, but clients have reported it and I've seen it a few times (I think it's related to admin login brute force, but maybe I'm wrong).

Ruslan-Aleev avatar May 17 '22 07:05 Ruslan-Aleev

@Ruslan-Aleev after waiting a bit I do get the same error message. However, if you try to login again after this message you are logged in successfully.

So yes, you're right the logic is doing something wrong.

JoshuaLuckers avatar May 17 '22 11:05 JoshuaLuckers