mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
Merge pull request #2473 from timokoessler/dev
Log IP address on failed login attempts
This commit is contained in:
commit
2552e1d495
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue