mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +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.
|
||||
|
||||
"""
|
||||
request = Unwrapper(str(kwargs["request"]), gpg=self.gpg)
|
||||
request = self.gpg.decrypt(request)
|
||||
|
||||
proxied_request = self.verify_sender(request.next())
|
||||
encrypted_body = dict(self.verify_client(request.next()))
|
||||
request_body = dict(self.decrypt_client(request.next()))
|
||||
if not str(request):
|
||||
raise InvalidSignatureError()
|
||||
|
||||
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
|
||||
|
||||
def verify_sender(self, request_body):
|
||||
def verify_sender(self, request):
|
||||
"""Verify the signature of the message's sender.
|
||||
|
||||
This is part (A) in the message diagram.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user