diff --git a/daemon.py b/daemon.py index 5e332c74..9d21dfd7 100644 --- a/daemon.py +++ b/daemon.py @@ -1697,7 +1697,7 @@ class PubServer(BaseHTTPRequestHandler): self._write(msg.encode('utf-8')) return - if self.path.startswith('/about'): + if self.path.endswith('/about'): if callingDomain.endswith('.onion'): msg = \ htmlAbout(self.server.baseDir, 'http', diff --git a/webinterface.py b/webinterface.py index f57c63a7..5095074d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1730,28 +1730,27 @@ def htmlAbout(baseDir: str, httpPrefix: str, aboutText = 'Information about this instance goes here.' if os.path.isfile(baseDir + '/accounts/about.txt'): - with open(baseDir + '/accounts/about.txt', 'r') as file: - aboutText = file.read() + with open(baseDir + '/accounts/about.txt', 'r') as aboutFile: + aboutText = aboutFile.read() aboutForm = '' cssFilename = baseDir + '/epicyon-profile.css' if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' with open(cssFilename, 'r') as cssFile: - termsCSS = cssFile.read() + aboutCSS = cssFile.read() if httpPrefix != 'http': - termsCSS = termsCSS.replace('https://', + aboutCSS = aboutCSS.replace('https://', httpPrefix + '://') - aboutForm = htmlHeader(cssFilename, termsCSS) + aboutForm = htmlHeader(cssFilename, aboutCSS) aboutForm += '
' + aboutText + '
' if onionDomain: aboutForm += \ '

' + \ 'http://' + onionDomain + '

' if adminNickname: - adminActor = \ - httpPrefix + '://' + domainFull + '/users/' + adminNickname + adminActor = '/users/' + adminNickname aboutForm += \ '
' + \ '

Administered by