mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Snake case
							parent
							
								
									8f97b42fd4
								
							
						
					
					
						commit
						fc98441a40
					
				| 
						 | 
				
			
			@ -268,7 +268,7 @@ from utils import getOccupationName
 | 
			
		|||
from utils import setOccupationName
 | 
			
		||||
from utils import loadTranslationsFromFile
 | 
			
		||||
from utils import getLocalNetworkAddresses
 | 
			
		||||
from utils import decodedHost
 | 
			
		||||
from utils import decoded_host
 | 
			
		||||
from utils import isPublicPost
 | 
			
		||||
from utils import get_locked_account
 | 
			
		||||
from utils import has_users_path
 | 
			
		||||
| 
						 | 
				
			
			@ -13312,7 +13312,7 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
        callingDomain = self.server.domain_full
 | 
			
		||||
 | 
			
		||||
        if self.headers.get('Host'):
 | 
			
		||||
            callingDomain = decodedHost(self.headers['Host'])
 | 
			
		||||
            callingDomain = decoded_host(self.headers['Host'])
 | 
			
		||||
            if self.server.onion_domain:
 | 
			
		||||
                if callingDomain != self.server.domain and \
 | 
			
		||||
                   callingDomain != self.server.domain_full and \
 | 
			
		||||
| 
						 | 
				
			
			@ -16369,7 +16369,7 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
    def do_HEAD(self):
 | 
			
		||||
        callingDomain = self.server.domain_full
 | 
			
		||||
        if self.headers.get('Host'):
 | 
			
		||||
            callingDomain = decodedHost(self.headers['Host'])
 | 
			
		||||
            callingDomain = decoded_host(self.headers['Host'])
 | 
			
		||||
            if self.server.onion_domain:
 | 
			
		||||
                if callingDomain != self.server.domain and \
 | 
			
		||||
                   callingDomain != self.server.domain_full and \
 | 
			
		||||
| 
						 | 
				
			
			@ -17483,7 +17483,7 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
 | 
			
		||||
        callingDomain = self.server.domain_full
 | 
			
		||||
        if self.headers.get('Host'):
 | 
			
		||||
            callingDomain = decodedHost(self.headers['Host'])
 | 
			
		||||
            callingDomain = decoded_host(self.headers['Host'])
 | 
			
		||||
            if self.server.onion_domain:
 | 
			
		||||
                if callingDomain != self.server.domain and \
 | 
			
		||||
                   callingDomain != self.server.domain_full and \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								tests.py
								
								
								
								
							
							
						
						
									
										10
									
								
								tests.py
								
								
								
								
							| 
						 | 
				
			
			@ -68,7 +68,7 @@ from utils import dateSecondsToString
 | 
			
		|||
from utils import validPassword
 | 
			
		||||
from utils import userAgentDomain
 | 
			
		||||
from utils import camelCaseSplit
 | 
			
		||||
from utils import decodedHost
 | 
			
		||||
from utils import decoded_host
 | 
			
		||||
from utils import getFullDomain
 | 
			
		||||
from utils import validNickname
 | 
			
		||||
from utils import firstParagraphFromString
 | 
			
		||||
| 
						 | 
				
			
			@ -4865,13 +4865,13 @@ def _testMastoApi():
 | 
			
		|||
def _testDomainHandling():
 | 
			
		||||
    print('testDomainHandling')
 | 
			
		||||
    testDomain = 'localhost'
 | 
			
		||||
    assert decodedHost(testDomain) == testDomain
 | 
			
		||||
    assert decoded_host(testDomain) == testDomain
 | 
			
		||||
    testDomain = '127.0.0.1:60'
 | 
			
		||||
    assert decodedHost(testDomain) == testDomain
 | 
			
		||||
    assert decoded_host(testDomain) == testDomain
 | 
			
		||||
    testDomain = '192.168.5.153'
 | 
			
		||||
    assert decodedHost(testDomain) == testDomain
 | 
			
		||||
    assert decoded_host(testDomain) == testDomain
 | 
			
		||||
    testDomain = 'xn--espaa-rta.icom.museum'
 | 
			
		||||
    assert decodedHost(testDomain) == "españa.icom.museum"
 | 
			
		||||
    assert decoded_host(testDomain) == "españa.icom.museum"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _testPrepareHtmlPostNickname():
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue