Skip to content

Commit

Permalink
fix: return empty string when request isn't signed #172
Browse files Browse the repository at this point in the history
  • Loading branch information
fauno committed Jul 4, 2024
1 parent e66c306 commit cc72c3d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/apsystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ export default class ActivityPubSystem {
async verifySignedRequest (request: FastifyRequest, fromActor?: string): Promise<string> {
// TODO: Fetch and verify Digest header
const { url, method, headers } = request

if (!headers.signature) {
return new Promise((resolve, reject) => resolve(""))
}

const signature = signatureParser.parse({ url, method, headers })
const { keyId } = signature

Expand Down

0 comments on commit cc72c3d

Please sign in to comment.