Fix a bug in digest auth generator function
This commit is contained in:
1 parent
83dba52e96
commit
e26fffa761
1 file changed
+8
-1
+8
-1
@@ -109,7 +109,14 @@ export function digest(
|
|||||||
.update(httpMethod)
|
.update(httpMethod)
|
||||||
.update(":")
|
.update(":")
|
||||||
.update(uri);
|
.update(uri);
|
||||||
if (qop === "auth-int") ha2.update(":").update(body);
|
|
||||||
|
if (qop === "auth-int") {
|
||||||
|
const bodyHash = createHash("md5")
|
||||||
|
.update(body)
|
||||||
|
.digest("hex");
|
||||||
|
ha2.update(":").update(bodyHash);
|
||||||
|
}
|
||||||
|
|
||||||
const ha2d = ha2.digest("hex");
|
const ha2d = ha2.digest("hex");
|
||||||
|
|
||||||
const hash = createHash("md5");
|
const hash = createHash("md5");
|
||||||
|
|||||||
Reference in new issue
Block a user