debug: log hash/secret/password lengths in login route
This commit is contained in:
@@ -14,6 +14,10 @@ export const POST: RequestHandler = async ({ request, url }) => {
|
||||
const passwordHash = (env.PASSWORD_HASH ?? '').trim();
|
||||
const sessionSecret = (env.SESSION_SECRET ?? '').trim();
|
||||
|
||||
console.log('[login] passwordHash length:', passwordHash.length, 'first4:', passwordHash.slice(0, 4));
|
||||
console.log('[login] sessionSecret length:', sessionSecret.length);
|
||||
console.log('[login] password length:', password.length);
|
||||
|
||||
if (!passwordHash || !sessionSecret) {
|
||||
console.warn('[humor-units] WARNING: PASSWORD_HASH or SESSION_SECRET env var not set.');
|
||||
return json({ error: 'Admin not configured' }, { status: 503 });
|
||||
|
||||
Reference in New Issue
Block a user