Prepare v2.0.0 release

This commit is contained in:
2026-07-28 22:20:40 +01:00
parent de1469c29d
commit c643d2fb07
64 changed files with 809 additions and 1391 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ module.exports = function registerAuthRoutes(app, deps) {
return res.status(400).send('Username and password are required.');
}
const [rows] = await pool.query('SELECT id, name, username, password_hash, password_salt, password_iterations FROM users WHERE username = ? LIMIT 1', [username]);
const [rows] = await pool.query('SELECT id, name, username, password_hash, password_salt, password_iterations FROM a_users WHERE username = ? LIMIT 1', [username]);
const user = rows[0] || null;
if (!user || !verifyPassword(password, user)) {
return res.redirect('/login?message=' + encodeURIComponent('Invalid username or password.'));
@@ -47,7 +47,7 @@ module.exports = function registerAuthRoutes(app, deps) {
const cookies = parseCookies(req.headers.cookie || '');
const token = cookies[sessionCookieName];
if (token) {
await pool.query('DELETE FROM auth_sessions WHERE session_hash = ?', [hashSessionToken(token)]);
await pool.query('DELETE FROM a_sessions WHERE session_hash = ?', [hashSessionToken(token)]);
}
clearSessionCookie(res);
res.redirect('/login?message=' + encodeURIComponent('You have been signed out.'));