Print failed login attempts to console
This commit is contained in:
parent
4c0479fe3d
commit
ed4b6e85ac
@ -624,6 +624,12 @@ function performAuthentication(data) {
|
|||||||
const authCallback = (success) => {
|
const authCallback = (success) => {
|
||||||
// Authorization failed
|
// Authorization failed
|
||||||
if (!success) {
|
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});
|
socket.emit("auth", {success: false});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user