Get referer domain from signature

main
Bob Mottram 2021-09-12 13:47:18 +01:00
parent f3aac82b56
commit 8406b8042b
1 changed files with 9 additions and 0 deletions

View File

@ -11644,6 +11644,15 @@ class PubServer(BaseHTTPRequestHandler):
refererDomain, refererPort = \ refererDomain, refererPort = \
getDomainFromActor(self.headers['Referer']) getDomainFromActor(self.headers['Referer'])
refererDomain = getFullDomain(refererDomain, refererPort) refererDomain = getFullDomain(refererDomain, refererPort)
elif self.headers.get('Signature'):
if 'keyId="' in self.headers['Signature']:
refererDomain = self.headers['Signature'].split('keyId="')[1]
if '/' in refererDomain:
refererDomain = refererDomain.split('/')[0]
elif '#' in refererDomain:
refererDomain = refererDomain.split('#')[0]
elif '"' in refererDomain:
refererDomain = refererDomain.split('"')[0]
elif uaStr: elif uaStr:
if '+https://' in uaStr: if '+https://' in uaStr:
refererDomain = \ refererDomain = \