mirror of https://gitlab.com/bashrc2/epicyon
Reject non-followers more quickly when getting private pinned posts
parent
98d09c48a8
commit
8cbbefea9d
12
daemon.py
12
daemon.py
|
@ -12994,13 +12994,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname, self.server.domain,
|
nickname, self.server.domain,
|
||||||
self.server.domainFull,
|
self.server.domainFull,
|
||||||
self.server.systemLanguage):
|
self.server.systemLanguage):
|
||||||
if not self._secureMode(True):
|
followerActor = self._secureModeActor()
|
||||||
# GET request signature failed
|
if not followerActor:
|
||||||
showPinned = False
|
showPinned = False
|
||||||
else:
|
else:
|
||||||
# the GET signature passes, but is this someone
|
|
||||||
# that follows us?
|
|
||||||
followerActor = self._secureModeActor()
|
|
||||||
followerNickname = getNicknameFromActor(followerActor)
|
followerNickname = getNicknameFromActor(followerActor)
|
||||||
followerDomain, followerPort = \
|
followerDomain, followerPort = \
|
||||||
getDomainFromActor(followerActor)
|
getDomainFromActor(followerActor)
|
||||||
|
@ -13011,6 +13008,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
followerNickname,
|
followerNickname,
|
||||||
followerDomainFull):
|
followerDomainFull):
|
||||||
showPinned = False
|
showPinned = False
|
||||||
|
else:
|
||||||
|
# does their GET signature verify?
|
||||||
|
if not self._secureMode(True):
|
||||||
|
# GET request signature failed
|
||||||
|
showPinned = False
|
||||||
if not showPinned:
|
if not showPinned:
|
||||||
# follower check failed, so just return an empty collection
|
# follower check failed, so just return an empty collection
|
||||||
postContext = getIndividualPostContext()
|
postContext = getIndividualPostContext()
|
||||||
|
|
Loading…
Reference in New Issue