mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 18:00:17 +01:00
Merge pull request #2473 from timokoessler/dev
Log IP address on failed login attempts
This commit is contained in:
commit
2552e1d495
@ -16,6 +16,7 @@ import {
|
||||
import { getUserByUsername } from 'queries';
|
||||
import * as yup from 'yup';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { getIpAddress } from 'lib/detect';
|
||||
|
||||
const log = debug('umami:auth');
|
||||
|
||||
@ -67,7 +68,7 @@ export default async (
|
||||
});
|
||||
}
|
||||
|
||||
log('Login failed:', { username, user });
|
||||
log(`Login from ip ${getIpAddress(req)} with username "${username.replace(/["\r\n]/g, '')}" failed.`);
|
||||
|
||||
return unauthorized(res, 'message.incorrect-username-password');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user