mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-04-11 15:08:20 +02:00
test: fixed improper signed_string reconstruction in .verify()
This commit is contained in:
@@ -136,7 +136,7 @@ ActivityPub.verify = async (req) => {
|
||||
// Re-construct signature string
|
||||
const signed_string = headers.split(' ').reduce((memo, cur) => {
|
||||
if (cur === '(request-target)') {
|
||||
memo.push(`${cur}: ${String(req.method).toLowerCase()} ${req.path}`);
|
||||
memo.push(`${cur}: ${String(req.method).toLowerCase()} ${req.baseUrl}${req.path}`);
|
||||
} else if (req.headers.hasOwnProperty(cur)) {
|
||||
memo.push(`${cur}: ${req.headers[cur]}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user