mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-02 06:22:20 +00:00
use hasehd user passwords with hash
This commit is contained in:
parent
339a79800d
commit
93aed21024
1 changed files with 1 additions and 0 deletions
|
@ -372,6 +372,7 @@ exports.constructAuthorizedRequest = function (request, username, userPassword =
|
|||
nonce: proxyAuthenticateHeader.nonce.replace(/"/g, ""),
|
||||
};
|
||||
// Construct Digest authentication header manually
|
||||
userPassword = passwordHash.generate(userPassword);
|
||||
const ha1 = crypto.createHash("sha256").update(`${username}:${digestChallenge.realm}:${userPassword}`).digest("hex");
|
||||
const ha2 = crypto.createHash("sha256").update(`${request.method}:${request.uri}`).digest("hex");
|
||||
const response = crypto.createHash("sha256").update(`${ha1}:${digestChallenge.nonce}:${ha2}`).digest("hex");
|
||||
|
|
Loading…
Add table
Reference in a new issue