From 81718e0ed49952e6c7b2a1d22483fddbce2377c3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 15 Jul 2020 15:06:57 +0100 Subject: [PATCH 1/5] Relative base bath --- webinterface.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webinterface.py b/webinterface.py index ad7db9acb..0324419ca 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2699,8 +2699,7 @@ def htmlProfile(defaultTimeline: str, httpPrefix + '://' + \ followerHandle.split('@')[1] + \ '/users/' + followerHandle.split('@')[0] - basePath = httpPrefix + '://' + domainFull + \ - '/users/' + nickname + basePath = '/users/' + nickname followApprovalsSection += '
' followApprovalsSection += \ '' From f6703325bd333a924f54f6ae5dce186c1290b7cf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 17 Jul 2020 10:19:26 +0100 Subject: [PATCH 2/5] Go straight to followers list after receiving follow approval notification --- epicyon-notification | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epicyon-notification b/epicyon-notification index 358d5f11b..0f7bd8fde 100755 --- a/epicyon-notification +++ b/epicyon-notification @@ -265,7 +265,7 @@ function notifications { cp "$epicyonFollowFile" "$epicyonFollowNotificationsFile" chown ${PROJECT_NAME}:${PROJECT_NAME} "$epicyonFollowNotificationsFile" - epicyonFollowMessage=$(notification_translate_text "New follow request")" ${EPICYON_DOMAIN_NAME}/users/${USERNAME}" + epicyonFollowMessage=$(notification_translate_text "New follow request")" ${EPICYON_DOMAIN_NAME}/users/${USERNAME}/followers" sendNotification "$USERNAME" "Epicyon" "$epicyonFollowMessage" fi fi From d34b1ef700d0d69fed76290c2cc426e2348e8187 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 18 Jul 2020 18:38:58 +0100 Subject: [PATCH 3/5] Quotes optional --- webinterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index 0324419ca..eb640354e 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2247,7 +2247,7 @@ def getFontFromCss(css: str) -> (str, str): """ if ' url(' not in css: return None, None - fontName = css.split(" url('")[1].split("')")[0] + fontName = css.split(" url(")[1].split(")")[0].replace("'", '') fontFormat = css.split(" format('")[1].split("')")[0] return fontName, fontFormat From ceb264a340e4d26dbdf66fcf65dc8d729f253a15 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 18 Jul 2020 19:26:05 +0100 Subject: [PATCH 4/5] debug --- daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index 7b6c81562..cd5a45097 100644 --- a/daemon.py +++ b/daemon.py @@ -1321,6 +1321,7 @@ class PubServer(BaseHTTPRequestHandler): # get fonts if htmlGET and '/fonts/' in self.path: fontStr = self.path.split('/fonts/')[1] + print('fontStr: ' + fontStr) if fontStr.endswith('.otf') or \ fontStr.endswith('.ttf') or \ fontStr.endswith('.woff') or \ @@ -1349,8 +1350,8 @@ class PubServer(BaseHTTPRequestHandler): return else: if os.path.isfile(fontFilename): - with open(fontFilename, 'rb') as avFile: - fontBinary = avFile.read() + with open(fontFilename, 'rb') as fontFile: + fontBinary = fontFile.read() self._set_headers_etag(fontFilename, fontType, fontBinary, cookie, From f85c08ac541b55a626d17fcc2a4ef2fb124eaafe Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 18 Jul 2020 20:23:32 +0100 Subject: [PATCH 5/5] No html check on fonts --- daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index cd5a45097..cf12ea415 100644 --- a/daemon.py +++ b/daemon.py @@ -1319,9 +1319,8 @@ class PubServer(BaseHTTPRequestHandler): return # get fonts - if htmlGET and '/fonts/' in self.path: + if '/fonts/' in self.path: fontStr = self.path.split('/fonts/')[1] - print('fontStr: ' + fontStr) if fontStr.endswith('.otf') or \ fontStr.endswith('.ttf') or \ fontStr.endswith('.woff') or \ @@ -1737,6 +1736,7 @@ class PubServer(BaseHTTPRequestHandler): '/emoji/' not in self.path and \ '/tags/' not in self.path and \ '/avatars/' not in self.path and \ + '/fonts/' not in self.path and \ '/icons/' not in self.path: divertToLoginScreen = True if self.path.startswith('/users/'):