forked from indymedia/epicyon
webfinger acct uses domain without port
parent
8411b44721
commit
5e8e73f47b
|
@ -46,6 +46,8 @@ def webfingerHandle(session,handle: str,httpPrefix: str,cachedWebfingers: {}) ->
|
||||||
return None
|
return None
|
||||||
wfDomain=domain
|
wfDomain=domain
|
||||||
if ':' in wfDomain:
|
if ':' in wfDomain:
|
||||||
|
#wfPort=int(wfDomain.split(':')[1])
|
||||||
|
#if wfPort==80 or wfPort==443:
|
||||||
wfDomain=wfDomain.split(':')[0]
|
wfDomain=wfDomain.split(':')[0]
|
||||||
wf=getWebfingerFromCache(nickname+'@'+wfDomain,cachedWebfingers)
|
wf=getWebfingerFromCache(nickname+'@'+wfDomain,cachedWebfingers)
|
||||||
if wf:
|
if wf:
|
||||||
|
@ -89,6 +91,7 @@ def createWebfingerEndpoint(nickname: str,domain: str,port: int, \
|
||||||
httpPrefix: str,publicKeyPem) -> {}:
|
httpPrefix: str,publicKeyPem) -> {}:
|
||||||
"""Creates a webfinger endpoint for a user
|
"""Creates a webfinger endpoint for a user
|
||||||
"""
|
"""
|
||||||
|
originalDomain=domain
|
||||||
if port!=80 and port!=443:
|
if port!=80 and port!=443:
|
||||||
domain=domain+':'+str(port)
|
domain=domain+':'+str(port)
|
||||||
|
|
||||||
|
@ -126,7 +129,7 @@ def createWebfingerEndpoint(nickname: str,domain: str,port: int, \
|
||||||
"template": httpPrefix+"://"+domain+"/authorize_interaction?uri={uri}"
|
"template": httpPrefix+"://"+domain+"/authorize_interaction?uri={uri}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subject": "acct:"+nickname+"@"+domain
|
"subject": "acct:"+nickname+"@"+originalDomain
|
||||||
}
|
}
|
||||||
return account
|
return account
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue