Remove unneeded line in HTTP sig verification code
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Anthony Wang 2023-02-01 19:03:46 +00:00
parent 8b59f21073
commit 71deeb9bbc
Signed by: a
GPG key ID: 42A5B952E6DD8D38

View file

@ -239,7 +239,6 @@ class ActivityPubHandler(SimpleHTTPRequestHandler):
# Verify HTTP signature
signature = search('signature="(.*?)"', self.headers['Signature']).group(1)
pubkey.verify(b64decode(signature), message[:-1].encode('utf8'), padding.PKCS1v15(), hashes.SHA256())
actor = keyid.removesuffix('#main-key')
# Make sure activity doer matches HTTP signature
if ('actor' in activity and activity['actor'] != signer['id']) or \
('attributedTo' in activity and activity['attributedTo'] != signer['id']) or \