mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
Forego proxying for direct message sending.
This commit is contained in:
parent
5cc01cc92d
commit
e8f6df8d04
@ -339,15 +339,22 @@ class Santiago(object):
|
|||||||
in that case, it must be ignored.
|
in that case, it must be ignored.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
request = Unwrapper(str(kwargs["request"]), gpg=self.gpg)
|
request = self.gpg.decrypt(request)
|
||||||
|
|
||||||
proxied_request = self.verify_sender(request.next())
|
if not str(request):
|
||||||
encrypted_body = dict(self.verify_client(request.next()))
|
raise InvalidSignatureError()
|
||||||
request_body = dict(self.decrypt_client(request.next()))
|
|
||||||
|
if not request.keyid:
|
||||||
|
# an unsigned or invalid request!
|
||||||
|
return
|
||||||
|
|
||||||
|
request_body = dict(request)
|
||||||
|
reqeust_body["to"] = self.me
|
||||||
|
request_body["from"] = request.keyid
|
||||||
|
|
||||||
return request_body
|
return request_body
|
||||||
|
|
||||||
def verify_sender(self, request_body):
|
def verify_sender(self, request):
|
||||||
"""Verify the signature of the message's sender.
|
"""Verify the signature of the message's sender.
|
||||||
|
|
||||||
This is part (A) in the message diagram.
|
This is part (A) in the message diagram.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user