mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Modify logging of IP on failed login
This commit is contained in:
parent
bfbe059505
commit
6bf1aa7f66
@ -19,7 +19,6 @@ import { ROLES } from 'lib/constants';
|
||||
import { getIpAddress } from 'lib/detect';
|
||||
|
||||
const log = debug('umami:auth');
|
||||
const logFailed = debug('umami:auth:failed');
|
||||
|
||||
export interface LoginRequestBody {
|
||||
username: string;
|
||||
@ -69,8 +68,7 @@ export default async (
|
||||
});
|
||||
}
|
||||
|
||||
log('Login failed:', { username, user });
|
||||
logFailed(`Login from ip ${getIpAddress(req)} failed.`);
|
||||
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