diff --git a/README.md b/README.md
index 9d530e8f7..548807b5b 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Add issues on https://gitlab.com/bashrc2/epicyon/-/issues
Epicyon, meaning "more than a dog". Largest of the Borophaginae which lived in North America 20-5 million years ago.
-
+
diff --git a/daemon.py b/daemon.py
index 77642227b..f3ffefb95 100644
--- a/daemon.py
+++ b/daemon.py
@@ -117,9 +117,9 @@ from webapp_utils import setBlogAddress
from webapp_utils import getBlogAddress
from webapp_calendar import htmlCalendarDeleteConfirm
from webapp_calendar import htmlCalendar
+from webapp_about import htmlAbout
from webapp import htmlFollowingList
from webapp import htmlDeletePost
-from webapp import htmlAbout
from webapp import htmlRemoveSharedItem
from webapp import htmlUnblockConfirm
from webapp_person_options import htmlPersonOptions
@@ -133,16 +133,15 @@ from webapp_timeline import htmlInboxMedia
from webapp_timeline import htmlInboxBlogs
from webapp_timeline import htmlInboxNews
from webapp_timeline import htmlOutbox
-from webapp_timeline import htmlModeration
+from webapp_moderation import htmlModeration
+from webapp_moderation import htmlModerationInfo
from webapp_create_post import htmlNewPost
-from webapp import htmlLogin
-from webapp import htmlSuspended
-from webapp import htmlGetLoginCredentials
+from webapp_login import htmlLogin
+from webapp_login import htmlGetLoginCredentials
+from webapp_suspended import htmlSuspended
+from webapp_tos import htmlTermsOfService
from webapp import htmlFollowConfirm
from webapp import htmlUnfollowConfirm
-from webapp import htmlEditNewsPost
-from webapp import htmlTermsOfService
-from webapp import htmlModerationInfo
from webapp import htmlHashtagBlocked
from webapp_post import htmlPostReplies
from webapp_post import htmlIndividualPost
@@ -154,6 +153,7 @@ from webapp_column_left import htmlEditLinks
from webapp_column_right import htmlNewswireMobile
from webapp_column_right import htmlEditNewswire
from webapp_column_right import htmlCitations
+from webapp_column_right import htmlEditNewsPost
from webapp_search import htmlSkillsSearch
from webapp_search import htmlHistorySearch
from webapp_search import htmlHashtagSearch
@@ -166,6 +166,7 @@ from shares import getSharesFeedForPerson
from shares import addShare
from shares import removeShare
from shares import expireShares
+from utils import getCSS
from utils import firstParagraphFromString
from utils import clearFromPostCaches
from utils import containsInvalidChars
@@ -191,6 +192,7 @@ from utils import isSuspended
from manualapprove import manualDenyFollowRequest
from manualapprove import manualApproveFollowRequest
from announce import createAnnounce
+from content import dangerousMarkup
from content import replaceEmojiFromTags
from content import addHtmlTags
from content import extractMediaInFormPOST
@@ -2891,10 +2893,13 @@ class PubServer(BaseHTTPRequestHandler):
return
linksFilename = baseDir + '/accounts/links.txt'
+ aboutFilename = baseDir + '/accounts/about.txt'
+ TOSFilename = baseDir + '/accounts/tos.txt'
# extract all of the text fields into a dict
fields = \
extractTextFieldsInPOST(postBytes, boundary, debug)
+
if fields.get('editedLinks'):
linksStr = fields['editedLinks']
linksFile = open(linksFilename, "w+")
@@ -2905,6 +2910,31 @@ class PubServer(BaseHTTPRequestHandler):
if os.path.isfile(linksFilename):
os.remove(linksFilename)
+ adminNickname = \
+ getConfigParam(baseDir, 'admin')
+ if nickname == adminNickname:
+ if fields.get('editedAbout'):
+ aboutStr = fields['editedAbout']
+ if not dangerousMarkup(aboutStr):
+ aboutFile = open(aboutFilename, "w+")
+ if aboutFile:
+ aboutFile.write(aboutStr)
+ aboutFile.close()
+ else:
+ if os.path.isfile(aboutFilename):
+ os.remove(aboutFilename)
+
+ if fields.get('editedTOS'):
+ TOSStr = fields['editedTOS']
+ if not dangerousMarkup(TOSStr):
+ TOSFile = open(TOSFilename, "w+")
+ if TOSFile:
+ TOSFile.write(TOSStr)
+ TOSFile.close()
+ else:
+ if os.path.isfile(TOSFilename):
+ os.remove(TOSFilename)
+
# redirect back to the default timeline
if callingDomain.endswith('.onion') and \
onionDomain:
@@ -4678,7 +4708,8 @@ class PubServer(BaseHTTPRequestHandler):
emailAddress = getEmailAddress(actorJson)
PGPpubKey = getPGPpubKey(actorJson)
PGPfingerprint = getPGPfingerprint(actorJson)
- msg = htmlPersonOptions(self.server.cssCache,
+ msg = htmlPersonOptions(self.server.defaultTimeline,
+ self.server.cssCache,
self.server.translate,
baseDir, domain,
domainFull,
@@ -8250,8 +8281,9 @@ class PubServer(BaseHTTPRequestHandler):
tries = 0
while tries < 5:
try:
- with open(path, 'r') as cssfile:
- css = cssfile.read()
+ css = getCSS(self.server.baseDir, path,
+ self.server.cssCache)
+ if css:
break
except Exception as e:
print(e)
diff --git a/default_tos.txt b/default_tos.txt
index 1004961e6..176240893 100644
--- a/default_tos.txt
+++ b/default_tos.txt
@@ -26,7 +26,7 @@
This system will not federate with instances whose moderation policy is incompatible with the content policy described above. If an instance lacks a moderation policy, or refuses to enforce one, it will be assumed to be incompatible.
-
Use of Data for Research Purposes
+
Use of User Generated Content for Research
Data may not be "scraped" or otherwise obtained from this instance and used for academic research or cited within research publications without the prior written permission of the administrator. Financial remedy will be sought through the courts from any researcher publishing data obtained from this instance without consent.
diff --git a/epicyon-options.css b/epicyon-options.css
index 7886378e6..9e27a2bc1 100644
--- a/epicyon-options.css
+++ b/epicyon-options.css
@@ -33,6 +33,7 @@
--follow-text-size2: 40px;
--follow-text-entry-width: 90%;
--focus-color: white;
+ --petname-width-chars: 16ch;
}
@font-face {
@@ -139,6 +140,7 @@ a:focus {
input[type=text] {
width: var(--follow-text-entry-width);
clear: both;
+ min-width: var(--petname-width-chars);
font-size: 24px;
text-align: center;
color: var(--text-entry-foreground);
@@ -216,6 +218,7 @@ a:focus {
clear: both;
font-size: 40px;
text-align: center;
+ min-width: var(--petname-width-chars);
color: var(--text-entry-foreground);
background-color: var(--text-entry-background);
font-family: Arial, Helvetica, sans-serif;
diff --git a/img/screenshot_starlight.jpg b/img/screenshot_starlight.jpg
new file mode 100644
index 000000000..516662b2c
Binary files /dev/null and b/img/screenshot_starlight.jpg differ
diff --git a/webapp.py b/webapp.py
index f51ff06ff..02061882b 100644
--- a/webapp.py
+++ b/webapp.py
@@ -6,17 +6,13 @@ __maintainer__ = "Bob Mottram"
__email__ = "bob@freedombone.net"
__status__ = "Production"
-import time
import os
from shutil import copyfile
from utils import getCSS
from utils import getNicknameFromActor
from utils import getDomainFromActor
from utils import locatePost
-from utils import noOfAccounts
from utils import loadJson
-from utils import getConfigParam
-from posts import isEditor
from shares import getValidSharedItemID
from webapp_utils import getAltPath
from webapp_utils import getIconsDir
@@ -51,395 +47,6 @@ def htmlFollowingList(cssCache: {}, baseDir: str,
return ''
-def htmlModerationInfo(cssCache: {}, translate: {},
- baseDir: str, httpPrefix: str) -> str:
- msgStr1 = \
- 'These are globally blocked for all accounts on this instance'
- msgStr2 = \
- 'Any blocks or suspensions made by moderators will be shown here.'
- infoForm = ''
- cssFilename = baseDir + '/epicyon-profile.css'
- if os.path.isfile(baseDir + '/epicyon.css'):
- cssFilename = baseDir + '/epicyon.css'
-
- infoCSS = getCSS(baseDir, cssFilename, cssCache)
- if infoCSS:
- if httpPrefix != 'https':
- infoCSS = infoCSS.replace('https://',
- httpPrefix + '://')
- infoForm = htmlHeader(cssFilename, infoCSS)
-
- infoForm += \
- '