mirror of
https://github.com/thelounge/thelounge
synced 2024-11-15 00:37:13 +00:00
Merge pull request #2247 from thelounge/xpaw/failed-login-log
Print failed login attempts to console
This commit is contained in:
commit
1632ae27d0
1 changed files with 6 additions and 0 deletions
|
@ -624,6 +624,12 @@ function performAuthentication(data) {
|
|||
const authCallback = (success) => {
|
||||
// Authorization failed
|
||||
if (!success) {
|
||||
if (!client) {
|
||||
log.warn(`Authentication for non existing user attempted from ${colors.bold(getClientIp(socket))}`);
|
||||
} else {
|
||||
log.warn(`Authentication failed for user ${colors.bold(data.user)} from ${colors.bold(getClientIp(socket))}`);
|
||||
}
|
||||
|
||||
socket.emit("auth", {success: false});
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue