Skip to content

Commit

Permalink
Update src/auth/auth.middleware.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Mohsin Zaidi <[email protected]>
  • Loading branch information
ukstv and smrz2001 authored Jul 5, 2024
1 parent c7d48ea commit 97f3e4d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/auth/auth.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ export function auth(opts: AuthOpts): Handler {
const body = req.body
const contentType = req.header('Content-Type')
const digestCalculated = buildBodyDigest(contentType, body)
const isCorrectDigest = digestCalculated == digest
if (!isCorrectDigest) {
if (digestCalculated !== digest) {
logger?.verbose(`Disallowed: Incorrect digest for DID ${did}`)
return disallow(res, DISALLOW_REASON.DID_ALLOWLIST_INVALID_DIGEST)
}
Expand Down

0 comments on commit 97f3e4d

Please sign in to comment.