diff --git a/daemon.py b/daemon.py index 10854bfd4..e7dbdf987 100644 --- a/daemon.py +++ b/daemon.py @@ -394,6 +394,12 @@ class PubServer(BaseHTTPRequestHandler): #TODO convert headers to dict headersDict={} headersDict['host']=self.headers['host'] + if messageJson.get('actor'): + actorDomain,actorPort=getDomainFromActor(messageJson['actor']) + if actorPort: + if actorPort!=80 and actorPort!=443: + actorDomain=actorDomain+':'+str(actorPort) + headersDict['host']=actorDomain headersDict['signature']=self.headers['signature'] if self.headers.get('Date'): headersDict['Date']=self.headers['Date'] diff --git a/httpsig.py b/httpsig.py index 5e001781c..3ae13d0e2 100644 --- a/httpsig.py +++ b/httpsig.py @@ -7,6 +7,8 @@ __maintainer__ = "Bob Mottram" __email__ = "bob@freedombone.net" __status__ = "Production" +# see https://tools.ietf.org/html/draft-cavage-http-signatures-06 + from Crypto.PublicKey import RSA from Crypto.Hash import SHA256 #from Crypto.Signature import PKCS1_v1_5