mirror of https://gitlab.com/bashrc2/epicyon
Fix another port number bug
parent
7084a2059f
commit
d853ba1978
11
httpsig.py
11
httpsig.py
|
@ -22,6 +22,7 @@ except ImportError:
|
||||||
import base64
|
import base64
|
||||||
from time import gmtime, strftime
|
from time import gmtime, strftime
|
||||||
import datetime
|
import datetime
|
||||||
|
from utils import getFullDomain
|
||||||
|
|
||||||
|
|
||||||
def messageContentDigest(messageBodyJsonStr: str) -> str:
|
def messageContentDigest(messageBodyJsonStr: str) -> str:
|
||||||
|
@ -40,15 +41,9 @@ def signPostHeaders(dateStr: str, privateKeyPem: str,
|
||||||
"""Returns a raw signature string that can be plugged into a header and
|
"""Returns a raw signature string that can be plugged into a header and
|
||||||
used to verify the authenticity of an HTTP transmission.
|
used to verify the authenticity of an HTTP transmission.
|
||||||
"""
|
"""
|
||||||
if port:
|
domain = getFullDomain(domain, port)
|
||||||
if port != 80 and port != 443:
|
|
||||||
if ':' not in domain:
|
|
||||||
domain = domain + ':' + str(port)
|
|
||||||
|
|
||||||
if toPort:
|
toDomain = getFullDomain(toDomain, toPort)
|
||||||
if toPort != 80 and toPort != 443:
|
|
||||||
if ':' not in toDomain:
|
|
||||||
toDomain = toDomain + ':' + str(port)
|
|
||||||
|
|
||||||
if not dateStr:
|
if not dateStr:
|
||||||
dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
|
dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
|
||||||
|
|
|
@ -10,6 +10,7 @@ from session import createSession
|
||||||
from webfinger import webfingerHandle
|
from webfinger import webfingerHandle
|
||||||
from posts import getPersonBox
|
from posts import getPersonBox
|
||||||
from posts import getPostDomains
|
from posts import getPostDomains
|
||||||
|
from utils import getFullDomain
|
||||||
|
|
||||||
|
|
||||||
def instancesGraph(baseDir: str, handles: str,
|
def instancesGraph(baseDir: str, handles: str,
|
||||||
|
@ -46,11 +47,7 @@ def instancesGraph(baseDir: str, handles: str,
|
||||||
nickname = handle.split('@')[0]
|
nickname = handle.split('@')[0]
|
||||||
domain = handle.split('@')[1]
|
domain = handle.split('@')[1]
|
||||||
|
|
||||||
domainFull = domain
|
domainFull = getFullDomain(domain, port)
|
||||||
if port:
|
|
||||||
if port != 80 and port != 443:
|
|
||||||
if ':' not in domain:
|
|
||||||
domainFull = domain + ':' + str(port)
|
|
||||||
handle = httpPrefix + "://" + domainFull + "/@" + nickname
|
handle = httpPrefix + "://" + domainFull + "/@" + nickname
|
||||||
wfRequest = \
|
wfRequest = \
|
||||||
webfingerHandle(session, handle, httpPrefix,
|
webfingerHandle(session, handle, httpPrefix,
|
||||||
|
|
Loading…
Reference in New Issue