1
0
mirror of https://github.com/SillyTavern/SillyTavern.git synced 2025-03-03 03:17:54 +01:00

Fix public facing messages

This commit is contained in:
Cohee 2024-04-13 00:13:36 +03:00
parent 53386b35c9
commit dcd89f2295

@ -59,7 +59,7 @@ router.post('/login', jsonParser, async (request, response) => {
if (!user) {
console.log('Login failed: User not found');
return response.status(403).json({ error: 'User not found' });
return response.status(403).json({ error: 'Incorrect credentials' });
}
if (!user.enabled) {
@ -67,10 +67,9 @@ router.post('/login', jsonParser, async (request, response) => {
return response.status(403).json({ error: 'User is disabled' });
}
if (user.password && user.password !== getPasswordHash(request.body.password, user.salt)) {
console.log('Login failed: Incorrect password');
return response.status(403).json({ error: 'Incorrect password' });
return response.status(403).json({ error: 'Incorrect credentials' });
}
if (!request.session) {