-
-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log all 'locked out' failures #859
Comments
THis should be an easy one, so I'll stake claim to it early 😆 |
Started work in #861. Need to test locally. |
Ok, that seems to work for me locally. The log entry is pretty basic in the form as follows:
|
This should be done if somebody from SQA could test? |
That's odd. I'll have to test again, though it might require a mod to the function logging admin actions. |
4651dfb should fix the SQL error. I suppose @euantorano simply pass the data to the |
Nice one, cheers Omar. I'll look at it ASAP.
|
@JordanMussi, the patch by @Sama34 fixes the issue. Could you please pull and test again? I've also simplified the log string rather than duplicating the IP info. |
Yeah it works... My suggestions... 👅
|
Should already do #2. The username is fetched in the log_admin_action() function.
|
I don't fully follow... It doesn't look like you've done that in #861... |
If the user has a front-end login, it will show the username. If they aren't logged in on the front-end, it won't. I'll capture a screenshot tonight. |
Really? Are you sure you've pushed that code? |
Pretty sure. Last I checked log_admin_action does it all.
|
log_admin_action takes the currently logged in admin. Since it logs when there is no admin logged in there is nothing to capture... |
Are you sure? Line 30/31 of $log_entry = array(
"uid" => (int)$mybb->user['uid'], Surely that'll grab the current user ID? I'm sure my local install had a currently logged in user. I didn't get a chance to screenshot last night but will tonight. |
Yes but look at Also at line 302 |
Ah, in which case I'll have to create a temporary |
To add the user details properly, I'm going to have to change quite a lot of stuff in |
Couldn't you just use the user id of the user being locked out? |
Or use "Guest" as the username. "euan" should be formatted in the first line. Don't we do this with other logs (formatting usernames in the details, if not then ignore me)? |
The username column should contain the frontend user attempting to login (not necessarily the admin account that is being entered into the admin login form) but if it requires a lot of effort I'm happy to skip. @euantorano, you haven't committed the part where is also adds the username to the log language line. |
I'm pretty sure I did commit that Jordan. I'd say we call this complete for now in the interest of hitting Beta 3. I can always enhance it later. |
Damn, my bad. I didn't see a notification of the commit. 👅 |
😉 |
I don't think this was meant to be closed? |
@PirataNervo See this: http://community.mybb.com/thread-155809-post-1087393.html#pid1087393 Pretty much sums up where I'm at with this. |
Starting work on logging admin lockouts for #859.
Merged then. A new issue should be opened to correct that. |
Yes, can wait till 1.8.0. |
If locked out of the Admin CP due to bad password, log these failures.
The text was updated successfully, but these errors were encountered: