fix signup/change password can not login

This commit is contained in:
xiaomlove
2025-05-22 01:52:52 +07:00
parent 3dfe0cbd27
commit c3aa540571
2 changed files with 5 additions and 5 deletions

View File

@@ -1566,11 +1566,11 @@ async function login(username, password, jqForm) {
return
}
const clientHashedPassword = await sha256(password);
const clientHashedPassword = sha256(password);
const serverSideHash = await sha256(challengeData.data.secret + clientHashedPassword);
const serverSideHash = sha256(challengeData.data.secret + clientHashedPassword);
const clientResponse = await hmacSha256(challengeData.data.challenge, serverSideHash);
const clientResponse = hmacSha256(challengeData.data.challenge, serverSideHash);
jqForm.find("input[name=response]").val(clientResponse)
jqForm.submit()
} catch (error) {