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
 | 
			
		||||
from time import gmtime, strftime
 | 
			
		||||
import datetime
 | 
			
		||||
from utils import getFullDomain
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
    used to verify the authenticity of an HTTP transmission.
 | 
			
		||||
    """
 | 
			
		||||
    if port:
 | 
			
		||||
        if port != 80 and port != 443:
 | 
			
		||||
            if ':' not in domain:
 | 
			
		||||
                domain = domain + ':' + str(port)
 | 
			
		||||
    domain = getFullDomain(domain, port)
 | 
			
		||||
 | 
			
		||||
    if toPort:
 | 
			
		||||
        if toPort != 80 and toPort != 443:
 | 
			
		||||
            if ':' not in toDomain:
 | 
			
		||||
                toDomain = toDomain + ':' + str(port)
 | 
			
		||||
    toDomain = getFullDomain(toDomain, toPort)
 | 
			
		||||
 | 
			
		||||
    if not dateStr:
 | 
			
		||||
        dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@ from session import createSession
 | 
			
		|||
from webfinger import webfingerHandle
 | 
			
		||||
from posts import getPersonBox
 | 
			
		||||
from posts import getPostDomains
 | 
			
		||||
from utils import getFullDomain
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def instancesGraph(baseDir: str, handles: str,
 | 
			
		||||
| 
						 | 
				
			
			@ -46,11 +47,7 @@ def instancesGraph(baseDir: str, handles: str,
 | 
			
		|||
        nickname = handle.split('@')[0]
 | 
			
		||||
        domain = handle.split('@')[1]
 | 
			
		||||
 | 
			
		||||
        domainFull = domain
 | 
			
		||||
        if port:
 | 
			
		||||
            if port != 80 and port != 443:
 | 
			
		||||
                if ':' not in domain:
 | 
			
		||||
                    domainFull = domain + ':' + str(port)
 | 
			
		||||
        domainFull = getFullDomain(domain, port)
 | 
			
		||||
        handle = httpPrefix + "://" + domainFull + "/@" + nickname
 | 
			
		||||
        wfRequest = \
 | 
			
		||||
            webfingerHandle(session, handle, httpPrefix,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue