mirror of
https://github.com/simple-login/app.git
synced 2025-10-05 04:45:49 +08:00
fix compatible with mailvelope add name=encrypted.asc
This commit is contained in:
parent
10205e3731
commit
15d7f6407e
1 changed files with 4 additions and 2 deletions
|
@ -379,8 +379,10 @@ def prepare_pgp_message(orig_msg: Message, pgp_fingerprint: str):
|
||||||
first.set_payload("Version: 1")
|
first.set_payload("Version: 1")
|
||||||
msg.attach(first)
|
msg.attach(first)
|
||||||
|
|
||||||
second = MIMEApplication("octet-stream", _encoder=encoders.encode_7or8bit)
|
second = MIMEApplication(
|
||||||
second.add_header("Content-Disposition", "inline")
|
"octet-stream", _encoder=encoders.encode_7or8bit, name="encrypted.asc"
|
||||||
|
)
|
||||||
|
second.add_header("Content-Disposition", 'inline; filename="encrypted.asc"')
|
||||||
# encrypt original message
|
# encrypt original message
|
||||||
encrypted_data = pgp_utils.encrypt_file(
|
encrypted_data = pgp_utils.encrypt_file(
|
||||||
BytesIO(orig_msg.as_bytes()), pgp_fingerprint
|
BytesIO(orig_msg.as_bytes()), pgp_fingerprint
|
||||||
|
|
Loading…
Add table
Reference in a new issue