mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
bd90c75f32
commit
3a902e6011
30
daemon.py
30
daemon.py
|
@ -708,10 +708,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
callingFunction)
|
callingFunction)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _secureMode(self, force: bool = False) -> bool:
|
def _secure_mode(self, force: bool = False) -> bool:
|
||||||
"""http authentication of GET requests for json
|
"""http authentication of GET requests for json
|
||||||
"""
|
"""
|
||||||
if not self.server.secureMode and not force:
|
if not self.server.secure_mode and not force:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
keyId = self._signedGETkeyId()
|
keyId = self._signedGETkeyId()
|
||||||
|
@ -9530,7 +9530,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showRepliesToPost',
|
'_GET', '_showRepliesToPost',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(repliesJson, ensure_ascii=False)
|
msg = json.dumps(repliesJson, ensure_ascii=False)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
protocolStr = 'application/json'
|
protocolStr = 'application/json'
|
||||||
|
@ -9622,7 +9622,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showRepliesToPost',
|
'_GET', '_showRepliesToPost',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(repliesJson,
|
msg = json.dumps(repliesJson,
|
||||||
ensure_ascii=False)
|
ensure_ascii=False)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -9732,7 +9732,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showRoles',
|
'_GET', '_showRoles',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
rolesList = getActorRolesList(actorJson)
|
rolesList = getActorRolesList(actorJson)
|
||||||
msg = json.dumps(rolesList,
|
msg = json.dumps(rolesList,
|
||||||
ensure_ascii=False)
|
ensure_ascii=False)
|
||||||
|
@ -9850,7 +9850,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showSkills',
|
'_GET', '_showSkills',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
actorSkillsList = \
|
actorSkillsList = \
|
||||||
getOccupationSkills(actorJson)
|
getOccupationSkills(actorJson)
|
||||||
skills = getSkillsFromList(actorSkillsList)
|
skills = getSkillsFromList(actorSkillsList)
|
||||||
|
@ -10012,7 +10012,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showPostFromFile',
|
'_GET', '_showPostFromFile',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
if not includeCreateWrapper and \
|
if not includeCreateWrapper and \
|
||||||
postJsonObject['type'] == 'Create' and \
|
postJsonObject['type'] == 'Create' and \
|
||||||
hasObjectDict(postJsonObject):
|
hasObjectDict(postJsonObject):
|
||||||
|
@ -11618,7 +11618,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showOutboxTimeline',
|
'_GET', '_showOutboxTimeline',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(outboxFeed,
|
msg = json.dumps(outboxFeed,
|
||||||
ensure_ascii=False)
|
ensure_ascii=False)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -11877,7 +11877,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(shares,
|
msg = json.dumps(shares,
|
||||||
ensure_ascii=False)
|
ensure_ascii=False)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -11997,7 +11997,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(following,
|
msg = json.dumps(following,
|
||||||
ensure_ascii=False).encode('utf-8')
|
ensure_ascii=False).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -12117,7 +12117,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
msg = json.dumps(followers,
|
msg = json.dumps(followers,
|
||||||
ensure_ascii=False).encode('utf-8')
|
ensure_ascii=False).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -12250,7 +12250,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_showPersonProfile',
|
'_GET', '_showPersonProfile',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
else:
|
else:
|
||||||
if self._secureMode():
|
if self._secure_mode():
|
||||||
acceptStr = self.headers['Accept']
|
acceptStr = self.headers['Accept']
|
||||||
msgStr = json.dumps(actorJson, ensure_ascii=False)
|
msgStr = json.dumps(actorJson, ensure_ascii=False)
|
||||||
msg = msgStr.encode('utf-8')
|
msg = msgStr.encode('utf-8')
|
||||||
|
@ -16320,7 +16320,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self._secureMode():
|
if not self._secure_mode():
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('WARN: Unauthorized GET')
|
print('WARN: Unauthorized GET')
|
||||||
self._404()
|
self._404()
|
||||||
|
@ -18475,7 +18475,7 @@ def runDaemon(content_license_url: str,
|
||||||
http_prefix: str = 'https',
|
http_prefix: str = 'https',
|
||||||
fed_list: [] = [],
|
fed_list: [] = [],
|
||||||
max_mentions: int = 10, max_emoji: int = 10,
|
max_mentions: int = 10, max_emoji: int = 10,
|
||||||
secureMode: bool = False,
|
secure_mode: bool = False,
|
||||||
proxyType: str = None, maxReplies: int = 64,
|
proxyType: str = None, maxReplies: int = 64,
|
||||||
domainMaxPostsPerDay: int = 8640,
|
domainMaxPostsPerDay: int = 8640,
|
||||||
accountMaxPostsPerDay: int = 864,
|
accountMaxPostsPerDay: int = 864,
|
||||||
|
@ -18718,7 +18718,7 @@ def runDaemon(content_license_url: str,
|
||||||
httpd.outboxThreadIndex = {}
|
httpd.outboxThreadIndex = {}
|
||||||
httpd.newPostThread = {}
|
httpd.newPostThread = {}
|
||||||
httpd.project_version = project_version
|
httpd.project_version = project_version
|
||||||
httpd.secureMode = secureMode
|
httpd.secure_mode = secure_mode
|
||||||
# max POST size of 30M
|
# max POST size of 30M
|
||||||
httpd.maxPostLength = 1024 * 1024 * 30
|
httpd.maxPostLength = 1024 * 1024 * 30
|
||||||
httpd.maxMediaSize = httpd.maxPostLength
|
httpd.maxMediaSize = httpd.maxPostLength
|
||||||
|
|
72
epicyon.py
72
epicyon.py
|
@ -428,7 +428,7 @@ parser.add_argument("--debug", type=str2bool, nargs='?',
|
||||||
parser.add_argument("--notificationSounds", type=str2bool, nargs='?',
|
parser.add_argument("--notificationSounds", type=str2bool, nargs='?',
|
||||||
const=True, default=True,
|
const=True, default=True,
|
||||||
help="Play notification sounds")
|
help="Play notification sounds")
|
||||||
parser.add_argument("--secureMode", type=str2bool, nargs='?',
|
parser.add_argument("--secure_mode", type=str2bool, nargs='?',
|
||||||
const=True, default=False,
|
const=True, default=False,
|
||||||
help="Requires all GET requests to be signed, " +
|
help="Requires all GET requests to be signed, " +
|
||||||
"so that the sender can be identifies and " +
|
"so that the sender can be identifies and " +
|
||||||
|
@ -766,7 +766,7 @@ if args.postDomains:
|
||||||
originDomain = getConfigParam(base_dir, 'domain')
|
originDomain = getConfigParam(base_dir, 'domain')
|
||||||
else:
|
else:
|
||||||
originDomain = args.domain
|
originDomain = args.domain
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, originDomain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, originDomain)
|
||||||
domainList = getPublicPostDomains(None,
|
domainList = getPublicPostDomains(None,
|
||||||
base_dir, nickname, domain,
|
base_dir, nickname, domain,
|
||||||
|
@ -814,7 +814,7 @@ if args.postDomainsBlocked:
|
||||||
if not args.language:
|
if not args.language:
|
||||||
args.language = 'en'
|
args.language = 'en'
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
domainList = getPublicPostDomainsBlocked(None,
|
domainList = getPublicPostDomainsBlocked(None,
|
||||||
base_dir, nickname, domain,
|
base_dir, nickname, domain,
|
||||||
|
@ -859,7 +859,7 @@ if args.checkDomains:
|
||||||
if not args.language:
|
if not args.language:
|
||||||
args.language = 'en'
|
args.language = 'en'
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
checkDomains(None,
|
checkDomains(None,
|
||||||
base_dir, nickname, domain,
|
base_dir, nickname, domain,
|
||||||
|
@ -887,7 +887,7 @@ if args.socnet:
|
||||||
if args.domain:
|
if args.domain:
|
||||||
domain = args.domain
|
domain = args.domain
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
dotGraph = instancesGraph(base_dir, args.socnet,
|
dotGraph = instancesGraph(base_dir, args.socnet,
|
||||||
proxyType, args.port,
|
proxyType, args.port,
|
||||||
|
@ -1189,7 +1189,7 @@ if args.approve:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
manualApproveFollowRequest(session, base_dir,
|
manualApproveFollowRequest(session, base_dir,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
|
@ -1217,7 +1217,7 @@ if args.deny:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
manualDenyFollowRequest(session, base_dir,
|
manualDenyFollowRequest(session, base_dir,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
|
@ -1310,7 +1310,7 @@ if args.message:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending post to ' + args.sendto)
|
print('Sending post to ' + args.sendto)
|
||||||
|
|
||||||
|
@ -1348,7 +1348,7 @@ if args.announce:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending announce/repeat of ' + args.announce)
|
print('Sending announce/repeat of ' + args.announce)
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ if args.box:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
session = createSession(proxyType)
|
session = createSession(proxyType)
|
||||||
|
@ -1453,7 +1453,7 @@ if args.itemName:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending shared item: ' + args.itemName)
|
print('Sending shared item: ' + args.itemName)
|
||||||
|
|
||||||
|
@ -1496,7 +1496,7 @@ if args.undoItemName:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo of shared item: ' + args.undoItemName)
|
print('Sending undo of shared item: ' + args.undoItemName)
|
||||||
|
|
||||||
|
@ -1558,7 +1558,7 @@ if args.wantedItemName:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending wanted item: ' + args.wantedItemName)
|
print('Sending wanted item: ' + args.wantedItemName)
|
||||||
|
|
||||||
|
@ -1601,7 +1601,7 @@ if args.undoWantedItemName:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo of wanted item: ' + args.undoWantedItemName)
|
print('Sending undo of wanted item: ' + args.undoWantedItemName)
|
||||||
|
|
||||||
|
@ -1635,7 +1635,7 @@ if args.like:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending like of ' + args.like)
|
print('Sending like of ' + args.like)
|
||||||
|
|
||||||
|
@ -1674,7 +1674,7 @@ if args.react:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending emoji reaction ' + args.emoji + ' to ' + args.react)
|
print('Sending emoji reaction ' + args.emoji + ' to ' + args.react)
|
||||||
|
|
||||||
|
@ -1707,7 +1707,7 @@ if args.undolike:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo like of ' + args.undolike)
|
print('Sending undo like of ' + args.undolike)
|
||||||
|
|
||||||
|
@ -1747,7 +1747,7 @@ if args.undoreact:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo emoji reaction ' + args.emoji + ' to ' + args.react)
|
print('Sending undo emoji reaction ' + args.emoji + ' to ' + args.react)
|
||||||
|
|
||||||
|
@ -1781,7 +1781,7 @@ if args.bookmark:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending bookmark of ' + args.bookmark)
|
print('Sending bookmark of ' + args.bookmark)
|
||||||
|
|
||||||
|
@ -1815,7 +1815,7 @@ if args.unbookmark:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo bookmark of ' + args.unbookmark)
|
print('Sending undo bookmark of ' + args.unbookmark)
|
||||||
|
|
||||||
|
@ -1848,7 +1848,7 @@ if args.delete:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending delete request of ' + args.delete)
|
print('Sending delete request of ' + args.delete)
|
||||||
|
|
||||||
|
@ -1893,7 +1893,7 @@ if args.follow:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
sendFollowRequestViaServer(base_dir, session,
|
sendFollowRequestViaServer(base_dir, session,
|
||||||
|
@ -1939,7 +1939,7 @@ if args.unfollow:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
sendUnfollowRequestViaServer(base_dir, session,
|
sendUnfollowRequestViaServer(base_dir, session,
|
||||||
|
@ -1974,7 +1974,7 @@ if args.followingList:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
followingJson = \
|
followingJson = \
|
||||||
|
@ -2007,7 +2007,7 @@ if args.followersList:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
followersJson = \
|
followersJson = \
|
||||||
|
@ -2041,7 +2041,7 @@ if args.followRequestsList:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
|
|
||||||
followRequestsJson = \
|
followRequestsJson = \
|
||||||
|
@ -2093,7 +2093,7 @@ if args.migrations:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
ctr = migrateAccounts(base_dir, session,
|
ctr = migrateAccounts(base_dir, session,
|
||||||
http_prefix, cachedWebfingers,
|
http_prefix, cachedWebfingers,
|
||||||
|
@ -2195,7 +2195,7 @@ if args.followers:
|
||||||
hostDomain = args.domain
|
hostDomain = args.domain
|
||||||
handle = nickname + '@' + domain
|
handle = nickname + '@' + domain
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
wfRequest = webfingerHandle(session, handle,
|
wfRequest = webfingerHandle(session, handle,
|
||||||
http_prefix, cachedWebfingers,
|
http_prefix, cachedWebfingers,
|
||||||
|
@ -2243,7 +2243,7 @@ if args.followers:
|
||||||
'Accept': 'application/ld+json; profile="' + profileStr + '"'
|
'Accept': 'application/ld+json; profile="' + profileStr + '"'
|
||||||
}
|
}
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
followersList = \
|
followersList = \
|
||||||
downloadFollowCollection(signingPrivateKeyPem,
|
downloadFollowCollection(signingPrivateKeyPem,
|
||||||
|
@ -2501,7 +2501,7 @@ if args.skill:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending ' + args.skill + ' skill level ' +
|
print('Sending ' + args.skill + ' skill level ' +
|
||||||
str(args.skillLevelPercent) + ' for ' + nickname)
|
str(args.skillLevelPercent) + ' for ' + nickname)
|
||||||
|
@ -2536,7 +2536,7 @@ if args.availability:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending availability status of ' + nickname +
|
print('Sending availability status of ' + nickname +
|
||||||
' as ' + args.availability)
|
' as ' + args.availability)
|
||||||
|
@ -2650,7 +2650,7 @@ if args.block:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending block of ' + args.block)
|
print('Sending block of ' + args.block)
|
||||||
|
|
||||||
|
@ -2682,7 +2682,7 @@ if args.mute:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending mute of ' + args.mute)
|
print('Sending mute of ' + args.mute)
|
||||||
|
|
||||||
|
@ -2714,7 +2714,7 @@ if args.unmute:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo mute of ' + args.unmute)
|
print('Sending undo mute of ' + args.unmute)
|
||||||
|
|
||||||
|
@ -2758,7 +2758,7 @@ if args.unblock:
|
||||||
if not domain:
|
if not domain:
|
||||||
domain = getConfigParam(base_dir, 'domain')
|
domain = getConfigParam(base_dir, 'domain')
|
||||||
signingPrivateKeyPem = None
|
signingPrivateKeyPem = None
|
||||||
if args.secureMode:
|
if args.secure_mode:
|
||||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||||
print('Sending undo block of ' + args.unblock)
|
print('Sending undo block of ' + args.unblock)
|
||||||
|
|
||||||
|
@ -3252,7 +3252,7 @@ if __name__ == "__main__":
|
||||||
args.twitter_replacement_domain,
|
args.twitter_replacement_domain,
|
||||||
port, proxy_port, http_prefix,
|
port, proxy_port, http_prefix,
|
||||||
federationList, args.max_mentions,
|
federationList, args.max_mentions,
|
||||||
args.max_emoji, args.secureMode,
|
args.max_emoji, args.secure_mode,
|
||||||
proxyType, args.maxReplies,
|
proxyType, args.maxReplies,
|
||||||
args.domainMaxPostsPerDay,
|
args.domainMaxPostsPerDay,
|
||||||
args.accountMaxPostsPerDay,
|
args.accountMaxPostsPerDay,
|
||||||
|
|
Loading…
Reference in New Issue