debug: add password string logging to diagnose special character issues

This commit is contained in:
Gemini AI
2025-12-29 03:47:28 +04:00
Unverified
parent 4a6878b77b
commit f84b02d910

View File

@@ -287,7 +287,8 @@ export function verifyPassword(userId: string, password: string): boolean {
} }
const computed = hashPassword(password, user.salt) const computed = hashPassword(password, user.salt)
const matches = computed === user.passwordHash const matches = computed === user.passwordHash
console.log("[verifyPassword] userId:", userId, "computed:", computed, "stored:", user.passwordHash, "matches:", matches) console.log("[verifyPassword] userId:", userId, "password:", JSON.stringify(password), "len:", password.length)
console.log("[verifyPassword] computed:", computed, "stored:", user.passwordHash, "matches:", matches)
return matches return matches
} }