diff --git a/announce.py b/announce.py index c523ecf9d..128e70f5e 100644 --- a/announce.py +++ b/announce.py @@ -261,9 +261,11 @@ def sendAnnounceViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -344,9 +346,11 @@ def sendUndoAnnounceViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, diff --git a/availability.py b/availability.py index b23cd0227..25e338e16 100644 --- a/availability.py +++ b/availability.py @@ -122,9 +122,11 @@ def sendAvailabilityViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, nickname, diff --git a/bookmarks.py b/bookmarks.py index fa9fbb86e..d113d9cf0 100644 --- a/bookmarks.py +++ b/bookmarks.py @@ -398,8 +398,10 @@ def sendBookmarkViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -486,8 +488,10 @@ def sendUndoBookmarkViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, diff --git a/delete.py b/delete.py index 1d16637bd..93e1ffea1 100644 --- a/delete.py +++ b/delete.py @@ -72,9 +72,10 @@ def sendDeleteViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, + displayName) = getPersonBox(signingPrivateKeyPem, originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, fromDomain, postToBox, 53036) diff --git a/epicyon.py b/epicyon.py index cf8f46e30..58a9d0b54 100644 --- a/epicyon.py +++ b/epicyon.py @@ -739,10 +739,15 @@ if args.postDomains: if not args.language: args.language = 'en' signingPrivateKeyPem = None + if not args.domain: + originDomain = getConfigParam(baseDir, 'domain') + else: + originDomain = args.domain if args.secureMode: - signingPrivateKeyPem = getInstanceActorKey(baseDir, domain) + signingPrivateKeyPem = getInstanceActorKey(baseDir, originDomain) domainList = getPublicPostDomains(None, baseDir, nickname, domain, + originDomain, proxyType, args.port, httpPrefix, debug, __version__, diff --git a/follow.py b/follow.py index 65dbab213..87519a6d9 100644 --- a/follow.py +++ b/follow.py @@ -1088,9 +1088,10 @@ def sendFollowRequestViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, + displayName) = getPersonBox(signingPrivateKeyPem, originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, fromDomain, postToBox, 52025) @@ -1181,9 +1182,11 @@ def sendUnfollowRequestViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, diff --git a/like.py b/like.py index 0fee375d1..86055ddb4 100644 --- a/like.py +++ b/like.py @@ -201,8 +201,10 @@ def sendLikeViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -287,8 +289,10 @@ def sendUndoLikeViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, diff --git a/pgp.py b/pgp.py index cab1f6c64..01efb3f4d 100644 --- a/pgp.py +++ b/pgp.py @@ -574,9 +574,10 @@ def pgpPublicKeyUpload(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, + displayName) = getPersonBox(signingPrivateKeyPem, originDomain, baseDir, session, wfRequest, personCache, __version__, httpPrefix, nickname, domain, postToBox, 52025) diff --git a/posts.py b/posts.py index f5232e27c..d112d993f 100644 --- a/posts.py +++ b/posts.py @@ -320,7 +320,7 @@ def _getPersonBoxActor(session, baseDir: str, actor: str, return None -def getPersonBox(signingPrivateKeyPem: str, +def getPersonBox(signingPrivateKeyPem: str, originDomain: str, baseDir: str, session, wfRequest: {}, personCache: {}, projectVersion: str, httpPrefix: str, nickname: str, domain: str, @@ -358,7 +358,7 @@ def getPersonBox(signingPrivateKeyPem: str, _getPersonBoxActor(session, baseDir, personUrl, profileStr, asHeader, debug, projectVersion, - httpPrefix, domain, + httpPrefix, originDomain, personCache, signingPrivateKeyPem) if not personJson: return None, None, None, None, None, None, None @@ -2190,9 +2190,11 @@ def sendPost(signingPrivateKeyPem: str, projectVersion: str, postToBox = 'tlblogs' # get the actor inbox for the To handle + originDomain = toDomain (inboxUrl, pubKeyId, pubKey, toPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -2335,9 +2337,11 @@ def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str, postToBox = 'tlblogs' # get the actor inbox for the To handle + originDomain = toDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -2541,8 +2545,10 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str, postToBox = 'outbox' # get the actor inbox/outbox for the To handle + originDomain = toDomain (inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -3917,6 +3923,7 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str, (personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -3938,6 +3945,7 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str, def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str, + originDomain: str, proxyType: str, port: int, httpPrefix: str, debug: bool, projectVersion: str, wordFrequency: {}, domainList: [], @@ -3969,6 +3977,7 @@ def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str, (personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -4034,6 +4043,7 @@ def downloadFollowCollection(signingPrivateKeyPem: str, def getPublicPostInfo(session, baseDir: str, nickname: str, domain: str, + originDomain: str, proxyType: str, port: int, httpPrefix: str, debug: bool, projectVersion: str, wordFrequency: {}, systemLanguage: str, @@ -4064,6 +4074,7 @@ def getPublicPostInfo(session, baseDir: str, nickname: str, domain: str, (personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, @@ -4110,8 +4121,10 @@ def getPublicPostDomainsBlocked(session, baseDir: str, """ Returns a list of domains referenced within public posts which are globally blocked on this instance """ + originDomain = domain postDomains = \ getPublicPostDomains(session, baseDir, nickname, domain, + originDomain, proxyType, port, httpPrefix, debug, projectVersion, wordFrequency, domainList, systemLanguage, @@ -4592,9 +4605,11 @@ def sendBlockViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -4671,9 +4686,11 @@ def sendMuteViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -4755,9 +4772,11 @@ def sendUndoMuteViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -4843,9 +4862,11 @@ def sendUndoBlockViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, fromDomain, postToBox, 53892) diff --git a/shares.py b/shares.py index 9f53b99cf..7fddad6a9 100644 --- a/shares.py +++ b/shares.py @@ -617,9 +617,11 @@ def sendShareViaServer(baseDir, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -720,9 +722,11 @@ def sendUndoShareViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -835,9 +839,11 @@ def sendWantedViaServer(baseDir, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, @@ -938,9 +944,11 @@ def sendUndoWantedViaServer(baseDir: str, session, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, fromNickname, diff --git a/skills.py b/skills.py index 30cdae33b..d7cebf717 100644 --- a/skills.py +++ b/skills.py @@ -224,9 +224,11 @@ def sendSkillViaServer(baseDir: str, session, nickname: str, password: str, postToBox = 'outbox' # get the actor inbox for the To handle + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, nickname, domain, diff --git a/socnet.py b/socnet.py index 6df85be28..d8559ea64 100644 --- a/socnet.py +++ b/socnet.py @@ -63,9 +63,11 @@ def instancesGraph(baseDir: str, handles: str, str(wfRequest)) return dotGraphStr + '}\n' + originDomain = None (personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, wfRequest, personCache, projectVersion, httpPrefix, diff --git a/webapp_moderation.py b/webapp_moderation.py index 3064dc643..62dd87332 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -81,6 +81,7 @@ def htmlAccountInfo(cssCache: {}, translate: {}, This screen is shown if a moderator enters a handle and selects info on the moderation screen """ + signingPrivateKeyPem = None msgStr1 = 'This account interacts with the following instances' infoForm = '' @@ -114,8 +115,10 @@ def htmlAccountInfo(cssCache: {}, translate: {}, session = createSession(proxyType) wordFrequency = {} + originDomain = None domainDict = getPublicPostInfo(session, baseDir, searchNickname, searchDomain, + originDomain, proxyType, searchPort, httpPrefix, debug, __version__, wordFrequency, systemLanguage, diff --git a/webapp_post.py b/webapp_post.py index c7fd55690..edcd13e29 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1273,9 +1273,11 @@ def individualPostAsHtml(signingPrivateKeyPem: str, avatarUrl2 = None displayName = None if postActorWf: + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, postActorWf, personCache, diff --git a/webapp_profile.py b/webapp_profile.py index cb382c27d..e9f9b5a45 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -2137,9 +2137,11 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str, domain, __version__, debug, False, signingPrivateKeyPem) + originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem, + originDomain, baseDir, session, followUrlWf, personCache, projectVersion,